|
|
someone told me
g:\programy\microsoft visual studio 8\vc#\.\vc#wizards
is actually the same as:
g:\programy\microsoft visual studio 8\vc#\vc#wizards
is this right
can someone shed more light on this
thanks
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
-- modified at 3:54 Friday 28th October, 2005
|
|
|
|
|
. in a path means 'current folder'.
so, C:\.\.\.\.\myFolder means C:\myFolder...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
The following code is for detect if USB disk is writable, it work well under Win2000, WinXP but not under Win98 where I got ERROR_FILE_NOT_FOUND error. Are these functions' parameters questionable or should I turn to another solution in order to make it work under Win98?
CString strDrive;
strDrive.Format("\\\\.\\%c:", A~Z);
HANDLE hDrive = CreateFile(strDrive, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL);
DWORD dError = GetLastError();
DWORD dwRet;
BOOL bWritable = DeviceIoControl(hDrive, IOCTL_DISK_IS_WRITABLE, NULL, 0, NULL, 0, &dwRet, NULL);
|
|
|
|
|
This[^] link should give you the information you need. There is link to a 2nd article on how to use DeviceIoControl for early versions of Windows. Since the logic is different, you will also need to determine the operating system you are running under to select the correct logic path.
Steve
|
|
|
|
|
hi,
When u r running in the winXp, the XP gives the driver automatically for the USB device. But in '98 environment user has to give the driver for device. so before accessing the USB device, load the driver for the USB device. This might be problem with this.
Regards,
Parthiban
|
|
|
|
|
LiYS wrote: strDrive.Format("\\\\.\\%c:", A~Z);
HANDLE hDrive = CreateFile(strDrive, ...
Per MSDN, this technique does not work for opening a logical drive. Specifying a string in this form causes CreateFile() to return an error.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi Here is fresh Programmer in Visual C++.....And i need a code on Menu Item
--> How to enable and Disable the MENU ITEM , when we press the menu item
Hai this is fresh programer
|
|
|
|
|
|
on the "click on item" event handler, add the code which disables the item...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
thelip wrote: Hi Here is fresh Programmer in Visual C++.....And i need a code on Menu Item
Handle the OnUpdateUI handller for the Mneu Item! and you can also check out this example :-
http://www.codeproject.com/menu/cmdroutemenu.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hello,
I want to know what is the difference between debug mode and release mode. I started adn finished my project in release mode, how would it be different if it was done in debug mode.
Thanks,
|
|
|
|
|
Hello. The differences I came to think about (there might be other deifferences as well) is:
In the debug version, there is (of course) a lot of information that aids the debugger.
There are no code optimisations in the debug build.
Allocated memory is filled with nulls in debug mode.
More, anyone?
|
|
|
|
|
kakan wrote: Allocated memory is filled with nulls in debug mode
whats the reason for this difference?
thanks!
|
|
|
|
|
In debug mode, filling uninitialized memory with zero's makes it easier to see that your program has not initialized it.
Software Zen: delete this;
|
|
|
|
|
See Gary R. Wheeler's answer, above.
But this difference in behaviour is a very common source of problems in release mode builds.
|
|
|
|
|
kakan is right, but to complete, just compare the sizes of your two generated (debug and release) exes...
you'll see the difference !
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
In Debug mode, all local variables not explicitly initialized by the program are initialized with 0xCC.
karmendra_js wrote: I started adn finished my project in release mode, how would it be different if it was done in debug mode.
This is backwards. You should develop and test it in Debug mode, and only when all of the bugs have been removed should you compile it in Release mode.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
In debug mode, two things happen.
First, the compiler generates information about your program used by the debugger. The compiler also generates code to initialize memory to default values.
Second, in debug mode you run your programmer under the debugger. The debugger lets you step through your code, examine data as the program executes, set breakpoints, and perform other operations. The purpose of the debugger is to let you run your program in a controlled fashion so that you can see what it is doing as it runs.
In release mode, the compiler doesn't initialize memory for you; it assumes your program will initialize what it needs. As a rule, in release mode the compiler will also 'optimize' your code. In simplest terms, the compiler generates machine code that runs as fast as possible. The machine code in this case looks different from the debug version, since the compiler can rearrange operations in order to improve efficiency.
As someone else has mentioned, you really want to run your program in debug mode first. This lets you get things working in a controlled environment. After it looks like things are working correctly in debug mode, rebuild the program in release mode, and test it again. There are subtle differences between debug and release. The article Debugging Release Mode Problems[^] has more information.
Software Zen: delete this;
|
|
|
|
|
WHENEVER I COPY MY PROJECT TO ANOTHER PLACE AND RENAME IT
CLASSVIEW IS MISSING,AND RESOURCE VIEW BECOME INCAPABLE.
HOW TO OVERCOME THIS PROBLEM? IT WAS NOT HAPPENING EARLIER
BUT NOW IT IS HAPPENING.I CANNOT WORK IN MASTER COPY.
PLEASE HELP
|| ART OF LIVING ||
|
|
|
|
|
Look in the project files and substtitue all absolute paths to the new ones.
And then rebuild all.
|
|
|
|
|
THERE ARE NO ABSOLUTE FILES
AND ABSOLUTE FILES MAY CAUSE PROBLEM FOR BUILD HERE PROJECT IS NOT GETTING LOADED PLEASE TELL ,I HAVE REBUILDED ALL
PROBLEM PERSISTS
|| ART OF LIVING ||
|
|
|
|
|
Make sure you copy the .clw file. This is a text file that contains a list of classes and resources to view in the class view along with some basic information about each class. This file can be edited if you you know the format. I add things to my .clw all the time.
John
|
|
|
|
|
THERE ARE NO ABSOUTE FILE PATHS IN PROJECT.
ANYWAY FILES USED MAY CAUSE PROBLEM WHEN I WILL BUILD OR RUN THE PROJECT HERE PROJECT IS NOT GETTING LOADED
PLEASE SOMEBODY HELP?
|| ART OF LIVING ||
|
|
|
|
|
OK. I have seen this happen when some of the project files are write protected (Read Only).
Could that be the reason of your problems?
|
|
|
|