HRESULT SHGetDesktopFolder(IShellFolder **ppshf);

함수 설명
Retrieves the IShellFolder interface for the desktop folder, which is the root of the shell's namespace.

파라미터 ppshf
Address that receives an IShellFolder interface pointer for the desktop folder. The calling application is responsible for eventually freeing the interface by calling its Release method.

리턴값
Returns NOERROR if successful, or an OLE-defined error result otherwise.

위의 함수를 사용하여 우리가 얻을 수 있는 값은 바탕화면의
IShellFolder 인터페이스이다.

위의 함수를 이용하여 SHPathToPidl이라는 함수를 아래에 구현하였다.

이 함수를 이용하여 우리가 원하는 IShellFolder 인터페이스를 구하여 메서드인 ParseDisplayName() 함수를 이용하여 필요한 경로를 PIDL로 변경 가능하고..
또한 위에서 구해진 인터페이스를 통하여 앞으로 공부해나갈 네임스페이스 익스텐션들을 구현할 수 있다.

+ Recent posts