BUG: SetupGetFileCompressionInfo w/LocalFree Causes Access Error (189765)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 4.0
This article was previously published under Q189765 SYMPTOMS
When 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.
CAUSE
The 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.
RESOLUTION
The 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.
STATUS
Microsoft 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.
Modification Type: | Major | Last Reviewed: | 10/27/2003 |
---|
Keywords: | kbAPI kbbug kbKernBase kbMemory kbpending KB189765 |
---|
|