03-12-2008, 7:44
|
Maen Hasan

Joined on 08-05-2004
Posts 1,748
|
Re: Yet another PDF Capability Required post
|
 
 
|
|
|
John,
Normally, you don't need to change the current directory. You can put the DLL in one of 3 places: 1. The application EXE's folder 2. A folder in the system PATH. 3. The SYSTEM32 folder (special case of 2 above)
However, in your case, there is no application EXE and you don't want to put it on the SYSTEM32 folder. Is it possible to add the DLL location to the system's PATH environment variable? If not, you will need a workaround, such as changing the Current Dir, or some other workaround if you don't like this one.
In general, unless some other part of your code relies on the current directory, for example to load or save files without specifying absolute path, changing the current directory should not cause any problems. If you are not sure, you can always reset it to the previous value after you load the DLL. The code will be something like this:
Dim oldDir As String oldDir = CurDir() ChDir(.. location of PDFDLL32.DLL ..) .. do PDF initializing, such as load any PDF page .. ChDir(oldDir)
Again, if you don't want this workaround, let me know and I will think of another one.
Thanks, Maen Badwan LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|