|
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?
|
|
|
|
|
did you remember to also copy the res subdirectory?
Steve
|
|
|
|
|
MAN I AM COPYING ENTIRE PROJECT FOLDER
|| ART OF LIVING ||
|
|
|
|
|
If you have the same project open in two instances of Visual Studio then the second does not show the class view.
Oh, please get rid the caps lock!
Elaine
The tigress is here
|
|
|
|
|
I am not opening same project.
My problem is still unsolved
|| ART OF LIVING ||
-- modified at 23:34 Friday 28th October, 2005
|
|
|
|
|
Hello,
I have a problem I don't know how to fix
I've got some code that works perfectly in the main executable, but falls over if moved to a dll
Heres some code written to highlight the problem:
The first example works perfectly:
The method setString sets sMyString to “happy string” and everything works just dandy
#include "LocalStringRefTest.h"
#include <string>
#include <stdio.h>
using namespace std ;
int main(int argc, char* argv[])
{
{
string sMyString;
sMyString = "";
{
LocalStringRefTest tester;
tester.setString(sMyString);
}
printf (sMyString.c_str());
}
return 0; }
But if I move my class to a dll and try again,
Everything works just fine until sMyString goes out of scope
#include "myDll/StringRefTest.h"
#include <string>
#include <stdio.h>
using namespace std ;
int main(int argc, char* argv[])
{
{
string sMyString;
sMyString = "";
{
StringRefTest tester;
tester.setString(sMyString);
}
printf (sMyString.c_str());
}
return 0; }
In same executable
LocalStringRefTest.h
#ifndef LocalStringRefTest_CLASS_H
#define LocalStringRefTest_CLASS_H
#include <string>
using namespace std ;
class LocalStringRefTest
{
public:
LocalStringRefTest();
bool setString(string& sString);
protected:
string m_sString;
};
#endif
LocalStringRefTest.cpp
#include "LocalStringRefTest.h"
using namespace std ;
LocalStringRefTest::LocalStringRefTest()
:m_sString("Happy String")
{
}
bool LocalStringRefTest::setString(string& sString)
{
sString = m_sString;
return true;
}
In dll
StringRefTest.h
#ifndef StringRefTest_CLASS_H
#define StringRefTest_CLASS_H
#include <string>
using namespace std ;
class __declspec(dllexport) StringRefTest
{
public:
StringRefTest();
bool setString(string& sString);
protected:
string m_sString;
};
#endif
StringRefTest.cpp
#include "myDll/StringRefTest.h"
using namespace std ;
StringRefTest::StringRefTest()
:m_sString("Happy String")
{
}
bool StringRefTest::setString(string& sString)
{
sString = m_sString;
return true;
}
As i debug through my code, everything works fine until the string goes out of scope
when that happens i get:
NTDLL! 7c96cd80()
NTDLL! 7c960af8()
KERNEL32! 7c85e7af()
_CrtIsValidHeapPointer(const void * 0x00961a00) line 1606
_free_dbg_lk(void * 0x00961a00, int 1) line 1011 + 9 bytes
_free_dbg(void * 0x00961a00, int 1) line 970 + 13 bytes
free(void * 0x00961a00) line 926 + 11 bytes
operator delete(void * 0x00961a00) line 7 + 9 bytes
std::allocator<char>::deallocate(void * 0x00961a00, unsigned int 33) line 64 + 38 bytes
std::basic_string<char,std::char_traits<char>,std::allocator<char>
::_Tidy(unsigned char 1) line 592
std::basic_string<char,std::char_traits<char>,std::allocator<char>
::~basic_string<char,std::char_traits<char>,std::allocator<char> >()
line 59 + 39 bytes
main(int 1, char * * 0x00a70eb0) line 26
mainCRTStartup() line 206 + 25 bytes
KERNEL32! 7c816d4f()
Invalid Address specified to RtlValidateHeap( 00A60000, 009619E0 )
from looking around on the net it seems this is a fairly commonly encountered problem.
I've found a lot of useful information but not a specific answer i was able to use to resolve my problem
i've found the related article on http://support.microsoft.com/kb/168958/
but i just don't understand what i need to do to be able to make it work,
thanks for you help,
mat
|
|
|
|