QuietExec function prototype breaking change to 3.10? #4852

Closed
wixbot opened this Issue Aug 6, 2015 · 5 comments

Projects

None yet

2 participants

@wixbot
Collaborator
wixbot commented Aug 6, 2015

My CA (in my WixExtension) calls QuietExec, however after installing Wix 3.10.0.1823 I get a conpile error which reports that QuietExec does not take two arguments. Generally I would avoid launching a exe from a CA, but in this situation I need to use a Windows system tool, for which a programing API is not available. The CA was implemented a couple of years ago when using wix 3.7 and has been stable until this change.)

wcautil.h for 3.10.0.1502 has:
HRESULT WIXAPI QuietExec(
__inout_z LPWSTR wzCommand,
__in DWORD dwTimeout
);

wcautil.h for 3.10.0.1823 has:
HRESULT WIXAPI QuietExec(
__inout_z LPWSTR wzCommand,
__in DWORD dwTimeout,
__in BOOL fLogCommand,
__in BOOL fLogOutput
);

I did not recall hearing about a breaking change within 3.10.0.1823 relative to earlier builds. When I compare the implementation between 1502 and 1823 if seems like this change was made to allow a particular call to QuietExec to disable logging even it was generally enabled. Is this a situation where the use of optional arguments would avoid breaking existing code?

HRESULT WIXAPI QuietExec(
__inout_z LPWSTR wzCommand,
__in DWORD dwTimeout,
__in BOOL fLogCommand = TRUE,
__in BOOL fLogOutput = TRUE
);
(While I subscribed to the new lists, I have not figured out how to view threads or search the new lists, so I don't know if there is already a discussion on this issue..)

Originally opened by phogland

@wixbot
Collaborator
wixbot commented Aug 6, 2015

Sorry the last example of using optional arguments is confusing due to thinking in C# while writing about Cpp

Originally posted by phogland

@wixbot
Collaborator
wixbot commented Aug 11, 2015

AssignedTo set to mikegc

@wixbot
Collaborator
wixbot commented Aug 11, 2015

Technically, all the DUtil functions are C linkage so we can't use default arguments. (Even though most people compile their C with C++ compilers.) Still, it's easy to create wrapper functions and keep all languages happy.

@wixbot
Collaborator
wixbot commented Aug 20, 2015

New function is now renamed to QuietExecEx

Originally posted by mike-gc

@wixbot
Collaborator
wixbot commented Aug 20, 2015

Originally changed by mike-gc
Resolution set to Fixed
Status changed from Open to Resolved

@wixbot wixbot added bug sdk labels Dec 20, 2015
@Mike-GC Mike-GC was assigned by wixbot Dec 20, 2015
@wixbot wixbot added this to the v3.10 milestone Dec 20, 2015
@wixbot wixbot closed this Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment