Re: How to set up search path in MFC?

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



Note that app paths only works for processes launched via ShellExecute, not CreateProcess,
so there is a certain risk in depending upon its behavior.
joe

On Fri, 11 Aug 2006 20:29:02 -0400, "Pete Delgado" <Pete@xxxxxxxxx> wrote:


"kathy" <yqin_99@xxxxxxxxx> wrote in message
news:1155306635.879119.312160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Under my application folder, there is folder called Driver which has
xxx.dll in it.

c:\application\Driver

My application run in application folder.

How to setup the search path in my application so that it can find the
xxx.dll in Driver folder?


There are several things that you can do. However, the best/easiest is to
create an app_paths entry for your executable on the system with the
installation program for your product. In this manner, the installation of
your application will not negatively affect other programs installed on the
system as is possible if you modify the global or user path.

Another good option is to use side-by-side DLLs which are described in the
MSDN documentation. Take a look for the article entitled "The End of DLL
Hell".

Another option that others have stated here is to modify the global or user
path environment variable. This is usually not recommended because it
alters the environment in which all applications run and can lead to
dependancy issues.

Lastly, you can modify your application to use explicit runtime linkage.
This is usually not recommended for the general case that you describe, but
it can be useful in certain circumstances.

-Pete

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: How to set up search path in MFC?
    ... My application run in application folder. ... installation program for your product. ... Another good option is to use side-by-side DLLs which are described in the ... Another option that others have stated here is to modify the global or user ...
    (microsoft.public.vc.mfc)
  • Re: Re: they are ranging such as the suburb now, wont urge blades later
    ... modify them? ... Where did Zebediah top the review to the inclined ... fit might send some inappropriate pans. ... emphasizing in conjunction with cautious, minus wrong, depending on ...
    (sci.crypt)
  • Re: When BT do FTTC ?
    ... connection charge. ... Maybe not, depending. ... copper from an exchange to a given location. ... run out of copper pairs on new installation why are likely to use that ...
    (uk.telecom.broadband)
  • Re: Forgotten Password
    ... Simply log in using the built-in Administrator account and modify the desired accountand use Start> Run> "control userpasswords2" to modify the desired account. ... the only way to log into the Administrator account of WinXP Home is to reboot into Safe Mode. ... After backing up any data you wish to transfer to the new OS installation, and after downloading all of the WinXP-specific device drivers from the manufacturer's web site and burning them to a CD, simply boot from the WinXP installation CD. ...
    (microsoft.public.windowsxp.general)
  • Re: Dimension Modify
    ... While working at a customer site and using 2008, I am unable to use arithmetic symbols to modify the existing value of a dimension while in the sketch mode with the Modify box open. ... At this installation, I receive a "Enter a value...." ... makes it easy to fix crap.. ...
    (comp.cad.solidworks)