473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Anyone have an example of referencing and using an ActiveX cab file ?

I am attempting to convert an asp file to a asp.net file using C#.

The original file has an ActiveX control which is contained in a cab file.

The cab file contains the .ocx file which connects to a socket and transfers
client info to a server, as well as several .dlls

The cab file also references another cab file which contains files to
install on the client machine in case they do not have VBRuntime6 installed
on their machine.

We have obtained a Microsoft license for the ActiveX control.

My problem is, how to call or reference the control in my .net page. I have
researched and am doing what I have seen, but am getting errors.

The original code has the ActiveX embedded in the html like so:
<form runat="server" name="trade_entry_verify" method="post">
..
..
..
<P>
<OBJECT CLASSID="clsid:blah_blah_blah"
id="Microsoft_Licensed_Class_Manager_1_0"1 VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="NAME.lpk">
</OBJECT>
<OBJECT id=IDNAME2 height=0 width=0
classid=clsid:blah_blah_blah codeBase="CABNAME.CAB#version=1,0,0,0"
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="873">
<PARAM NAME="_ExtentY" VALUE="847">
</OBJECT>
</P>
..
..
..
</form>


One of the functions is like so (note- : trade_entry_verify is the form
name):
<script language="vbscript">
..
..
..
function doSubmit()
trade_entry_verify.IDNAME2.CloseSocket
trade_entry_verify.IDNAME2.HostAddress = "ip.address.0.0"
trade_entry_verify.IDNAME2.Port = "portnum"
Result = trade_entry_verify.citcp2.ConnectToHost
end function
..
..
..
</script>


In my C# code, I have embedded the two objects in the html as shown above
since the examples I have found seem to do the same.

Yet, when I try to preview the page in IE, I get the following error:

Compiler Error Message: BC30451: Name 'trade_entry_verify' is not declared.

Source Error:
Line 85:
Line 86: function doSubmit()
Line 87: trade_entry_verify.CITCP2.CloseSocket
Line 88: trade_entry_verify.CITCP2.HostAddress = "ipaddressIuse"
Line 89: trade_entry_verify.CITCP2.Port = "2000"

trade_entry_verify is simply the form name, so I tried removing it and then
I get:
Compiler Error Message: BC30451: Name 'CITCP2' is not declared.

Source Error:
Line 85:
Line 86: function doSubmit()
Line 87: CITCP2.CloseSocket
Line 88: CITCP2.HostAddress = "ipaddressIuse"
Line 89: CITCP2.Port = "2000"

for this page, to get started and for testing purposes, I simply cut and
pasted the VBScript function within the script tags. Ultimately, I wish to
rewrite it as C#.

Can anyone provide an example of how I should embed the ActiveX and license,
and then use it in a function? Any help would be really, really appreciated.
Dec 1 '05 #1
0 1366

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: S C A | last post by:
Dear All: I'm not sure if this is even possible but does anyone know about using ActiveX controls (a Microsoft-specific technology) in Java? I am having a heck of a time finding some similar...
6
by: Sergio Otoya | last post by:
Hi all, Is there any way of copying a file using javascript, not using the Filesystemobject (ActiveX). I need this to run in Windows and MACS. Any help would be greatly appreciated. Thanks...
0
by: Ike | last post by:
I have an Activex Control created in VB6, which, displays no problem on any machine I have, but, on some machines of others, it does not. All machines are running either XP or Windows 2000, and all...
3
by: Michiel | last post by:
Hello, I have an ActiveX control which I can call fine from HTML pages, using the object tag like <OBJECT ID="UserControl1" WIDTH="0" HEIGHT="0"...
2
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
1
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
6
by: Ken Breit | last post by:
I have an ActiveX control that I would like to make available from any form in my application. I figured the best way was to create a reference to it, and then have a module that will create the...
5
Robc9999
by: Robc9999 | last post by:
I am using an ActiveX dll that I have tested succesfully from a VB.net desktop application. When I attempt to wrap the application in an ASP.Net web service I can't get it to function. There...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net app, in the page there is a scan activex which could scan and save a jpg file in client harddisk. How could we access and display this jpg file on the fly using js in the client...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.