Method ITcFileAccess:FileGetStatus
Queries the status of a file.
Syntax
virtual HRESULT TCOMAPI FileGetStatus(PCCH szFileName, PTcFileStatus pFileStatus));
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.
Parameter
Name | Type | Description |
|---|---|---|
szFileName | PCCH | [in] the name of the file in question. |
pFileStatus | PTcFileStatus | [out] the status of the file, cf. TcFileAccessServices.h . |
Description
This method queries status information regarding 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;