MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / Open

Method Open

sourcecommon/File.cpp:43–56  ·  view source on GitHub ↗

--------------------------------------------------------------------------- --------------------------------------------------------------------------- ---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

41//---------------------------------------------------------------------------
42//---------------------------------------------------------------------------
43bool __fastcall TFile::Open(char * FileName, DWORD Access, DWORD ShareMode,
44 DWORD CreationDistribution, DWORD FlagsAndAttributes)
45{
46 if( handle ) return false;
47 LastError = 0;
48 HANDLE h = CreateFile(FileName, Access, ShareMode, NULL,
49 CreationDistribution, FlagsAndAttributes, NULL);
50 Error = (h == INVALID_HANDLE_VALUE);
51 if( Error ) LastError = GetLastError();
52 else handle = h; // ��� �� !
53
54 if( Exceptions && Error ) throw 0;
55 return ! Error;
56}
57//---------------------------------------------------------------------------
58bool __fastcall TFile::Open(String FileName, DWORD Access, DWORD ShareMode,
59 DWORD CreationDistribution, DWORD FlagsAndAttributes)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected