On 05/01/2011 17:15, Andy Clugston wrote:
> Yes, that was it!
>
I am glad it worked.

note: extern "C" is not needed.

> I guess I have been out of native development too long... Thanks for the
> reminder on the function export.
>
> Thanks again!
>
> On Wed, Jan 5, 2011 at 10:50 AM, Leonidas Spyropoulos<
> leonidas.spyropou...@formicary.net>  wrote:
>
>> On 05/01/2011 15:30, Andy Clugston wrote:
>>> Hi Users,
>> Hey Andy,
>>
>>>
>>> I am running into a bit of an issue while attempting to hook a C++ dll
>>> custom action into my installer. From all my research and debugging it
>>> appears that I have things setup properly. I have some tracing (message
>>> boxes) to indicate when DLLMain is entered/exited as well as my CA
>> function.
>>> The dll is being loaded as can be seen by my tracing, but my CA function
>> is
>>> not being called. Verbose logging is not telling me much, other than a
>> 1603,
>>> and the typical "Return value 3" error.
>>>
>>> I followed the tutorial here:
>>> http://www.wixwiki.com/index.php?title=Simple_Custom_Action_Dll
>>>
>>> Depends shows that the function is being exported properly as I see the
>>> exported function/ordinal.
>>
>> I followed the tutorial couple of days ago and got relativly same issues.
>> At the end after some googling I added: extern "C" _declspec(dllexport)
>> in the definition of the function I use like:
>> extern "C" _declspec(dllexport) UINT __stdcall ConfigForH2(MSIHANDLE
>> hInstaller){
>> ...}
>>
>> Also if you want to use properties from the UISequence you have to add
>> another CustomAction which will be run BEFORE the actual CustomAction to
>> set up the Properties. eg.
>>
>> --
>> <CustomAction Id ="ExporterConfiguration.SetProperties" Return="check"
>> Property="ExporterConfiguration"
>>
>> Value="InstallLocation=[INSTALLLOCATION];Username=[UserIdBox];Password=[PasswordBox];"
>> />
>>
>> <CustomAction Id ="ExporterConfiguration" BinaryKey="CustomAction"
>> DllEntry="ConfigForH2" Execute="deferred"/>
>>
>> And when I call the Custom Actions:
>>   <InstallExecuteSequence>
>>        <Custom Action="ExporterConfiguration.SetProperties"
>> Before="ExporterConfiguration"><![CDATA[NOT Installed]]></Custom>
>>        <Custom Action="ExporterConfiguration"
>> Before="InstallFinalize"><![CDATA[NOT Installed]]></Custom>
>>      </InstallExecuteSequence>
>>
>> I hope this is useful to you.
>>>
>>> Some other things to mention:
>>>
>>> - I am using the __stdcall convention
>>> - To be safe, the dll is statically linked to the runtime (even though
>> the
>>> runtime is installed on the target)
>>> - The CA dll is being create via VS 2008 and the WiX version is 3.0.5419.
>>> - CustomAction element is setting the Id, BinaryKey, and
>>> DllEntry=MyCAFunction
>>> - Custom element is being sequenced: Before=InstallFinalize
>>> - Viewing the MSI via Orca, everything seems to be in order
>>> - Same issue on 32 and 64 bit versions of Windows 7
>>>
>>> Thanks!
>>>
>> ------------------------------------------------------------------------------
>>> Learn how Oracle Real Application Clusters (RAC) One Node allows
>> customers
>>> to consolidate database storage, standardize their database environment,
>> and,
>>> should the need arise, upgrade to a full multi-node Oracle RAC database
>>> without downtime or disruption
>>> http://p.sf.net/sfu/oracle-sfdevnl
>>> _______________________________________________
>>> WiX-users mailing list
>>> WiX-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>> --
>> Leonidas Spyropoulos
>> Formicary - delivering quality financial technology solutions
>> www.formicary.net
>>
>>
>>
>> ----------------------------------------------------------------------------
>> This message is confidential and may be privileged. It is intended solely
>> for
>> the named addressee. If you are not the intended recipient, please inform
>> us.
>> Any unauthorised dissemination, distribution or copying hereof is
>> prohibited.
>>
>> Formicary Limited registered office in England and Wales, address 1 Taillar
>> Road, Hedon, East Yorkshire HU12 8GU, registration number 3894343, VAT
>> number
>> 747644304, does not guarantee that the integrity of this communication has
>> been
>> maintained nor that this communication is free of viruses, interceptions or
>> interference.
>>
>> ----------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
>> to consolidate database storage, standardize their database environment,
>> and,
>> should the need arise, upgrade to a full multi-node Oracle RAC database
>> without downtime or disruption
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


-- 
Leonidas Spyropoulos
Formicary - delivering quality financial technology solutions
www.formicary.net
o : +44 (0)20 7920 7100

----------------------------------------------------------------------------
This message is confidential and may be privileged. It is intended solely for
the named addressee. If you are not the intended recipient, please inform us.
Any unauthorised dissemination, distribution or copying hereof is prohibited.

Formicary Limited registered office in England and Wales, address 1 Taillar
Road, Hedon, East Yorkshire HU12 8GU, registration number 3894343, VAT number
747644304, does not guarantee that the integrity of this communication has been
maintained nor that this communication is free of viruses, interceptions or
interference.
----------------------------------------------------------------------------

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to