[wix-users] How to use WcaReadStringFromCaData?

Joel Budreau joel.budreau at gmail.com
Wed Jul 19 13:02:38 PDT 2017


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
>



More information about the wix-users mailing list