Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

custom action c++ dll on x64 fails but works on x86

7 views
Skip to first unread message

Anthony LaMark

unread,
Sep 9, 2009, 7:53:08 PM9/9/09
to
Hi All,

Rather than repeat my problem, I have found an the exact same issue here:
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/274060ee-dbb0-4dcc-8b63-29edfa112621.
I have tried using a def file also. This custom action works just fine on
x86. I tried in both VS2005 and VS2008 but always get the same error when
installing on x64 (i.e. using an x64 installation...not 32 onto 64).

I know that the custom action function entrypoint is not even getting called
because I inserted some OutputDebugString calls.

Any help would be greatly appreciated!

Thanks,
Tony


Anthony LaMark

unread,
Sep 10, 2009, 1:15:17 PM9/10/09
to
OK, figured it out...

For the 64bit builds, you have to add a parameter to your link step to
create a function export name that msiexec is expecting.
So, if you have a function named MyExportFunc1, in visual studio, go into
the Linker properties->Command Line->Additional options: windows and paste
/export:_MyExportFunc@4=MyExportFunc

For details on this trick, see
http://msdn.microsoft.com/en-us/library/tyx5b79y.aspx

"Anthony LaMark" <tony....@quest.com> wrote in message
news:O2ostiaM...@TK2MSFTNGP02.phx.gbl...

0 new messages