Calling a DLL in ASP

Results 1 to 4 of 4

Thread: Calling a DLL in ASP

  1. #1
    Mike Greene Guest

    Default Calling a DLL in ASP

    I need to know the syntax for defining external DLL functions and calling them from within ASP. Any help would be greatly appreciated. You can email me at if you don&#039;t want to post to this forum. Thnkyou much in advance,<BR>-Mike

  2. #2
    Join Date
    Dec 1969

    Default RE: Calling a DLL in ASP

    If dll is a component that can be registered then use this code:<BR><BR>Dim MyObj<BR>set myobj = server.createobject("objectName.ClassName")<BR>*** ***********************************<BR>If dll is non-registerable component then follow this:<BR>1. create a wrapper component using VB or VC++<BR>2. in Wrapper call this external dll.<BR>3. if using VB the you can use:<BR>Private Declare Function XYZ Lib "abc.dll" (ByVal test1 As whatever, ..........) As Whatever<BR><BR>Remember abc.dll has to be in system path. If your program can&#039;t find this file in run time, then you can set the path as environment variable using SetEnvironmentVariable and GetEnvironmentVariable<BR><BR>4. then use this code<BR>Dim MyObj<BR>set myobj = server.createobject("Wrapperobject.WrapperClass")< BR><BR>Hope this was helpfull.<BR><BR>

  3. #3
    Mike Greene Guest

    Default RE: Calling a DLL in ASP

    I was afraid that was how I was going to have to do it. I was hoping that there was a way to just call the DLL.<BR><BR>Thanks for the help,<BR>-Mike

  4. #4
    Mike Greene Guest

    Default RE: Calling a DLL in ASP

    I created a Wrapper ActiveX DLL with a class define in it.<BR>When I run this line:<BR>set CryptObj = server.createobject("CryptoCOM.TCryptoSwap")<BR><B R>I get this error:<BR>Server object error &#039;ASP 0177 : 800401f3&#039; <BR>Server.CreateObject Failed <BR><BR>My question is, How do I know the name of the Object and Class?<BR><BR>My DLL name is "CryptoCOM.dll" and the class defined in it is "TCryptoSwap".<BR><BR>I assumed that that object must be the DLL name, but I&#039;m unsure (and it doesn&#039;t work :^) )<BR><BR>Thanks, -MIke

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts