|
You see, you don't know how to ask a question. I did see that post, it. You've made it before a 4 odd hours. So what? You can't wait for a day at least?
Fair enough - your' answer is with process explorer, download it and find out which process is having a handle on the file that you want to copy, release the handles and try copying the file. I won't write any further in this regard.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Thx's for reply i have download and how can i
find out which process is having a handle on the file that you want to copy
Plz help me
|
|
|
|
|
Run process explorer, click on "Find->Find handle or DLL" type your file name that your app is unable to copy there and hit search. The tool will now reveal the process that has locked your resource.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Whats the purpose of using the below statement with in _DEBUG
#ifdef _DEBUG
CString str;
#endif
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
From the docs:
The compiler defines _DEBUG when you specify the /MTd or /MDd option. These options specify debug versions of the C run-time library.
If you want a piece of code to be executed only in debug mode, then you can use this.
vibindia wrote: #ifdef _DEBUG
CString str;
#endif
In this example of yours, this declaration for str will not happen in release mode (or, simply when /MTd or /MDd option is not specified).
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
yes, that's what it does, but effectively, it has no significant use...
|
|
|
|
|
toxcct wrote: yes, that's what it does, but effectively, it has no significant use...
Not the case with me. Some of my apps run for weeks together, and they follow different ways of logging and dumping data, based on how the dump functions are implemented, which in turn are based on the build. I use them extensively.
And I have no idea of why would you want to tell me that it is of no use. Probably you wanted to reply to the OP?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh, come on.
how would you use a Cstring object declared like that ?
there are many more advaced ways of making better looging system.
here is one off the top of my head :
#ifdef _DEBUG
#define TRACE printf
#else
int TRACE(const char*, ...) { return 0; }
#endif
then, you don't have to repeat the #ifdef _DEBUG each time you want to use the str CString variable you declared previously
ps: no, i wanted to say this to you, not to the OP
|
|
|
|
|
toxcct wrote: #ifdef _DEBUG
#define TRACE printf
#else
int TRACE(const char*, ...) { return 0; }
#endif
That's what I meant when I said I use different ways of dumping for different builds.
I am not after declaring a CString in between blocks of #ifdef and #endif and to use it, I know it is the mark of an idiot. I thought you were harping that #ifdef and #endif are of no use.
Misunderstanding there.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
The debug configuration of you project will be defined with _DEBUG symbol. So if you write the code as above, you will be defining the a CString variable in the debug mode. If you compile the project in release mode( which is not defined _DEBUG symbol) #ifdef body will be skipped by compiler. Thus the str variable will not available in your source.
Please check the documentation of #ifdef for more details
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Is it possible to browse a Local Network for 'Named Pipes', Ifso, How do I go about it.
Regards
Bram van Kampen
|
|
|
|
|
I am trying to prevent the user from clicking, holding, and dragging the toolbar in an application I wrote. The application uses Stringray controls (RogueWave), MFC, and COM. I believe the trouble is working with Stingray Studio. Can anyone give me some direction? Thanks.
|
|
|
|
|
Hello All,
What's the best way for someone, who knows just enough of C++ to know what to search for on the internet and piece programs together that way, to get VC6 programs to compile under VS2008. It there a way to get the compiler to ignore pieces of code that do not comply with new standards? or is there some software that will rewrite the old code so that it will comply with newer standards? or is there another way of doing this that doesn't require me to fully learn the historical development of C++ under windows?
Thanks,
G
|
|
|
|
|
Someone else might have but I haven't heard of anything that would upgrade non-compliant code to current standard.
Is there some reason that you could not use a prior version of Visual Studio to get the code to compile? That would be the only way I know of.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Just think how much more C++ you'll know after upgrading the code to current
standards yourself
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Ylno wrote: It there a way to get the compiler to ignore pieces of code that do not comply with new standards?
While it won't solve all that ails you, check out _CRT_SECURE_NO_DEPRECATE .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
It seems you are new to c++,do you want to compile your old project on the VS2008,after compile VS2008 give you a report of errors and warnings.
|
|
|
|
|
Recently (last two or three weeks) I read an article from a link in the newsletter. It was about something else in C/C++ but near the top it had some comments on enum and typedef and why they should seperated. It also had something about always adding a begining and ending reference to use with loop itterations. I believe the example had something to do with days. If anybody remembers the article I'd appreciate a heads up. I searched for it but couldn't find it.
Jay
|
|
|
|
|
|
That was a good suggestion but it didn't help. I went through the last several months and didn't find the article. I do get more than one email a day from CodeProject so it must have been in something besides the newsletter. Thanks for trying to help.
Jay
|
|
|
|
|
Hi,
My application working fine in the dev environment.But in the testing /production environment
it is not working because that environment has only
windows server 2003
IIS
I have prepared a MSI which will automatically install .net2.0 framework
In my application I have Used some microsoft VC++ dll's also along with .net dll's.
Now Iam getting "RUNTime Error" pop-up screen message as below
" The Application has been terminated in an Unusual Way"
On googling i came to know that some dll's like msvcrt.dll of windows server 2003 has to be changed...But Iam not pretty sure about it..
In Production/test environment there is only framework installed ,but there is no visual studio installed on it.may be due that this error may occur...
So kindly post your suggestions and views to help me
|
|
|
|
|
You have to install VC++ redistributable.
-Saurabh
|
|
|
|
|
It seems that its a conflict between dll files.
|
|
|
|
|
Hi,
Iam thankfull for your valuable information..
In my case initially it was running fine...later after 5 mins Iam getting started to see that error..
Iam not getting any Idea to solve it...
Any help appreciated..Iam in Production stage...help me
|
|
|
|
|