Go to the source code of this file.
◆ pgwin32_get_file_type()
DWORD pgwin32_get_file_type |
( |
HANDLE |
hFile | ) |
|
Definition at line 31 of file win32common.c.
32{
33 DWORD fileType = FILE_TYPE_UNKNOWN;
34 DWORD lastError;
35
36 errno = 0;
37
38
39
40
41
42
43 if (hFile == INVALID_HANDLE_VALUE || hFile == (HANDLE) -2)
44 {
45 errno = EINVAL;
46 return FILE_TYPE_UNKNOWN;
47 }
48
49 fileType = GetFileType(hFile);
50 lastError = GetLastError();
51
52
53
54
55
56
57 if (fileType == FILE_TYPE_UNKNOWN && lastError != NO_ERROR)
58 {
60 return FILE_TYPE_UNKNOWN;
61 }
62
63 return fileType;
64}
void _dosmaperr(unsigned long)
References _dosmaperr().
Referenced by _pgfstat64().