Summary
Redefining Win32 APIs in InstallScript results in compiling errors. Discussion of possible workarounds.Symptoms
A compile error similar to the following occurs:
<PATH to setup.rul>(line number): error C8014: 'FILETIME': identifier already defined.
Cause
If an element is redefined that is defined in winapi.h or winsub.h, a redefinition error occurs during compilation. In the example below, InstallShield already defines FILETIME, and therefore, the following code causes a compilation error.
typedef FILETIME
begin
int dwLowDateTime;
int dwHighDateTime;
end;
FILETIME ft;
FILETIME pointer pftValue;
Resolution
To resolve this behavior, comment out the redefinition. This reduces the amount of scripting needed as InstallShield defines this, and other common Win32 structures, in the winapi.h file.
If this redefinition must exist, and commenting out the code is not an option, modify the code as follows:
#ifdef FILETIME
#undef FILETIME
typedef FILETIME
begin
int dwLowDateTime;
int dwHighDateTime;
end;
#endif
This code detects if 'FILETIME' is already defined and, if so, undefines it and redefines it according to your specifications. Using this method allows you to redefine this as needed, while avoiding any errors or warnings during compilation.
Additional Information
For additional information on undefining and redefining structures using the #ifdef and #undef statements, see the InstallShield Help Library topics #ifdef and #ifndef and #undef.
For more information on data structures and the typedef keyword, see the InstallShield Help Library topic Data Structures.
Related Articles
Spider Compile error when using 64bit version of Excel 5Number of Views Flexera One SaaS Manager error: Org structures not enabled, please contact support for assistance 13Number of Views Where can you find definitions for the error codes "exited with status xx signal = yyy"? 9Number of Views "libpthread.lib" Linked with "libcmt.lib" Causing Conflicts in FlexNet Publisher Toolkit Builds Compiled with /MD Flag 10Number of Views SQL for "Over purchased licenses" and "Unlicensed installs" widgets may cause arithmetic overflow exception, with error sh… 4Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago