IonelBurtan
Programmer
There were many questions about how to use Windows APIs from ASP.
Everyone knows that ASP can use the sintax:
Dim myobj
Set myobj=Server.CreateObject("XLibraryName.XClassName".
Now I was thinking to this scenario in VB:
- I create a new ActiveX DLL named APISFromVB.dll
- I add a class called MyAPI in a class module
- In class I add a method (lets say
Public Function ASPGetTickCount() As Long
which will internally call to GetTickCount Windows API)
- Now I register my dll with regsvr32.exe
- I make a dummy ASP page in which I write:
Dim myobj
Set myobj=Server.CreateObject("APISFromVB.MyAPI"
- Then I make a call to my API function like this:
Dim lTick
lTick = myobj.ASPGetTickCount()
(I never tryed, but I don't see why it shouldn't work)
The same scenario can be done using a VC++ COM Component.
Hope this will give you some ideas,
Now the Question is: Can Be something done in order to be able to call ANY Windows API through this scenario. s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
Everyone knows that ASP can use the sintax:
Dim myobj
Set myobj=Server.CreateObject("XLibraryName.XClassName".
Now I was thinking to this scenario in VB:
- I create a new ActiveX DLL named APISFromVB.dll
- I add a class called MyAPI in a class module
- In class I add a method (lets say
Public Function ASPGetTickCount() As Long
which will internally call to GetTickCount Windows API)
- Now I register my dll with regsvr32.exe
- I make a dummy ASP page in which I write:
Dim myobj
Set myobj=Server.CreateObject("APISFromVB.MyAPI"
- Then I make a call to my API function like this:
Dim lTick
lTick = myobj.ASPGetTickCount()
(I never tryed, but I don't see why it shouldn't work)
The same scenario can be done using a VC++ COM Component.
Hope this will give you some ideas,
Now the Question is: Can Be something done in order to be able to call ANY Windows API through this scenario. s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...