troubleshooting Question

windows code example how to change path variable for current process

Avatar of zmau
zmau asked on
Windows OS* path* LoadLibrary
10 Comments1 Solution19 ViewsLast Modified:
Hi all,
Basically I am looking for a code example to change the "path" for the current process (so it will find the correct DLL).
Can anyone give such a code example ?

Background for the curious people.
I am working "inside" a 32 bit program - quite an OLD program (it's a general utility which enable you to run "sub programs"). We shall call this program "EnvironmentProgram.exe".
When we are running in a 32 bit windows - everything is fine.
But when we are running in a 64 bit windows (using wow64) , it turns out that this system "fails" to load the "correct 32 bit DLL", and finds the "incorrect 64 bit DLL" - which fails to load obviously. This problem occurs because EnvironmentProgram.exe looks for DLLs according to the order in the "path". Basically, I want to remove one element from the path, so it would not fail.

Thanks
zmau
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros