BUG: AppPaths Not Set in Environment of Launched Application

Last reviewed: March 14, 1996
Article ID: Q148375
The information in this article applies to:
  • Microsoft OLE libraries included with Microsoft Windows 95

SYMPTOMS

When an application is launched by OLE in response to CoCreateInstance or OleCreate, its environment block will not contain the application-specific paths that it may have registered using the AppPaths registry entry. Consequently when the application is loaded by OLE, it will not be able to load any DLLs in these paths unless these paths are also part of the system path.

CAUSE

An application can specify application specific paths by using the AppPaths registry entry in Windows 95. An application typically uses AppPaths to specify the location of shared DLLs. OLE uses CreateProcess to launch an application without setting the lpEnvironment parameter to an environment block that contains the application specific path. Therefore when the application is launched by OLE, it is prevented from finding the shared DLLs if the paths to those DLLs are specified in AppPaths. The shell launches applications using ShellExecute, which calls CreateProcess after setting the environment block for the application using AppPaths. Consequently, the application will be able to find the DLLs when it is lauched by the shell.

WORKAROUND

Put the shared DLLs in a directory that is in the system path.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: OLE2 2 2.0 2.00 AppPath App Path Paths
KBCategory: kbprg kbbuglist
KBSubcategory: LeTwoArc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 14, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.