Solved

Need to pass parameters to a ActiveX EXE from HTML/PHP

Posted on 2003-11-12
6
645 Views
Last Modified: 2010-05-01
I've created an ActiveX EXE application with a UserDocument (.VBD file) in Visual Basic 6. The whole system is accessed and viewed within Internet Explorer. I need to find a way to pass parameters to this application when it is launched.

Is it possible to add parameters to the URL, e.g. http://myurl.com/myvbd.vbd?arg1=val1&arg2=val2 ? if so, how do I access them from in the VB code?

Any way to get variables from the PHP system that is responsible for redirecting the user to the VBD document would sort this out! I dont really want to resort to writing the variables out to a web accessible file, and then fetching (and parsing) it within VB!
0
Comment
Question by:toasta
6 Comments
 
LVL 2

Accepted Solution

by:
MaxPol earned 450 total points
ID: 9730638
I don't have VB6 and don't know vdb extensions, but here some try.

Why not creating an OCX? It could be easily diplayed in the Web form and you could set (via vbscipt) any properties it expose.

If you can't, could you access session variables? (Session("VarA") = "something").
If yes, you could set this variables with a small VB script before the handling of your ActiveX.

Have you tried the Command$ variable? (just in case you didn't).

Could you interact with the Iexplorer application and retrieve the address bar (that containg the parameters) and parse them?

I just give you idea, don't know if they might be usefull to you as I cannot try them on my own.

When I did an OCX to be used on the Web, it was a normal OCX that exposed the paramters required. So I could easily managed them by vbscript.

Max

0
 

Author Comment

by:toasta
ID: 9730745
Max, thanks for your reply.

I did initially try using an OCX. Problem was that I need the application to run in a separate thread and to open a Modeless Form (which it turns out you cant do unless you are using a .exe).

I guess an alternative to what i'm doing at the moment (using a .VBD document) could be to have an ActiveX Control in the .exe. Trubble is I dont know how to subsequently embed that control into my webpage (or even if thats possible!). Once that is done I could pass parameters in using "<PARAM etc...>". If anyone knows how to solve that problem then the points are yours!

ben
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9730921
hearing...
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.

 
LVL 26

Expert Comment

by:EDDYKT
ID: 9731234


I 've not create any UserDoc before but should you be about to use Request object
ie obj = Request.QueryString("arg2")
0
 
LVL 26

Assisted Solution

by:EDDYKT
EDDYKT earned 50 total points
ID: 9731265
ie

add ms active server pages object library references


Dim a As ASPTypeLibrary.Request

 obj = a.QueryString("arg2")
0
 

Author Comment

by:toasta
ID: 9731405
EDDYKT, I cant get that Request object idea to work. I dont think that it can be used for VBD files. Nice idea tho!

I'm going to give Max the points since he gave me the idea of using VBScript. I've somewhat re-engineered my project but its much nicer now :- )
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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

919 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

17 Experts available now in Live!

Get 1:1 Help Now