Solved

Client side component via ASP????

Posted on 2002-05-22
10
352 Views
Last Modified: 2007-12-19
Hi,

l have written a simple scanner activex dll using the kodak image scan control (imgscan.ocx) on VB6, and l have tested the dll from a test.exe also written on VB6. It was working fine nicely. But when l used the package and deployment wizard program that come along with VB6 and package it for internet deployment, l cannot get it to run from the browser. l put both the cab file and sample generated webpage into a test directory on my test webserver. At the same time, l also modify the generated sample webpage to as follow:

<HTML>
<HEAD>
<TITLE>Scan2.CAB</TITLE>
</HEAD>
<BODY>
<OBJECT ID="Scan"
CLASSID="CLSID:5E6FDC68-EDDB-4A76-B5DD-0061AE4AAB93"
CODEBASE="Scan2.CAB#version=1,0,0,0">
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
set objscan = createobject("Scan2.Scan")
objscan.StartScan
<SCRIPT>
</BODY>
</HTML>

Is this the right way to deloy an activex control to be runned on the client side assuming security issue is overcome? Is there any articles on this subject on the web?

Please help. Thxs.

0
Comment
Question by:mikeckt
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 7026389
Try:
<script language="VBScript">
Scan.StartScan
</script>
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7026391
Oh, and give it time to load!!! Otherwise it won't know the component at all.

CJ
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 7026403
Here is the link to information on deploying ActiveX control..

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaxctrl/html/msdn_deplactx.asp

What error are you getting with your existing code?

Naveen
0
 

Expert Comment

by:raja_velpuru
ID: 7054808
Try this out:

*********************************************************
<HTML>
<HEAD>
<TITLE>Scan2.CAB</TITLE>
<script language="javascript">
function scanImage(vForm){
       vForm.objScan.StartScan();
}
</script>
</HEAD>
<BODY>
<form name="myForm">
<OBJECT ID="objScan"
name="objScan" CLASSID="CLSID:5E6FDC68-EDDB-4A76-B5DD-0061AE4AAB93"
CODEBASE="Scan2.CAB#version=1,0,0,0">
</OBJECT>
<input type="button" name="scan" value="Scan Image" onClick="scanImage(this.form)">
</form>
</BODY>
</HTML>
*********************************************************
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:mikeckt
ID: 7055295
First, thxs guys.

On further investigation, it seems that the error come directly from the packaging wizard. When l re-packaged the dll for internet deployment using the VB6 package and deployment wizard program, this time l noticed that there was a warning message as follow:

"The information found in the file 'C:\WINNT\system32\imgscan.ocx' does not match that found in the registry. Make sure the file is registered on this computer in the directory you are retrieving it from.

Your project may not function properly if you continue. Do you wish to continue?"

There is no problem if l compile the scan program into a dll from VB6. There is also no problem if l reference the scan dll from another test program created from VB6. Infact, the test program run fine. There is also no error message when l add the Kodak Image Scan component "imgscan.ocx" in the scan project. In any case, this kodak Image Scan component was installed automatically during the Win2K installation, and l believe it's used by the kodak imaging program in the "Accessories" folder ("C:\Program Files\Windows NT\Accessories\ImageVue\Kodakimg.exe"). The Kodak Imaging program also run fine without problem; it was able to scan images.

Any ideas what could be the problem? Your help is very much appreciated.

thxs.
0
 

Expert Comment

by:raja_velpuru
ID: 7056202
Sorry, I am not able to get what problem u r facing now.

Did u try the sample I gave u?

What are the errors u r getting?
0
 

Author Comment

by:mikeckt
ID: 7058678
Yes, l did try out the sample html code. It did ask me whether l want to install the scan.cab file which l say "yes". When l pressed the button generated by the html code, nothing happened. The browser's status bar indicated a message "Error in the page". My guess is that the cab file was not properly installed. l think that is why there is no scan activex in the folder "C:\WINNT\Downloaded Program Files". That confirmed my suspicion that the error occur when l package the cab file for internet deployment using the VB6 Package & Depolyment Wizard program. For some reason, the VB6 Packaging program was NOT able to package the component "C:\WINNT\system32\imgscan.ocx" in the cab file. The warning message was:

"The information found in the file 'C:\WINNT\system32\imgscan.ocx' does not match that found in the
registry. Make sure the file is registered on this computer in the directory you are retrieving it from.

Your project may not function properly if you continue. Do you wish to continue?"


Any idea what could be the problem????

Thxs.
0
 

Accepted Solution

by:
raja_velpuru earned 50 total points
ID: 7059127
I guess the problem would be in making the package CAB file of the OCX.

Try these out:
1. Register the OCX from where u have it saved. For example, if the OCX is residing in C:\test then run the following command at RUN prompt

regsvr32 "C:\test\imgscan.ocx"

2. Now using the Packaging & Delpoyment wizard, make the package CAB from C:\test\imgscan.ocx
I guess thsi time it shoudl give you any warnings.

Further run the HTML, i have sent.

In CODEBASE, just mention the CAB file alone, let it refer itself to the latest version. For example,
<OBJECT ID="objScan"
name="objScan" CLASSID="CLSID:5E6FDC68-EDDB-4A76-B5DD-0061AE4AAB93"
CODEBASE="Scan2.CAB">

provided u have Scan2.CAB also in the same path as that of the HTML page.
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8836632
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:

To accept the comment and points awarded to raja_velpuru

** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Classic ASP migration directions 7 67
Group by correlation 4 55
ASP Classic - Load test 2 44
INNER JOIN ? 8 41
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now