Shell32SHGetDesktopFolder Method
Retrieves the
IShellFolder interface for the desktop folder, which is the root of the Shell's namespace.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
[SecurityCriticalAttribute]
public static HResult SHGetDesktopFolder(
out IShellFolder refShellFolder
)
<DllImportAttribute("Shell32.dll", CharSet := CharSet.Unicode, ExactSpelling := true>]
<SecurityCriticalAttribute>
Public Shared Function SHGetDesktopFolder (
<OutAttribute> ByRef refShellFolder As IShellFolder
) As HResult
Dim refShellFolder As IShellFolder
Dim returnValue As HResult
returnValue = Shell32.SHGetDesktopFolder(refShellFolder)
public:
[DllImportAttribute(L"Shell32.dll", CharSet = CharSet::Unicode, ExactSpelling = true)]
[SecurityCriticalAttribute]
static HResult SHGetDesktopFolder(
[OutAttribute] IShellFolder^% refShellFolder
)
[<DllImportAttribute("Shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)>]
[<SecurityCriticalAttribute>]
static member SHGetDesktopFolder :
refShellFolder : IShellFolder byref -> HResult
No code example is currently available or this language may not be supported.
- refShellFolder IShellFolder
-
When this method returns, receives an IShellFolder interface pointer for the desktop folder.
The calling application is responsible for eventually freeing the interface by calling its IUnknown.Release method.
HResult
If this function succeeds, it returns
S_OK.
Otherwise, it returns an
HResult error code.