Solved

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

Posted on 2003-11-12
6
649 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 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