Call DLL -- question re: specifying bool parameters
Posted: Fri Feb 06, 2009 6:39 pm
I tried using a call to kernel32.dll's CopyFileA function, based on sample code in forum topic http://www.installaware.com/forums/viewtopic.php?t=1372. But the third parameter, a bool, is set to FALSE in this example, which should allow the target file to be overwritten if it exists, according to http://msdn.microsoft.com/en-us/library ... S.85).aspx.
Yet when I set the third parameter (as a bool) to FALSE, the function will not overwrite an existing file.
I suspect that bool must be 0 for FALSE, and 1 (or non-zero) for TRUE. But I cannot find any documentation or forum posts that mention how to set a value for a bool parameter in Call DLL. Please provide reference information for specifying parameters (especially bool type parameters) when using Call DLL.
Thanks,
- Michael
Yet when I set the third parameter (as a bool) to FALSE, the function will not overwrite an existing file.
I suspect that bool must be 0 for FALSE, and 1 (or non-zero) for TRUE. But I cannot find any documentation or forum posts that mention how to set a value for a bool parameter in Call DLL. Please provide reference information for specifying parameters (especially bool type parameters) when using Call DLL.
Thanks,
- Michael