ICurrentWorkingDirectory::GetDirectory method

Gets the current working directory.

Syntax


HRESULT GetDirectory(
  [out] PWSTR pwzPath,
        DWORD cchSize
);

Parameters

pwzPath [out]

Type: PWSTR

Pointer to a buffer that, when this method returns successfully, receives the current working directory's fully qualified path as a null-terminated Unicode string.

cchSize

Type: DWORD

The size of the buffer in Unicode characters, including the terminating NULL character.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shlobj.h

DLL

Shell32.dll (version 5.0 or later)

 

 

Show: