Microsoft KB Archive/148375

= FIX: AppPaths Not Set in Environment of Launched Application =

Article ID: 148375

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft OLE 4.0, when used with:
 * Microsoft Windows 95

-



This article was previously published under Q148375



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 launched by the shell.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem was corrected in Windows 2000.



MORE INFORMATION
To work around this problem, put the shared DLLs in a directory that is in the system path.

Additional query words: OLE2 2 2.0 2.00 AppPath App Path Paths kbbuglist

Keywords: kbbug kbfix kboswin2000fix KB148375

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.