Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to load dll into vbscript?

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,55185
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> How to load dll into vbscript?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to load dll into vbscript? - 1/10/2008 4:49:06 AM   
  rahul_k

 

Posts: 2
Score: 0
Joined: 1/9/2008
Status: offline
Hello Team,
I want to load  a dll functions into  script (both vbscript and javascript) for digital signature verification.
I have tried this using CAPICOM dll and it woks well.
I have a custom DLL which has got the  functions which can be used for digital signature creation/verification.
For this i m referring to a vb projects(.bas )in which there are certain  functions are called like
SetErrorMode and LoadLibrary ..
thses functions are from dll kernel32.dll i want to call the same functions into my vbscript and javascript
My first doubt is can we load the dll (kernel32 or so)  into vbscript and javascript embeded within an html page.
and make use of its routine?
Or it is possible only into vbscript and not in javascript??
The functions in my vb projects are something like

OriginalErrorValue = SetErrorMode(SEM_NOOPENFILEERRORBOX Or SEM_FAILCRITICALERRORS)
hInst = LoadLibrary(DllName$)
OriginalErrorValue = SetErrorMode(OriginalErrorValue)

Regards,
Sunita.
 
 
Post #: 1
 
 RE: How to load dll into vbscript? - 1/11/2008 12:05:03 AM   
  centauricw

 

Posts: 10
Score: 0
Joined: 2/20/2006
Status: offline
VBScript only supports COM utilities that implement the IUnknown interface for automation.  You can't import functions from a regular non-COM DLL in VBScript.

(in reply to rahul_k)
 
 
Post #: 2
 
 RE: How to load dll into vbscript? - 1/14/2008 9:53:35 AM   
  Rischip


Posts: 341
Score: 2
Joined: 3/26/2007
Status: online
Check out these posts. This should do what you need, but will require you to install the .net runtime for you to compile the example.
Once you have the activex control compiled and registered then you should be able to do what you are trying to do. I have verified that it works, but it may only work with managed code. I have not tested that yet.

http://www.visualbasicscript.com/m_50768/mpage_1/key_jscript/tm.htm#50768

< Message edited by Rischip -- 1/14/2008 10:02:43 AM >


_____________________________

Rischip
Author of - The Grim Linker

(in reply to centauricw)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> How to load dll into vbscript? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts