run c# .dll(or .exe) to validate password

Got a problem you cannot solve? Try here.
joao_bana
Posts: 4
Joined: Thu Feb 08, 2007 6:55 am

run c# .dll(or .exe) to validate password

Postby joao_bana » Thu Feb 08, 2007 7:11 am

hi,
Could anyone tell me how can i use a c# dll that just validates the password inserted during installation?

i have seen another post mencioning just running an .exe to do this but i really cant understand how they send and receive the variables in the .exe

thanks

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Feb 08, 2007 1:39 pm

Just use Call DLL Function to call your DLL.

Some of the built-in sample projects make use of the Call DLL Function command with the Win32 API. Check them out.

As long as .NET is installed and your C# DLL can be called from regular Win32 apps, you will be set.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

joao_bana
Posts: 4
Joined: Thu Feb 08, 2007 6:55 am

Re: export dll function

Postby joao_bana » Fri Feb 09, 2007 7:14 am

ok, I did like you suggested and used the Call dll function. It seams fine but unfortunately I getting the FUNCTIONNOTFOUND error.

a little research tells me that "C# DLLs cannot be exported due to the underlying nature of .NET". In fact, Installware's help says that "The function must be available under the specified function name and use the __stdcall calling convention." which c#'s functions, I think, do not.

Can you give some more help?
Thanks once again

epohl
Posts: 35
Joined: Tue Nov 28, 2006 10:18 am

Postby epohl » Fri Feb 09, 2007 12:57 pm

One way around this would be to put your validation procedure in a command-line .exe file, distribute it to SUPPORTDIR, and then call it via the Run Program command.

Eric

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Feb 09, 2007 1:36 pm

If you cannot support the required calling convention, Call DLL Function will not work for you. Sorry!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 174 guests