visual c++ - Cannot register COM DLL built with VS2012/VC++ on 32-bit machine -


i built c++ based com object using visual studio 2012. registers , works fine on 64-bit machines (called 32-bit code , calling 32-bit out-of-process com server) not register on 32-bit machines (neither xp nor win7 32-bit). message regsvr32 is

loadlibrary("comobj.dll") failed - specified procedure not found. 

the project built visual studio 6 (7 years ago). uses atl macros such begin_com_map , begin_sink_map declare implementation of various interfaces. had re-compiled because com server invoking changed (new progid, new guid, new type library, etc). other making adjustments, , using current vs, there no (intentional) changes -- there nothing in old equivalent of project file have pointed 64-bitness.

examining dll 64-bit version of depends.exe shows "64" icons next standard referenced dlls kernel32 , user32. other having built dll on 64-bit machine, there nothing "64-bit" dll can find. target explicitly win32 (not x64).

examining dll 32-bit version of depends.exe (on windows xp running under virtual pc) shows kernel32.dll red icon, apparently because there references flsalloc flsfree flsgetvalue flssetvalue not exist in 32-bit kernel32.dll. (i have no idea , don't know references come -- perhaps copy of mfc on 64-bit machine compile done?)

could have install vs2012 on xp , re-compile there? how needs done build win32 com object in c++ using current visual studio?

does know might look? i've checked project , solution options , nothing seems set 64-bit. option under "use of mfc" set "use standard windows libraries" -- that's answer if that's not portable 32-bit windows it's hardly using "standard libraries". (i trying changes after sending this.)

thanks in advance advice.

default toolset coming visual studio 2012 produces output incompatible windows xp, through using apis introduced later vista.

in order both utilize power , feature richness of latest microsoft c++ compiler, , still compatible windows xp, need use alternate toolset codename "v110_xp" introduced visual studio 2012 update 1. @ moment latest update available visual studio update 3, , might want install latest available updates visual studio.

you have setting available under project settings:

enter image description here

see more here: configuring c++ 11 programs windows xp.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -