Re: Well done SigSys! CFAM...>


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Brian Levantine on March 03, 2004 at 09:45:46:

In Reply to: Well done SigSys! CFAM...> posted by Tom Fulton on March 03, 2004 at 08:05:23:

Hi Tom, I'm glad that you're having some success with CFAM and the CometLib API.

How does your VB program know what file? Well, that's a Windows feature of ShellExecute. When you associated your .ADV extension with your VB program, Windows knows that for any ShellExecute (Launch) statement specifying a document with your registered extension, to start your VB program and to pass the filename to it. Pretty cool huh?

An alternative would be for you to explicitly launch your VB program using the IB ShellExecute mnemonic and to pass the filename (.ADV or anything) as a command line argument. This is also the solution to your second question about passing parameters to your VB program. You can either add additional command line arguments that specify any additional parameters that your program may need or (and this is my preference) you can instead pass a single filename that contains a list of parameters including the .ADV filename. There are built-in facilities in Windows (although on the IB side you'd have to brute force it) for using such a file. They use the .INI file format (doesn't require the .INI extension) like you've seen used by Comet (COSW.INI, COMET.INI). Research the Windows functions WriteProfileString and GetProfileString - they are usable from VB. If you want to know more about this stuff get in touch with me and I'll give you a hand.



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):






[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]