Passing a Scripting.Dictionary to ActiveX DLL 
Author Message
 Passing a Scripting.Dictionary to ActiveX DLL

Hopefully someone can help me out here.  I have a ActiveX
DLL I wrote for my web site which takes a
Scripting.Dictionary object as an argument.  This works
fine from my ASP page, but I needed to write a vbs script
to be run by cscript.exe and the same functionality yields
a Permission Denied error on my production web server, but
not my development computer.  They are both supposed to be
running the same software, NT 4 Server, SP6a, and Windows
Script Host 5.1 with all security patches identified by
hfnetchk.exe.  I think it may have something to do with a
setting that iislockd.exe may have changed.  Does anyone
have any suggestions what to check?

Thank you in advance,
- Tyler

Below I have included sample code from my ActiveX DLL, an
ASP file, and a VBS file.

' ActiveX DLL
Public Function Test(ByVal objData as Object) As String
   Dim testString as String

   ' Next line causes problems when called from wsh but
not asp file
   testString = objData.Item("TestValue")

   ' Do something
End Function

' ASP File
Set objData = Server.CreateObject("Scripting.Dictionary")
objData.Item("TestValue")="Sample Data"
result=objClass.Test(objData)
' This ASP works fine on both servers

' VBS File
Set objData = CreateObject("Scripting.Dictionary")
objData.Item("TestValue")="Sample Data"
result=objClass.Test(objData)
' This works on my development computer but not my
Production Web Server



Mon, 06 Sep 2004 23:10:20 GMT  
 Passing a Scripting.Dictionary to ActiveX DLL
Note that Tyler found his own solution but posted that fact as a separate thread ;-)...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:

> Hopefully someone can help me out here.  I have a ActiveX
> DLL I wrote for my web site which takes a
> Scripting.Dictionary object as an argument.  This works
> fine from my ASP page, but I needed to write a vbs script
> to be run by cscript.exe and the same functionality yields
> a Permission Denied error on my production web server, but
> not my development computer.  They are both supposed to be
> running the same software, NT 4 Server, SP6a, and Windows
> Script Host 5.1 with all security patches identified by
> hfnetchk.exe.  I think it may have something to do with a
> setting that iislockd.exe may have changed.  Does anyone
> have any suggestions what to check?

> Thank you in advance,
> - Tyler

> Below I have included sample code from my ActiveX DLL, an
> ASP file, and a VBS file.

> ' ActiveX DLL
> Public Function Test(ByVal objData as Object) As String
>    Dim testString as String

>    ' Next line causes problems when called from wsh but
> not asp file
>    testString = objData.Item("TestValue")

>    ' Do something
> End Function

> ' ASP File
> Set objData = Server.CreateObject("Scripting.Dictionary")
> objData.Item("TestValue")="Sample Data"
> result=objClass.Test(objData)
> ' This ASP works fine on both servers

> ' VBS File
> Set objData = CreateObject("Scripting.Dictionary")
> objData.Item("TestValue")="Sample Data"
> result=objClass.Test(objData)
> ' This works on my development computer but not my
> Production Web Server



Tue, 07 Sep 2004 08:20:38 GMT  
 Passing a Scripting.Dictionary to ActiveX DLL
lol Michael is being mean



Note that Tyler found his own solution but posted that fact as a separate
thread ;-)...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:
> Hopefully someone can help me out here.  I have a ActiveX
> DLL I wrote for my web site which takes a
> Scripting.Dictionary object as an argument.  This works
> fine from my ASP page, but I needed to write a vbs script
> to be run by cscript.exe and the same functionality yields
> a Permission Denied error on my production web server, but
> not my development computer.  They are both supposed to be
> running the same software, NT 4 Server, SP6a, and Windows
> Script Host 5.1 with all security patches identified by
> hfnetchk.exe.  I think it may have something to do with a
> setting that iislockd.exe may have changed.  Does anyone
> have any suggestions what to check?

> Thank you in advance,
> - Tyler

> Below I have included sample code from my ActiveX DLL, an
> ASP file, and a VBS file.

> ' ActiveX DLL
> Public Function Test(ByVal objData as Object) As String
>    Dim testString as String

>    ' Next line causes problems when called from wsh but
> not asp file
>    testString = objData.Item("TestValue")

>    ' Do something
> End Function

> ' ASP File
> Set objData = Server.CreateObject("Scripting.Dictionary")
> objData.Item("TestValue")="Sample Data"
> result=objClass.Test(objData)
> ' This ASP works fine on both servers

> ' VBS File
> Set objData = CreateObject("Scripting.Dictionary")
> objData.Item("TestValue")="Sample Data"
> result=objClass.Test(objData)
> ' This works on my development computer but not my
> Production Web Server



Wed, 08 Sep 2004 12:04:28 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing an object to an ActiveX dll from ASP script

2. Passing object variables to an activex dll

3. Passing object variable to an Activex dll

4. passing array from VBScript to Visual Basic ActiveX DLL

5. Using complex data types from VB ActiveX dlls with server-side scripting

6. Using complex data types from VB ActiveX dlls with server-side scripting

7. Building ActiveX controls that will access activex.dll running on PWS

8. Problem with Windows Script Control and Timeout in an ActiveX Dll

9. Using complex data types from VB ActiveX dlls with server-side scripting

10. Connect to ActiveX Dll in VB-Script

11. Passing values by reference from java / vb script to ActiveX object

12. Pass by reference from ActiveX to J-Script?

 

 
Powered by phpBB® Forum Software