On Oct 17, 2006, at 4:14 PM, William Squires wrote:

Okay, problem here. I'm trying to execute a file (.EXE) from my RB program. I've tried:

...
Dim sh As Shell
Dim filnam As String

// Setup filnam
...

// Make Typeit.exe work with the file named in 'filnam'
sh = New Shell()
sh.Mode = 0
sh.Execute "Typeit " + filnam
...

where 'Typeit' is the name of the executable I'm trying to run, and 'filnam' (DIMmed as String) holds the name of the file I want Typeit to operate on. I've already verified that Typeit works as desired from the Windows' "DOS Window" (command shell), when the named file is in the same directory as Typeit.exe and my RB program.
  Unfortunately, sh.Execute doesn't seem to do anything.
  Originally, (as a test), I did:

sh.Execute "TYPE " + filnam + " > LPT1"

but it didn't do anything either, except that the results of the "TYPE" command appeared in the 'results' buffer of the shell object (as confirmed in the debugger.) Using RB 5.2.4 Win on WinXP. Unfortunately, the company I work for won't approve an update to RB2006 (Win) unless I can guarantee that the shell problem has been fixed (and no other part of the program breaks). Otherwise, I gotta fork over the cash for it. Ouch. Side note: when I was typing in the code, the info window popped up a message saying that "Execute" was part of an RB plugin in C: \Documents and Settings\Administrator\Application Settings \RBShell500.dll, so I figured maybe I could make a declare to it, but how do I find out what the function prototype is?

Oops, that should have read, "...\Application Data\RBShell500.dll". My bad. :)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to