PRB: Relocating OLE32.DLL Causes an Access Violation (193430)



The information in this article applies to:

  • Microsoft Windows 95
  • Microsoft Windows 98
  • Microsoft Windows NT Server 4.0
  • Microsoft Windows NT Workstation 4.0

This article was previously published under Q193430

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."

Modification Type:MinorLast Reviewed:12/16/2004
Keywords:kbprb KB193430