A DLL custom action expects one argument only, an MSIHANDLE. The signature
should be:

 

UINT WINAPI MyCustomAction( MSIHANDLE hInstall );

 

Your custom action will have to read any other information it needs from the
install database using e.g. MsiGetProperty. If your custom action is
deferred (though this one isn't) it is very limited in what it can view -
mostly just to a 'custom action data' property named the same as the custom
action. An immediate custom action can view any part of the database and can
even add new rows at runtime (although these changes are not persisted, as
far as I know).

 

-- 

Mike Dimmick

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of srinivas nomu
Sent: 16 July 2007 21:18
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to call a .dll from wix with arguments?

 

Hi

I have to call  a dll which is written in C. I donot know how to call this
dll with arguments. How should I pass these two arguments into entrydll.
Write now I have code like this:

 

<Binary Id='WixLicense' src='wix_license_dll.dll'/> 

 

<CustomAction Id='create_license_file_from_cdkey' BinaryKey='WixLicense'
DllEntry='create_license_file_from_cdkey' Execute='immediate'
Return='check'/> 

 

<InstallExecuteSequence> <Custom Action='create_license_file_from_cdkey'
After='InstallFiles'/> </InstallExecuteSequence> 

 

>From main program, the dll works fine like this

 

rc = create_license_file_from_cdkey("62225-1127270143-1186981200", "10.0");

 

How should I pass the above two arguments. Any ideas or examples please?.

 

Srini

  

  _____  

TV dinner still cooling?
Check out <http://us.rd.yahoo.com/evt=49979/*http:/tv.yahoo.com/>
"Tonight's Picks" on Yahoo! TV.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to