<CustomAction BinaryKey="yourDllName" Execute="firstSequence"
Id="caYourMethod" DllEntry="yourMethodName" Return="check" />

Export your Method correct in C# as dll-EntryPoint


Greets

Silvio



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alexei
Sent: Dienstag, 21. August 2007 11:36
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Custom Action - HowTo call a function from a
dll?


You need to have your .dll in the binary folder under where your wxs is.
That
is:
C:\WiXSource\WixProj1\mysource.wxs
and
C:\WiXSource\WixProj1\Binary\InstallUtil.dll

However you might also want to check whether you want to use an
immediate
custom action or a deferred CA. If you're editing files that are
installed,
or system state, then it will have to be deferred.

Afraid I can't help much with your first question about managed CAs -
I've
always went with the rule of thumb which says "Managed CAs are bad"
<Grin/>
Have a look  http://www.tramontana.co.hu/wix/lesson3.php#3.3 here  and
maybe
it'll help a little, not exactly on managed CAs but still...

Hope that helps, at least a little...


Chris-445 wrote:
> 
> Sorry, this is probably a common question...
> Is it possible to call a function of a C#-dll with a custom action?
How 
> does it work? Or is it only possible to call C++ - dll's
> I added following to my wxs but with the installation I get an error 
> that the dll wasn't found - that doesn't change when I enter the 
> absolute path:
> .....
> <Binary Id="InstallUtil" SourceFile=".\Test.dll" />
> <CustomAction Id="Install" BinaryKey="InstallUtil" DllEntry="Install" 
> Execute="immediate" Return="check" />
> .....
> <InstallExecuteSequence>
>       <Custom Action="Install" After="InstallFiles" />
> </InstallExecuteSequence>
> 
> 

-- 
View this message in context:
http://www.nabble.com/Custom-Action---HowTo-call-a-function-from-a-dll--
tf4304091.html#a12251411
Sent from the wix-users mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to