When debugging from VS it works, when running from explorer not
-
Hi, I am having this strange issue that I cant trace because my program works just fine when debugging from within VS or any other debugger (I tried olly as well), but whenever I run it from the explorer it doesnt work completly. I am reading values from the registry using this Wrapper. Then Im assigning the value of the key to a variable like this:
char * binaryData = (char *)value.operator LPCTSTR();
Then I'm converting the char from UTF8 to Unicode, but there should not be a problem. However, the resulting string has in the most cases something appended like "=C:\Pr " which looks like a string to me but I have no idea how it got appended to the registry value. The strange thing now is that whenever I debug it with VS it works, but when I run it normally from windows it puts those strange characters at the end of the strings. Btw, my strings are in REG_BINARY format. Does anyone know what the problem here is? Thanks, lucki_luke -
Hi, I am having this strange issue that I cant trace because my program works just fine when debugging from within VS or any other debugger (I tried olly as well), but whenever I run it from the explorer it doesnt work completly. I am reading values from the registry using this Wrapper. Then Im assigning the value of the key to a variable like this:
char * binaryData = (char *)value.operator LPCTSTR();
Then I'm converting the char from UTF8 to Unicode, but there should not be a problem. However, the resulting string has in the most cases something appended like "=C:\Pr " which looks like a string to me but I have no idea how it got appended to the registry value. The strange thing now is that whenever I debug it with VS it works, but when I run it normally from windows it puts those strange characters at the end of the strings. Btw, my strings are in REG_BINARY format. Does anyone know what the problem here is? Thanks, lucki_luketry running from VS without debugger (ctrl-f5?) i think problem must be with env and/or project settings. we faced one similar problem where the error occurred only in release mode. we had to change some 3rd party libraries as far as i remember.
---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.
-
try running from VS without debugger (ctrl-f5?) i think problem must be with env and/or project settings. we faced one similar problem where the error occurred only in release mode. we had to change some 3rd party libraries as far as i remember.
---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.
When running from VS without debugger it doesnt work either, and as I said before it works even when running from OllyDbg. And Debug or Release mode doesnt matter as it works in both modes with debugger and not without... I have totally no idea what to do...
-
When running from VS without debugger it doesnt work either, and as I said before it works even when running from OllyDbg. And Debug or Release mode doesnt matter as it works in both modes with debugger and not without... I have totally no idea what to do...
Check for variables that are not initialized. Debugger mode (or debug build) will initialize variables with some non-zero data, while release mode might contain random data or zeros. That is usually the difference.
Any sufficiently gross incompetence is nearly indistinguishable from malice.