From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-04-2005 09:08 AM
02-07-2005 11:04 AM
02-07-2005 11:07 AM
02-07-2005 12:53 PM
03-16-2005 04:51 PM
03-17-2005 10:03 AM
03-21-2005 11:57 AM
07-19-2016 08:59 AM
Reviving an old thread here ... does anyone know if the techniques in this thread are still compatible with Windows 10?
(It seems to be more fussy about file associations and registry changes than older versions of Windows.)
Thanks!
01-12-2018 08:03 AM
Then you create an entry for Myfile with all the necessary information for launching.
<snip/>
You can add whatever is necessary through the command line such as -o to open or whatever you have written.
Jeff
I too am resurrecting an old thread. This is a great starter for me, but I'm stumbling on this little bit. What kind of event is generated when my application starts up to know that a file is being passed to it? I'm confused about how to actually get the file piped into my app.
For instance, in Windows there's a "poor man's" approach to all of the above by simply using the Shift + Right Click context menu on the file in question. This gives us extra options, including an "Open with...".
Having done that for my file and associating it with my CVI app, my app will indeed load but nothing actually happens. The file doesn't get loaded.
01-12-2018 08:42 AM - edited 01-12-2018 08:43 AM
No particular event is generated in this case, but your program receives an additional startup parameter (as if you have called it with e.g. "myprog.exe myfile.txt"). You retrieve this in argv[] parameter of the main(), signalled by the fact that argc parameter is >1 (argv[0] is always present holding actual program name).
In the case of automatic program launch in association with a particular file extension your main will be called with:
argc = 2
argv[1] = complete file pathname
It is your responsibility to detect this fact and actually decide what to do with the file.