Re: Why do Services and Console apps not use App Paths Key?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Phill_H (anonymous_at_discussions.microsoft.com)
Date: 02/19/04


Date: Thu, 19 Feb 2004 13:55:19 -0800


>-----Original Message-----
>AppPaths is a feature of ShellExecute/Ex. So if somebody
uses raw
>CreateProcess then AppPaths is not consulted.

Thanks. So the Service Control Mgr must be calling Create
Process to start my service. Also when I create a
shortcut to a Console app that must use Create Process
rather than ShellExecute, as in both cases the apps do not
use App Paths key to load DLLs whereas a shortcut to a MFC
app does use the App Paths Path to load DLLs. If this is
the distinction then it sounds like there is no way to
change the applications to resolve this problem. It looks
like the only recourse is to copy the DLLs to multiple
locations (in each apps lanch folder) or put the DLLs at
some other folder in the LoadLibrary search tree. This
whole issue started when we read a MS document that said
to stop putting these DLLs in <WINSYSDIR> and put them
under <CommonFiles>\CompanyName, but then the non-Win32GUI
applications can't find that location. Alternativly it
was suggested that copies of the many DLLs be put in each
executable's folder. This would seem to conflict with the
MSI unique WIC rule, where the same "resource" should not
be in more than one windows Installer Component and each
WIC can be only targeted to a single destination.

Thanks for the info. Any thoughts on the best way to
address this delima? Also I noticed that the Linker can
set an "Image Version" but there is very little
documentation on how the system uses this value. So even
with the above concerns, I am also struggling to
understand the behavior of LoadLibrary when a DLL of same
name is in memory, but the binnary image is different from
the one another app is trying to load. Does it load the
new one or map to the existing one, and would setting the
Image Version prevent the later.



Relevant Pages

  • Re: Why do Services and Console apps not use App Paths Key?
    ... > use App Paths key to load DLLs whereas a shortcut to a MFC ... > some other folder in the LoadLibrary search tree. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: private Deploy of SQL CE 3.1
    ... my app is always a newer one than whatever is in ROM, ... device uses 3.1 dlls. ... All was fine as long as my desktop app was ... I also found that in Platform builder when I removed "sql mobile" ...
    (microsoft.public.sqlserver.ce)
  • Re: private Deploy of SQL CE 3.1
    ... my app is always a newer one than whatever is in ROM, ... device uses 3.1 dlls. ... All was fine as long as my desktop app was ... I also found that in Platform builder when I removed "sql mobile" ...
    (microsoft.public.sqlserver.ce)
  • Re: private Deploy of SQL CE 3.1
    ... my app is always a newer one than whatever is in ROM, ... device uses 3.1 dlls. ... All was fine as long as my desktop app was ... I privately deploy my SqlCe DLLs with my apps, ...
    (microsoft.public.sqlserver.ce)
  • Re: private Deploy of SQL CE 3.1
    ... Windows XP and Windows CE give same Sort Key ... my app is always a newer one than whatever is in ROM, ... device uses 3.1 dlls. ... I also found that in Platform builder when I removed "sql mobile" ...
    (microsoft.public.sqlserver.ce)