The information in this article applies to:
SYMPTOMSWhen you are freeing or resizing a buffer that is pointed to by the ActualSourceFileName parameter of SetupGetFileCompressionInfo, the LocalFree function or any of the other default process heap functions (including LocalReAlloc, GlobalFree, and GlobalRealloc) might cause an Access Violation error in an application. CAUSEThe Setup API functions do not use the process's default heap to manage memory. If you pass the ActualSourceFileName buffer pointer to LocalFree, it will eventually corrupt the process's default heap. RESOLUTIONThe SetupAPI.dll library exports a function named MyFree(). This function frees the memory that has been allocated by SetupGetFileCompressionInfo. To resolve this problem, dynamically link your application to MyFree in SetupAPI.dll and use it to free the memory. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
The second parameter of SetupGetFileCompressionInfo() is the address of an
LPSTR variable. If the function succeeds, SetupGetFileCompressionInfo()
returns the full path of the file that was loaded. The documentation
incorrectly states that you should free this string with a call to
LocalFree(). Instead, the application should use MyFree().
If the call to LocalFree is causing an Access Violation, you should solve
the problem by using MyFree().
Additional query words: 4.0 LocalAlloc GlobalAlloc crash gpf fault
Keywords : kbAPI kbKernBase kbMemory kbDSupport kbGrpKernBase |
Last Reviewed: December 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |