forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Can't load a dll

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Wed Aug 08, 2007 11:20 am    Post subject: Can't load a dll Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Aug 08, 2007 12:08 pm    Post subject: Reply with quote

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 Question 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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Thu Aug 09, 2007 4:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Aug 09, 2007 4:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group