WINDOWS Directory
-
Hello, I have written a function GetFilesInDirectory(CString szpath) , which gets names of all filles in given directory,for example GetFilesInDirectory("c:\\Windows"), now the problem is that different people with different versions of Windows , may have their windows directory named differently (WIN,WIN2000,...) i want to know if i can pass my function such value that will give all files from Windows directory,regardless how the user has called it, for example in REGEDIT , %Windir% is a variable that refers to the Windows installation folder. Regards, m0n0
-
Hello, I have written a function GetFilesInDirectory(CString szpath) , which gets names of all filles in given directory,for example GetFilesInDirectory("c:\\Windows"), now the problem is that different people with different versions of Windows , may have their windows directory named differently (WIN,WIN2000,...) i want to know if i can pass my function such value that will give all files from Windows directory,regardless how the user has called it, for example in REGEDIT , %Windir% is a variable that refers to the Windows installation folder. Regards, m0n0
-
-
TCHAR szWin[MAX_PATH]; TCHAR szSys[MAX_PATH]; GetWindowsDirectory(szWin,MAX_PATH); GetSystemDirectory(szSys,MAX_PATH);
suhredayan
There is no spoon. -
TCHAR szWin[MAX_PATH]; TCHAR szSys[MAX_PATH]; GetWindowsDirectory(szWin,MAX_PATH); GetSystemDirectory(szSys,MAX_PATH);
suhredayan
There is no spoon. -
LPCSTR
means : LP for Long pointer ('cause pointers are 4-bytes long) C for Constant STR for String so, if you likeGetWindowwDirectory()
to write into your variable, it musn't be constant.... understand ?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
LPCSTR
means : LP for Long pointer ('cause pointers are 4-bytes long) C for Constant STR for String so, if you likeGetWindowwDirectory()
to write into your variable, it musn't be constant.... understand ?
TOXCCT >>> GEII power
[toxcct][VisualCalc]wow very nice explanation thank you very helpful