Re: [WiX-users] Writing a C++ Custom Action Project

2015-03-13 Thread Nir Bar
In C++ to test the C# equivalent of string.IsNullOrEmpty() you should do: if(( p == NULL) || (*p == NULL)) To sprintf a wide string you should use "%ls" Note that creating a file during an immediate custom action is against Windows Installer methodology. The correct way should consist of 3 custom

Re: [WiX-users] Writing a C++ Custom Action Project

2015-03-13 Thread Jeremy Farrell
Your checks for an empty string are wrong - constructs like ip == L"" need to be *ip == 0 or similar. Check the documentation for the sprintf() implementation you're using. In Standard C %s is for a normal character string but you're using it for wide character strings - that would e

Re: [WiX-users] Writing a C++ Custom Action Project

2015-03-13 Thread Sarvagya Pant
Hi Stephan, Thanks for your response. I have added the local variable above WcaInitialize. On Fri, Mar 13, 2015 at 11:30 PM, Tunney, Stephen wrote: > A general rule with C++ CAs that I follow: Put ALL of your local/stack > variables above the WcaInitialize call. I run into weird behaviour > (c

Re: [WiX-users] Writing a C++ Custom Action Project

2015-03-13 Thread Tunney, Stephen
A general rule with C++ CAs that I follow: Put ALL of your local/stack variables above the WcaInitialize call. I run into weird behaviour (crashes, access violations, etc.) if I don't. This is true when running in VS2010 and VS2013 compilers. -Original Message- From: Sarvagya Pant [m