ShlwApiIUnknown_QueryService Method
Retrieves an interface for a service from a specified object.
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("ShlwApi.dll", CharSet = CharSet.Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true)]
public static HResult IUnknown_QueryService(
IntPtr pUnk,
ref Guid refGuidService,
ref Guid refRiid,
out IntPtr refPpvOut
)
<DllImportAttribute("ShlwApi.dll", CharSet := CharSet.Ansi, BestFitMapping := false,
ThrowOnUnmappableChar := true>]
Public Shared Function IUnknown_QueryService (
pUnk As IntPtr,
ByRef refGuidService As Guid,
ByRef refRiid As Guid,
<OutAttribute> ByRef refPpvOut As IntPtr
) As HResult
Dim pUnk As IntPtr
Dim refGuidService As Guid
Dim refRiid As Guid
Dim refPpvOut As IntPtr
Dim returnValue As HResult
returnValue = ShlwApi.IUnknown_QueryService(pUnk,
refGuidService, refRiid, refPpvOut)
public:
[DllImportAttribute(L"ShlwApi.dll", CharSet = CharSet::Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true)]
static HResult IUnknown_QueryService(
IntPtr pUnk,
Guid% refGuidService,
Guid% refRiid,
[OutAttribute] IntPtr% refPpvOut
)
[<DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true)>]
static member IUnknown_QueryService :
pUnk : IntPtr *
refGuidService : Guid byref *
refRiid : Guid byref *
refPpvOut : IntPtr byref -> HResult
No code example is currently available or this language may not be supported.
- pUnk IntPtr
-
A pointer to the IUnknown instance of the COM object that supports the service..
- refGuidService Guid
-
The service's unique identifier (SID).
- refRiid Guid
-
The IID of the desired service interface.
- refPpvOut IntPtr
-
When this method returns, contains the interface pointer requested refRiid.
If successful, the calling application is responsible for calling IUnknown.Release() method
using this value when the service is no longer needed.
In the case of failure, this value is NULL
HResult
Returns
S_OK if successful.
Returns
E_FAIL if the object does not support
IServiceProvider.
Otherwise, the function returns the
HResult value returned by the
object's
QueryService method.