Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuietExec function prototype breaking change to 3.10? #4852

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

QuietExec function prototype breaking change to 3.10? #4852

wixbot opened this issue Aug 6, 2015 · 5 comments
Assignees
Milestone

Comments

@wixbot
Copy link

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
Copy link
Author

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
Copy link
Author

wixbot commented Aug 11, 2015

AssignedTo set to mikegc

@wixbot
Copy link
Author

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
Copy link
Author

wixbot commented Aug 20, 2015

New function is now renamed to QuietExecEx

Originally posted by mike-gc

@wixbot
Copy link
Author

wixbot commented Aug 20, 2015

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

@wixbot wixbot added this to the v3.10 milestone Dec 20, 2015
@wixbot wixbot closed this as completed Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants