Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.2 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* WFFILE.C - */
  4. /* */
  5. /* Ported code from wffile.asm */
  6. /* */
  7. /****************************************************************************/
  8. #include "winfile.h"
  9. WORD
  10. APIENTRY
  11. MKDir(
  12. LPSTR pName
  13. )
  14. {
  15. WORD wErr = 0;
  16. if (CreateDirectory(pName, NULL)) {
  17. ChangeFileSystem(FSC_MKDIR,pName,NULL);
  18. } else {
  19. wErr = (WORD)GetLastError();
  20. }
  21. return (wErr);
  22. }
  23. WORD
  24. APIENTRY
  25. RMDir(
  26. LPSTR pName
  27. )
  28. {
  29. WORD wErr = 0;
  30. if (RemoveDirectory(pName)) {
  31. ChangeFileSystem(FSC_RMDIR,pName,NULL);
  32. } else {
  33. wErr = (WORD)GetLastError();
  34. }
  35. return (wErr);
  36. }
  37. BOOL
  38. APIENTRY
  39. WFSetAttr(
  40. LPSTR lpFile,
  41. DWORD dwAttr
  42. )
  43. {
  44. BOOL bRet;
  45. bRet = SetFileAttributes(lpFile,dwAttr);
  46. if (bRet)
  47. ChangeFileSystem(FSC_ATTRIBUTES,lpFile,NULL);
  48. return (BOOL)!bRet;
  49. }