The information in this article applies to:
SYMPTOMSThe Unicode version of CreateProcess() attempts to modify the lpCommandLine parameter, causing an access violation when compiled with Visual C++ 6.0 or other compilers that put string literals in read-only memory. For example, the following CreateProcess() command line fails when compiled as Unicode with Visual C++ 6.0:
The ANSI version of CreateProcess() API does not exhibit the problem because internally it makes a read/write Unicode copy of the lpCommandLine parameter, and passes that to CreateProcessW.
CAUSEThe cause of the problem is the default project setting include /ZI flag, which enables Edit and Continue debug information; this flag implies the /GF flag, which enables read-only string pooling. RESOLUTION
It is possible to add the /Zi flag to your project options to eliminate the problem. This cancels the read-only access to the string pool, but still allows debug symbols to be generated.
STATUSThis behavior is by design. See the documentation for CreateProcess(). REFERENCESFor additional information, please see the following article in the Microsoft Knowledge Base: Q198477 PRB: Use of /ZI May Cause Access Violation Additional query words:
Keywords : kbAPI kbKernBase kbSDKPlatform kbSDKWin32 kbVC600 |
Last Reviewed: May 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |