Solved

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

Posted on 2003-11-12
6
646 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

809 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