Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing variables from vfp to vb.net

Status
Not open for further replies.

jpower69

Programmer
Feb 5, 2008
54
0
0
US
I'm not sure if this is the correct forum for this

if not, please point me in the right direction

I am creating small vb.net application that will ping a sql server

I am using calling the vb.net exe from a vfp program using shellexecute
the structure of the shellexecute is as follows;
DECLARE INTEGER ShellExecute IN shell32.DLL ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin
**
in_params = 'GTSSQLTRECS01',, passing this value
cAction = "open"
cFileName = "c:\temp\ping_servers.exe" << name of my vb.bnet exe
cParams = In_Params
cPath = ""

what I am interested in is the value of the field cparams--i will be passing different values for example if the first sqerver is not available
i'll be passing a second.
in my Vb.net, how/where do i set up the program to accept the value being passed??

this is my statement mRtn = ShellExecute(0,cAction,cFileName,cParams,cPath,1)

any comments/suggestions greatly appreicated

Thanks in advance
 
I found out the I can use the Environment.GetCommandLineArgs(1) to retrieve the value that I am passing from shellexecute() routine in vfp

thanks again
 
Thank you for sharing.


Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top