wahooo
asked on
Run activex on client machine
Hi, totally newbie on activex controls, but I do know .asp.
I have an .asp application and I have made an activex-component that I want to access on the client machine. A also need to pass a variable to the client.
See this for info on the activex-component I have made..
https://www.experts-exchange.com/questions/21199583/Totally-Newbie-active-x-control.html
The page runs on a hosted server.
Sjur
I have an .asp application and I have made an activex-component that I want to access on the client machine. A also need to pass a variable to the client.
See this for info on the activex-component I have made..
https://www.experts-exchange.com/questions/21199583/Totally-Newbie-active-x-control.html
The page runs on a hosted server.
Sjur
ASKER
ok, how do I for instance make a .dll file to put on the server that can do the same..
and is this better..`?
need code and help though..
for 500p..
sjur
and is this better..`?
need code and help though..
for 500p..
sjur
here's what i do to embed ActiveX object in my asp page:
1. use Visual Studio "Package and Deployment wizard" to create the .CAB package
2. to place this object in the asp page, add something like this to your asp page:
<object ID="objTest" CLASSID="CLSID:xxxx-xxxxx- xxxxx-xxxx x" codebase="http://mySite/ActiveXObject/test.CAB#version=1,0,0,0" VIEWASTEXT>
</object>
The object ID is the name you can referred to in Javascript using getElementById(), and then you can call public functions in your activeX object like this: objTest.MyFunction();
codebase tells the location in which the client machine can download the ActiveX object (.CAB).
-------
alternatively, you can try COM object. With COM object you just need to compile it into .dll and register the dll to your server. but if it is something that cannot be done using asp, the it is likely you won't be able to do it using COM dll either. Only activeX object is like a real VB application.
To use activeX object, you need to make sure the client machine's security is setup to allow activeX object to run. If you are using adodb connections in your activeX object to query the database, you might run into "msado" incompatibility issues which is a pain in the @$$ to fix, otherwise it shouldn't be too much trouble.
1. use Visual Studio "Package and Deployment wizard" to create the .CAB package
2. to place this object in the asp page, add something like this to your asp page:
<object ID="objTest" CLASSID="CLSID:xxxx-xxxxx-
</object>
The object ID is the name you can referred to in Javascript using getElementById(), and then you can call public functions in your activeX object like this: objTest.MyFunction();
codebase tells the location in which the client machine can download the ActiveX object (.CAB).
-------
alternatively, you can try COM object. With COM object you just need to compile it into .dll and register the dll to your server. but if it is something that cannot be done using asp, the it is likely you won't be able to do it using COM dll either. Only activeX object is like a real VB application.
To use activeX object, you need to make sure the client machine's security is setup to allow activeX object to run. If you are using adodb connections in your activeX object to query the database, you might run into "msado" incompatibility issues which is a pain in the @$$ to fix, otherwise it shouldn't be too much trouble.
ASKER
Ok, Kingsfan
I will try this later today, but what about passing a variable to the ActiveX-control?
Like for example:
Private Sub UserControl11_CallShell(Ph No As String)
shell "c:\program files\x-pro\x-pro.exe " & "12345678"
End Sub
Is this possible to have on the .asp page and pass this to the activex-control?
the number will change for every time..
Sjur
I will try this later today, but what about passing a variable to the ActiveX-control?
Like for example:
Private Sub UserControl11_CallShell(Ph
shell "c:\program files\x-pro\x-pro.exe " & "12345678"
End Sub
Is this possible to have on the .asp page and pass this to the activex-control?
the number will change for every time..
Sjur
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
but you, i you want to embadd the axtivex you need to use the html <object> tag.
Or if you want ot create it using javascript you would use new ActiveXObject( "name goes here" );
I do believe your looking to embadd the object
btw i know i spell horribly