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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing parameters from VB6 to C

Status
Not open for further replies.

lisjump

Technical User
May 25, 2002
2
US
I have two very complex programs, one is written in C and one is written in VB6. I have values that I need to pass from the VB6 program into the C program....at the moment the only way I can think to do this is to write and read from a file, but this will get very messy, as the data should be passed every second.....does anyone have any ideas on how I might be able to do this?
 
Hi,

Create a C .ocx

javascript:gothread(222,183450)

Jon
 
lisjump:
command line arguments? as in DOS?

Sure. They're still valid, even in Windows XP. You're generally limited to about 128 characters though, and you can't pass certain characters that the command shell uses (like \, |, >, <, etc.). There's a list in Windows Help of the invalid path characters.

If you need to pass more than that, you're looking at writing your info to a file, and passing the path to that file to your program. I would suggest using an .INI file format, as there are API functions in both VB and C (Win32) for reading/writing those.

Chip H.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top