PRB: Relocating OLE32.DLL Causes an Access Violation

ID: Q193430


The information in this article applies to:
  • Microsoft Windows 95
  • Microsoft Windows 98
  • Microsoft Windows NT 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 kbNTOS400 kbWinOS95 kbWinOS98
Version : WINDOWS:95; winnt:4.0
Platform : WINDOWS winnt
Issue type : kbprb


Last Reviewed: January 10, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.