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

.NET Deployment and native DLL Custom Actions

0 views
Skip to first unread message

Paul Brun

unread,
May 17, 2004, 12:05:02 PM5/17/04
to
I am trying to run a native DLL within my .NET setup environment as a custom
action.
I have done the appropriate steps to ensure that my function looks like:

UINT __stdcall MyCA(MSIHANDLE hInstall)

and that the project output is set up within the File System and that it is
defined within the
Custom Actions page.

However, at build time, the .NET Deployment project can not find the
exported function
within the DLL.

Any ideas?

thanks
Paul


Phil Wilson

unread,
May 17, 2004, 2:19:18 PM5/17/04
to
Is it exported? If not, export it by adding a .DEF file to your project.
Plus there might be some name mangling going on that a DEF file will help
you avoid.
--
Phil Wilson [MVP Windows Installer]
----
"Paul Brun" <pb_new...@pbrun.net> wrote in message
news:ubIO4iCP...@TK2MSFTNGP10.phx.gbl...

Paul Brun

unread,
May 17, 2004, 2:54:11 PM5/17/04
to
Sorry about the double posting. I thought I would reach a larger audience if
people
don't visit both of them.

Anyways...I got it to compile and build without a problem. I just had to
move the
C++ DLL and build it within Visual Studio 6.0 instead of Visual Studio .NET.

I still can't get the install going as I am getting a File Not Found
Exception on a name
that I don't even have listed in my deployment.

When I tried rebuilding the deployment package in another location, the same
thing
happened and it appeared to have occurred on a word which I typed within the
"ProductName" or "Title" property.

It is really weird and I can't seem to figure out what is going on right
now.

Paul


"Phil Wilson" <Phil....@unisys.spamcom> wrote in message
news:uTiO5tD...@tk2msftngp13.phx.gbl...

Phil Wilson

unread,
May 17, 2004, 3:46:28 PM5/17/04
to
VS 2003 C++ custom actions work fine, I wonder why you went to VS 6.0.

If you're getting a .NET exception you haven't got the custom action set up
properly because MSI calling a C++ function has nothing to do with .NET.
Perhaps you left InstallerClass set True.


--
Phil Wilson [MVP Windows Installer]
----
"Paul Brun" <pb_new...@pbrun.net> wrote in message

news:OSN5WBEP...@tk2msftngp13.phx.gbl...

Paul Brun

unread,
May 17, 2004, 4:40:41 PM5/17/04
to
When I had the project output located within my .NET deployment tool, I
could not
get it to compile or link up correctly. It kept stating that it could not
find my entry
function that I had entered in the project. I also do not have
InstallerClass set to true
as I already understand the purpose of that function.

Thanks
Paul

"Phil Wilson" <Phil....@unisys.spamcom> wrote in message

news:uwStveEP...@TK2MSFTNGP09.phx.gbl...

Phil Wilson

unread,
May 17, 2004, 5:06:14 PM5/17/04
to
To call a custom action in a C++ DLL, just browse to the DLL. Set the
Exclude property on the DLL to True if you don't need it to be installed on
on the target system. Using "Project Output" to get to a DLL custom action
isn't necessary and seems to be causing some problems in your case.

--
Phil Wilson [MVP Windows Installer]
----
"Paul Brun" <pb_new...@pbrun.net> wrote in message
news:uJIu78EP...@TK2MSFTNGP11.phx.gbl...
0 new messages