Link to home
Start Free TrialLog in
Avatar of edfrazier
edfrazier

asked on

ASP calling VB Dll

I have a VB DLL that I call from my ASP page.  The DLL is really just a shell around another Dll.  I just created my own functions that puts a little business logic in the DLL instead of doing it in the ASP page.

My problem is this:

I can call my dll from a quick vb app I wrote to test it and it works fine.  When I try to call it from Asp page I get some wierd results.

Here is the basis of my Dll that I am calling

Private Declare Function GetDevice _
   Lib "MYDLL.Dll" (byVal ID as Integer) as Long

Public Function C_GetDevice(ByVal GetId as Integer) as Long
    C_GetDevice = GetDevice(GetId)
End Function

From VB I do this:

Dim oDll as Object
Set oDll = CreateObject("CDUSB.MyDll")

rtn = oDll.C_GetDevice(0)

I receive 18481 back

From ASP I do this:
Dim oDLL
Set oDll = server.createobject("CDUSB.MyDll")

rtn = oDll.C_GetDevice(0)

I receive back -437385700

SOLUTION
Avatar of Skirde
Skirde

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CleanupPing
CleanupPing

edfrazier:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Avatar of edfrazier

ASKER

This was never resolved, thanks for the help