Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Tue, 14 Jun 2005 11:10:43 -0700,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


How to call a DLL function on Client   
Using vb script how can you call a dll function from the client browser (the
dll is resident on the client pc) in vb code you would declare function and
set the entry point into the dll and the parameters.  Is there an equivilant
in vbscript.  I am trying to do the following

MyFunctions.dll
contains
openConnection(wHand as integer, Name as string) as integer
closeConnection(wHand as integer) as integer
..
..
..

in vbscript I want to call openConnection

dim ReturnStatus as integer, lHand as integer, ConName as string
ConName = "Test"
ReturnStatus = openConnection(lHand, ConName)

What needs to be done to makes this call?  Any help would be appreciated.

Remove Spa from e-mail to use e-mail address
date: Tue, 14 Jun 2005 11:10:43 -0700   author:   BM

Re: How to call a DLL function on Client   
>What needs to be done to makes this call?

The right security level, a registered functioning library & the script.

Dim ReturnStatus, lHand, ConName
Dim oConn
    Set oConn = CreateObject( "CLASSSTRING.HERE" )
    ConName = "Test"
    ReturnStatus = oConn.openConnection(lHand, ConName)
'DO SOMETHING WITH oConn
    oConn.closeConnection( lHand )
    Set oConn = Nothing


Nic Roche

"BM"  wrote in message 
news:11au73f9kh2ap82@corp.supernews.com...
> Using vb script how can you call a dll function from the client browser 
> (the
> dll is resident on the client pc) in vb code you would declare function 
> and
> set the entry point into the dll and the parameters.  Is there an 
> equivilant
> in vbscript.  I am trying to do the following
>
> MyFunctions.dll
> contains
> openConnection(wHand as integer, Name as string) as integer
> closeConnection(wHand as integer) as integer
> .
> .
> .
>
> in vbscript I want to call openConnection
>
> dim ReturnStatus as integer, lHand as integer, ConName as string
> ConName = "Test"
> ReturnStatus = openConnection(lHand, ConName)
>
> What needs to be done to makes this call?  Any help would be appreciated.
>
> Remove Spa from e-mail to use e-mail address
>
>
>
date: Wed, 15 Jun 2005 07:44:49 +1000   author:   Nic Roche

Re: How to call a DLL function on Client   
Thank you for the response the only clarification I need is --
CLASSSTRING.HERE

If the dll name is acbsi.dll and the entry point is UtilConnect
would the class string be  acbsi.UtilConnect ?

I did not write the dll it is a commercial package installed on the pc.  I
have the calling templates as in UtilConnect(lHand as Integer, ConName as
string) but that is it.  If the class string is something different is there
a way to obtain it from the dll or some way to identify it.  Thank you for
your help


"Nic Roche"  wrote in message
news:O3ucMmScFHA.1504@TK2MSFTNGP15.phx.gbl...
> >What needs to be done to makes this call?
>
> The right security level, a registered functioning library & the script.
>
> Dim ReturnStatus, lHand, ConName
> Dim oConn
>     Set oConn = CreateObject( "CLASSSTRING.HERE" )
>     ConName = "Test"
>     ReturnStatus = oConn.openConnection(lHand, ConName)
> 'DO SOMETHING WITH oConn
>     oConn.closeConnection( lHand )
>     Set oConn = Nothing
>
>
> Nic Roche
>
> "BM"  wrote in message
> news:11au73f9kh2ap82@corp.supernews.com...
> > Using vb script how can you call a dll function from the client browser
> > (the
> > dll is resident on the client pc) in vb code you would declare function
> > and
> > set the entry point into the dll and the parameters.  Is there an
> > equivilant
> > in vbscript.  I am trying to do the following
> >
> > MyFunctions.dll
> > contains
> > openConnection(wHand as integer, Name as string) as integer
> > closeConnection(wHand as integer) as integer
> > .
> > .
> > .
> >
> > in vbscript I want to call openConnection
> >
> > dim ReturnStatus as integer, lHand as integer, ConName as string
> > ConName = "Test"
> > ReturnStatus = openConnection(lHand, ConName)
> >
> > What needs to be done to makes this call?  Any help would be
appreciated.
> >
> > Remove Spa from e-mail to use e-mail address
> >
> >
> >
>
>
date: Tue, 14 Jun 2005 15:18:52 -0700   author:   BM

Re: How to call a DLL function on Client   
> If the dll name is acbsi.dll and the entry point is UtilConnect
> would the class string be  acbsi.UtilConnect ?

LibraryName.ClassName

> If the class string is something different is there
> a way to obtain it from the dll or some way to identify it.

Register the library
Do a search on the DLL name in the registry
There will be a (sibling) key ProgID.
The default value will be the classstring.


Nic Roche


"BM"  wrote in message 
news:11aulktlsnpqi99@corp.supernews.com...
> Thank you for the response the only clarification I need is --
> CLASSSTRING.HERE
>
> If the dll name is acbsi.dll and the entry point is UtilConnect
> would the class string be  acbsi.UtilConnect ?
>
> I did not write the dll it is a commercial package installed on the pc.  I
> have the calling templates as in UtilConnect(lHand as Integer, ConName as
> string) but that is it.  If the class string is something different is 
> there
> a way to obtain it from the dll or some way to identify it.  Thank you for
> your help
>
>
> "Nic Roche"  wrote in message
> news:O3ucMmScFHA.1504@TK2MSFTNGP15.phx.gbl...
>> >What needs to be done to makes this call?
>>
>> The right security level, a registered functioning library & the script.
>>
>> Dim ReturnStatus, lHand, ConName
>> Dim oConn
>>     Set oConn = CreateObject( "CLASSSTRING.HERE" )
>>     ConName = "Test"
>>     ReturnStatus = oConn.openConnection(lHand, ConName)
>> 'DO SOMETHING WITH oConn
>>     oConn.closeConnection( lHand )
>>     Set oConn = Nothing
>>
>>
>> Nic Roche
>>
>> "BM"  wrote in message
>> news:11au73f9kh2ap82@corp.supernews.com...
>> > Using vb script how can you call a dll function from the client browser
>> > (the
>> > dll is resident on the client pc) in vb code you would declare function
>> > and
>> > set the entry point into the dll and the parameters.  Is there an
>> > equivilant
>> > in vbscript.  I am trying to do the following
>> >
>> > MyFunctions.dll
>> > contains
>> > openConnection(wHand as integer, Name as string) as integer
>> > closeConnection(wHand as integer) as integer
>> > .
>> > .
>> > .
>> >
>> > in vbscript I want to call openConnection
>> >
>> > dim ReturnStatus as integer, lHand as integer, ConName as string
>> > ConName = "Test"
>> > ReturnStatus = openConnection(lHand, ConName)
>> >
>> > What needs to be done to makes this call?  Any help would be
> appreciated.
>> >
>> > Remove Spa from e-mail to use e-mail address
>> >
>> >
>> >
>>
>>
>
>
date: Wed, 15 Jun 2005 13:56:30 +1000   author:   Nic Roche

Re: How to call a DLL function on Client   
BM wrote:
> Thank you for the response the only clarification I need is --
> CLASSSTRING.HERE
>
> If the dll name is acbsi.dll and the entry point is UtilConnect
> would the class string be  acbsi.UtilConnect ?
>
> I did not write the dll it is a commercial package installed on the
> pc.  I have the calling templates as in UtilConnect(lHand as Integer,
> ConName as string) but that is it.  If the class string is something
> different is there a way to obtain it from the dll or some way to
> identify it.  Thank you for your help
>

If this DLL is not the implementation of a COM component then it is unusable 
from VBScript which does *not* support Declare or any kind of strong 
variable typing that would be required for API calls.


-- 
Michael Harris
Microsoft MVP Scripting
date: Tue, 14 Jun 2005 21:41:48 -0700   author:   Michael Harris \(MVP\) mikhar at mvps dot org

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us