Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenaccess.c
Go to the documentation of this file.
00001 #include <precomp.h> 00002 #include <tchar.h> 00003 00004 #ifdef _UNICODE 00005 #define _TS S 00006 #define sT "S" 00007 #else 00008 #define _TS s 00009 #define sT "s" 00010 #endif 00011 00012 #define MK_STR(s) #s 00013 00014 /* 00015 * INTERNAL 00016 */ 00017 int access_dirT(const _TCHAR *_path) 00018 { 00019 DWORD Attributes = GetFileAttributes(_path); 00020 TRACE(MK_STR(is_dirT)"('%"sT"')\n", _path); 00021 00022 if (Attributes == (DWORD)-1) { 00023 _dosmaperr(GetLastError()); 00024 return -1; 00025 } 00026 00027 if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) 00028 { 00029 _set_errno(EACCES); 00030 return -1; 00031 } 00032 00033 return 0; 00034 } 00035 00036 Generated on Sun May 27 2012 04:20:50 for ReactOS by
1.7.6.1
|