.


:




:

































 

 

 

 





.

BOOL CreateDirectory(LPCTSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)

BOOL RemoveDirectory(LPCTSTR lpPathName)

lpPathName , . , NULL; 15. .

UNIX, , , . , . , , . .

BOOL SetCurrentDirectory(LPCTSTR lpPathName)

lpPathName . , (, D:), UNC (, \\ACCTG_SERVER\PUBLIC).

(, : :), . , :

C:\MSDEV

INCLUDE

A:\MEMOS\TODO

:

:

C:\MSDEV\INCLUDE

, , :

DWORD GetCurrentDirectory(DWORD cchCurDir, LPTSTR lpCurDir)

: , , , ; .

cchCurDir , , ( ). . lpCurDir , , .

, , , , . : , cchCurDir.

Windows . 2.6 , . . , . , : , . LookupAccountName, 15.

, 15.4 GetFileSecurity, . , , . , _ .

:

2.6 UNIX pwd. _, , GetCurrent-Directory.

2.6. pwd:

/* 2. pwd . */

#include "EvryThng.h"

#define DIRNAME_LEN MAX_PATH + 2

 

int _tmain(int argc, LPTSTR argv[]) {

TCHAR pwdBuffer [DIRNAME_LEN];

DWORD LenCurDir;

LenCurDir = GetCurrentDirectory(DIRNAME_LEN, pwdBuffer);

if (LenCurDir == 0) ReportError(_T("He ."), 1, TRUE);

if (LenCurDir > DIRNAME_LEN) ReportError(_T(" ."), 2, FALSE);

PrintMsg(GetStdHandle(STD_OUTPUT_HANDLE), pwdBuffer);

return 0;

}

, , Windows , . , , , ASCII, Unicode.

Windows UNIX , . , Windows, UNIX , , .





:


: 2015-09-20; !; : 711 |


:

:

.
==> ...

1302 - | 1253 -


© 2015-2024 lektsii.org - -

: 0.008 .