Enables a privilege for the duration of one function
Syntax
HRESULT WINAPI SHInvokePrivilegedFunctionW (
LPCWSTR pPriv,
PFNPRIVFUNC pfnFunction,
PVOID pCtx
)
Parameters
- pPriv
- The privilege to enable for this call
- pfnFunction
- The privilieged function to call
- pCtx
- A parameter to pass to pfnFunction
Return Value
The called functions return value on success, E_INVALIDARG on failure
Remarks
PFNPRIVFUNC is defined as
typedef HRESULT (WINAPI*PFNPRIVFUNC)(PVOID pCtx);The function is disabled as of Windows 7. It simply forwards to SHUnimpl.dll export 345, which returns E_NOTIMPL.
This function is also known as _SHInvokePrivilegedFunctionW@12.