[wix-users] How to use WcaReadStringFromCaData?

Edwin Castro egcastr at gmail.com
Wed Jul 19 16:26:12 PDT 2017


Normally you'd use WcaWriteStringToCaData (and it's siblings) to create
your custom action data in an immediate custom action. If you're creating
the custom action through a different mechanism then you'll want to ensure
the correct separator is used somehow.

--
Edwin G. Castro


On Wed, Jul 19, 2017 at 1:02 PM, Joel Budreau <joel.budreau at gmail.com>
wrote:

> More Info:
>
> Today I pass ca data like "param1;param2", so I have added code similar to
> this in my custom action:
>
>    // Replace ";" delimiters with wcautil-friendly 'magic' delimiter
>    WCHAR delim[] = { MAGIC_MULTISZ_DELIM, 0 }; // magic char followed by
> NULL terminator
>    hr = StrReplaceStringAll(&pwzCaData, L";", delim);
>    ExitOnFailure(hr, "Failed to replace CustomActionData delimiters");
>    pwz = pwzCaData;
>    hr = WcaReadStringFromCaData(&pwz, &pwzParam1);
>    ExitOnFailure(hr, "Failed to parse Param1.");
>    hr = WcaReadStringFromCaData(&pwz, &pwzParam2);
>    ExitOnFailure(hr, "Failed to parse Param2.");
>
> This seems to defeat the purpose of using the 'magic' character in the
> first place, right?
>
> - Joel
>
> On Wed, Jul 19, 2017 at 12:39 PM, Joel Budreau <joel.budreau at gmail.com>
> wrote:
>
> > I'm looking to write a deferred custom action that parses the
> > CustomActionData property by using wcautil's WcaReadStringFromCaData()
> > function. I populate the CustomActionData property through a Type51
> custom
> > action in the MSI.
> > - How do I go about changing the delimiter from MAGIC_MULTISZ_DELIM to
> > something else?
> > - Do I author the {0x80,0} character inside my wix source?
> > - Am I supposed to be authoring the CustomActionData through another
> > immediate custom action??
> >
> > Thanks,
> > Joel
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list