Re: CStdioFile::Open gives error "No error occurred"



Show the exact code. I have no idea where you are picking up the filename ("from the
command line" doesn't tell me where in your program you are doing it).
joe

On Tue, 26 Dec 2006 10:43:00 -0800, Rui Oliveira <RuiOliveira@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

CStdioFile::Open gives error "No error occurred"

A have an application that associate file extension with shell OPEN command
and application.

When I double click a file with the respective extension, the application is
open. Then I catch filename with CWinApp::m_lpCmdLine.

When I tried to open file with CStdioFile::Open with options CFile::modeRead
| CFile::shareDenyNone, gives an error.

The message error are "No error occurred" ???
Windows blocks file when we double click them??

Tks.
Rui
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Target file extension for application
    ... The registration for the file extension has to specify the format used ... when passing the filename on the application's command line, ... The application can then retreive its command line using ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: OT: Re: MAC users?
    ... " at the command line. ... To get a sense of how ad hoc this is, you can look at the source code ... Files of particular types within the archive also use standard filename ... because the system doesn't have to rely on a file extension for ...
    (soc.genealogy.computing)
  • Re: Changing Uppercase filenames into Lowercase
    ... uppercase filename to a lowercase filename, ... foundfile = f$searchcommand line. ... Based on a command procedure by Willem Grooters which was ...
    (comp.os.vms)
  • Re: Pass command line file name parameter
    ... Then the document class has a copy of the filename, ... No need to access the original command line at all. ... want the user to see all the labels as they would be printed. ... filename or any other variable of your CWinApp class. ...
    (microsoft.public.vc.mfc)
  • Re: CStdioFile::Open gives error "No error occurred"
    ... I would avoid GetErrorMessage and just use FormatMessage on the error code itself, ... presume this is *not* the filename you planned to open, so why are you using m_lpCmdLine? ... there is a serious question here as to whether or not the command line has any ... Use the debugger, it is a very useful tool. ...
    (microsoft.public.vc.mfc)

Loading