[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::visualc

Title:Microsoft Visual C/C++
Moderator:PLUGH::needle
Created:Tue Mar 16 1993
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1121
Total number of notes:4385

1108.0. "Start file from Explorer" by 60675::nessus.cao.dec.com::Mayne (A wretched hive of scum and villainy) Wed Apr 09 1997 06:55

I've written a program and associated a file extension with it in Explorer.

If I start the program and drag a file from Explorer onto the program's window, 
the program will open the file.

If I double-click the file in Explorer, my program will start up, but Explorer 
will give the error

	Cannot find the file 'filename.ext' (or one of its componens).
	Make sure the path and filename are correct and that all
	required libraries are available.

and my program doesn't open the file.

What do I have to add to my code to make double-clicking in Explorer do the 
right thing?

PJDM
T.RTitleUserPersonal
Name
DateLines
1108.119584::DZIEDZICTony Dziedzic - DTN 381-2438Wed Apr 09 1997 11:246
    Sounds like you may have entered the association incorrectly.
    Most of the Microsoft-supplied entries I've seen have used
    double quotes around the program name and the parameters; e.g.,
    "C:\WINNT\SYSTEM32\WORDPAD.EXE" "%1"
    
    Can you list the Explorer association for your file type?
1108.260675::nessus.cao.dec.com::MayneA wretched hive of scum and villainyWed Apr 09 1997 23:205
The double quotes are there:

	m:\Code\NTj\AlphaRel\NTj.exe "%1"

PJDM