access violation - Exception with std::string and How to find Platform Toolset of compiled c++ application -


we have dll (developed our company, have source) hosted , loaded application (we don't have source code), lately have lot of access violation exception because of std string:

76fae228:000196 [76fae3be] rtlinitializegenerictable (ntdll.dll) 76fadfa5:00007e [76fae023] rtlgetcompressionworkspacesize (ntdll.dll) 749714c9:000014 [749714dd] heaplock (kernel32.dll) 730b3b4e:0000cd [730b3c1b] free (msvcr90.dll) 736a5dfb:000035 [736a5e30] ?_tidy@?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@iaex_ni@z (msvcp90.dll)  736a5ebb:000009 [736a5ec4] ??1?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@qae@xz (msvcp90.dll) 

as can see using multi threaded dll (/md) runtime library , using platform toolset v90...

we suspect hosting application changed platform toolset newer version , causing issue, problem cannot find out platform toolset of hosting application (they using multi-threaded (/mt) runtime library) process walker didn't well...

how can find platform toolset of hosted application if using /mt?

thanks...

multiple solutions (worst better order) : 1) if dll comes header file, add global inline init function checks if _mt , _dll defined (see http://msdn.microsoft.com/en-us/library/vstudio/abx4dbyh.aspx)

2) walk dlls loaded in program using enumprocessmodules (http://msdn.microsoft.com/en-us/library/ms682631%28vs.85%29.aspx) , check if msvcrtxxx.dll loaded. carefull though, time ccheck, msvcrtxxx.dll might not loaded.

3) design dll exported method crt free eg not pass classes (std::string) instances value, crt objects (file ..etc); pointers classes ok if provide way allocate / destroy instances;


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -