1. open_dll(st) not working as expected

In the documentation is states that: "st can be a relative or absolute file name. Windows will use the normal search path for locating .dll files"

I have tried using an absolute path such as:

open_dll("C:\\Program Files\\Some Program\\some_dll.dll") 

without success. If I use open_dll("some_dll.dll") and I have the PATH environment variable set it will work as expected

Should the absolute path work or am I not understanding the documentation. Note: the dll does have dependencies if that matters...

thanks -casey

new topic     » topic index » view message » categorize

2. Re: open_dll(st) not working as expected

cp said...

In the documentation is states that: "st can be a relative or absolute file name. Windows will use the normal search path for locating .dll files"

I have tried using an absolute path such as:

open_dll("C:\\Program Files\\Some Program\\some_dll.dll") 

without success. If I use open_dll("some_dll.dll") and I have the PATH environment variable set it will work as expected

Should the absolute path work or am I not understanding the documentation. Note: the dll does have dependencies if that matters...

thanks -casey

It should work. However, if the dependencies are also in the "Some Program" directory then you either need to have them in the normla search path or open the dependencies up first. Otherwise, open_dll() will call LoadLibrary() which attempts to load the dll, sees the dependencies, look for them, fail to find them, and give up.

new topic     » goto parent     » topic index » view message » categorize

3. Re: open_dll(st) not working as expected

Could you shed some light on best practice in interacting with dll's here. I'm new to the topic. The use case is: Customers will be installing a (Eu) compiled exe that requires functions from a single dll that already exists on their machine (from installation of a different product). That dll could be in different locations depending on where the customer installed it and that dll has multiple dependencies most of/all of which are in the same location or in the normal search path. I was wanting to just have customer set the system PATH environment variable to point to the dll's location but there are some PATH/dll conflicts with their application that make this impossible so I'm looking for new strategies.

So it sounds like one option is to call open_dll() for each of the dependencies and then for the primary dll. I could use absolute path/file names assuming I look this up from the registry or something. Does the order of opening the dependencies matter other than for the main dll I want should be last?

thanks -Casey

new topic     » goto parent     » topic index » view message » categorize

4. Re: open_dll(st) not working as expected

cp said...

Could you shed some light on best practice in interacting with dll's here. I'm new to the topic. The use case is: Customers will be installing a (Eu) compiled exe that requires functions from a single dll that already exists on their machine (from installation of a different product). That dll could be in different locations depending on where the customer installed it and that dll has multiple dependencies most of/all of which are in the same location or in the normal search path. I was wanting to just have customer set the system PATH environment variable to point to the dll's location but there are some PATH/dll conflicts with their application that make this impossible so I'm looking for new strategies.

So it sounds like one option is to call open_dll() for each of the dependencies and then for the primary dll. I could use absolute path/file names assuming I look this up from the registry or something. Does the order of opening the dependencies matter other than for the main dll I want should be last?

thanks -Casey

Unfortunately, it depends. The order can matter, if some of those dependencies depend on other of those dependencies, and so on. With some libraries, this becomes a very complex graph. Every case is different.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu