| View previous topic :: View next topic |
| Author |
Message |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Wed Aug 08, 2007 11:20 am Post subject: Can't load a dll |
|
|
Hi
I've put this section of code at the beginning of my script to find a
DLL and load it. It won't work! I get an error 28 when it tries to load
the DLL from the @path(%0).
| Code: |
rem check for the MIDI dll in EGT directory or System32 directory
if @file(@path(%0)vdsdll.dll)
external @path(%0)vdsdll.dll,Public Freeware Key|90257236
elsif @file(@windir(s)\vdsdll.dll)
external @windir(s)\vdsdll.dll,Public Freeware Key|90257236
else
warn VDSDLL.DLL not found in @path(%0) OR @windir(s)
stop
end
|
Any ideas?
Thanks
David... |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Aug 08, 2007 12:08 pm Post subject: |
|
|
David,
You should not need to do that. The External command will automaticly look in the current directory and then search the directories that are specified in the %PATH% environment variable.
Anyway if you really need to do this you will need to put the path in a variable and pass the variable to the external command. I don't know why but that is the only way to make your code work I don't think that the parameters for the external command are being parsed for other functions before being used.
| Code: |
if @file(@path(%0)vdsdll.dll)
%%Path = @path(%0)vdsdll.dll
external %%Path,Public Freeware Key|90257236
elsif @file(@windir(S)\vdsdll.dll)
%%Path = @windir(S)\vdsdll.dll
external %%Path,Public Freeware Key|90257236
else
warn VDSDLL.DLL not found in @path(%0) OR @windir(s)
stop
end
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Thu Aug 09, 2007 4:05 pm Post subject: |
|
|
Thanks for the info I will change my script accordingly!
12:08 pm !!!!! You should be in bed, I fall into bed
by 10:30 pm.
Thanks
David... |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Aug 09, 2007 4:27 pm Post subject: |
|
|
| dmonckton wrote: | 12:08 pm !!!!! You should be in bed, I fall into bed
by 10:30 pm.
Thanks
David... |
Hehe... I am in the US so it was durring the day when I posted... My time zone is GMT -5 Hours.... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|