Microsoft KB Archive/193430

{|
 * width="100%"|

PRB: Relocating OLE32.DLL Causes an Access Violation

 * }

Q193430

-

The information in this article applies to:


 * Microsoft Windows 95
 * Microsoft Windows 98
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0

-

SYMPTOMS
OLE32.dll expects to be loaded at a specified base address in a process. If it is loaded at a different base address, the process might crash unexpectedly. Also, under Windows NT 4.0, storage APIs (such as StgCreateDocFile) return error 80030110 (STG_E_BADBASEADDRESS).

RESOLUTION
At present, there is no way to work around this problem. However, this is no longer a requirement under Windows NT 5.0.

STATUS
This behavior is by design in Windows NT 4.0, Windows 95, and Windows 98. Most applications will not run into this problem.

MORE INFORMATION
You need to ensure that OLE32.dll is not relocated. There are two ways to achieve this:

 You should avoid dynamically linking to OLE32.dll in your applications.  You should make sure that your applications do not base their binaries (.exes or .dlls) at the same base address as OLE32.dll. You can obtain the base address of OLE32.dll by using the following command: link /dump /headers ole32.dll

OPTIONAL HEADER VALUES

....

77B20000 image base

.... 

NOTE: In the output of this command look for "image base."

Additional query words:

Keywords : kbole kbOSWinNT400 kbOSWin95 kbOSWin98

Issue type : kbprb

Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT400xsearch kbWinNTSsearch kbWinNTS400xsearch kbWinNTS400 kbWin95search kbWin98search kbZNotKeyword3 kbWin98