Function behaving differently in Debug and Release mode.
-
Hi. I am calling a function from a third party DLL which takes 4 Parameter as a LPSTR. These 4 parameters I have in CString format. So I am using following code to convert CString to LPSTR. CString strServer = “xyz.com” LPSTR server = strServer.GetBuffer(strServer.GetLength()); strServer.ReleaseBuffer(); long lRetVal = ThirdPartyDLLFun(server,…….); When I call that 3rd party DLL function in debug mode I get lRetVal = 0 as a return value. But with same inputs the return value if something else in Release mode. What could be the reason? Thanks
Sameer Thakur
-
Hi. I am calling a function from a third party DLL which takes 4 Parameter as a LPSTR. These 4 parameters I have in CString format. So I am using following code to convert CString to LPSTR. CString strServer = “xyz.com” LPSTR server = strServer.GetBuffer(strServer.GetLength()); strServer.ReleaseBuffer(); long lRetVal = ThirdPartyDLLFun(server,…….); When I call that 3rd party DLL function in debug mode I get lRetVal = 0 as a return value. But with same inputs the return value if something else in Release mode. What could be the reason? Thanks
Sameer Thakur