Changeset 7798 for trunk/src/kernel32/directory.cpp
- Timestamp:
- Feb 3, 2002, 10:06:40 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/directory.cpp
r7342 r7798 1 /* $Id: directory.cpp,v 1.4 2 2001-11-14 18:38:45sandervl Exp $ */1 /* $Id: directory.cpp,v 1.43 2002-02-03 21:06:40 sandervl Exp $ */ 2 2 3 3 /* … … 754 754 return ret; 755 755 } 756 //****************************************************************************** 757 //****************************************************************************** 758 ODINFUNCTION2(UINT, GetTempPathA, 759 UINT, count, LPSTR, path) 760 { 761 UINT ret; 762 if (!(ret = GetEnvironmentVariableA( "TMP", path, count ))) 763 if (!(ret = GetEnvironmentVariableA( "TEMP", path, count ))) 764 if (!(ret = GetCurrentDirectoryA( count, path ))) 765 return 0; 766 if (count && (ret < count - 1) && (path[ret-1] != '\\')) 767 { 768 path[ret++] = '\\'; 769 path[ret] = '\0'; 770 } 771 return ret; 772 } 773 //****************************************************************************** 774 //****************************************************************************** 775 ODINFUNCTION2(UINT, GetTempPathW, 776 UINT, count, LPWSTR, path) 777 { 778 static const WCHAR tmp[] = { 'T', 'M', 'P', 0 }; 779 static const WCHAR temp[] = { 'T', 'E', 'M', 'P', 0 }; 780 UINT ret; 781 if (!(ret = GetEnvironmentVariableW( tmp, path, count ))) 782 if (!(ret = GetEnvironmentVariableW( temp, path, count ))) 783 if (!(ret = GetCurrentDirectoryW( count, path ))) 784 return 0; 785 if (count && (ret < count - 1) && (path[ret-1] != '\\')) 786 { 787 path[ret++] = '\\'; 788 path[ret] = '\0'; 789 } 790 return ret; 791 } 792 //****************************************************************************** 793 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.