Method ITcFileAccess:FileGetStatus

Retrieves status of a file.

Syntax

virtual HRESULT TCOMAPI FileGetStatus(PCCH szFileName, PTcFileStatus pFileStatus)); 

Parameter

szFileName: (type: PCCH) [in] the name of the file in question.

pFileStatus: (type: PTcFileStatus) [out] the state of the file, cf. TcFileAccessServices.h .

Return value

If successful, S_OK ("0") or another positive value will be returned, cf. Return values. Extended messages refer in particular to the column HRESULT in ADS Return Codes.

A particularly interesting error code is ADSERR_DEVICE_TIMEOUT if the timeout (5 seconds) has elapsed.

Description

This method retrieves Status information of a given file name.

This includes the following information:

typedef struct TcFileStatus
{
union
{
ULONGLONG ulFileSize;
struct
{
ULONG ulFileSizeLow;
ULONG ulFileSizeHigh;
};
};
ULONGLONG ulCreateTime;
ULONGLONG ulModifiedTime;
ULONGLONG ulReadTime;
DWORD dwAttribute;
DWORD wReserved0;
} TcFileStatus, *PTcFileStatus;