20 public IKsAggregateControl,
24 public IAMStreamConfig,
219 m_ParentFilter(ParentFilter),
225 m_PipeAllocatorFlag(0),
226 m_bPinBusCacheInitialized(0),
231 m_Communication(Communication),
232 m_InterfaceHandler(0),
234 m_hBufferAvailable(0),
237 m_IoThreadStarted(0),
242 IKsObject * KsObjectParent;
263 KsObjectParent->Release();
294 *
Output = (IKsObject*)(
this);
295 reinterpret_cast<IKsObject*
>(*Output)->AddRef();
300 *
Output = (IKsPinEx*)(
this);
301 reinterpret_cast<IKsPinEx*
>(*Output)->AddRef();
306 *
Output = (IKsPinPipe*)(
this);
307 reinterpret_cast<IKsPinPipe*
>(*Output)->AddRef();
312 *
Output = (IKsAggregateControl*)(
this);
313 reinterpret_cast<IKsAggregateControl*
>(*Output)->AddRef();
359 *
Output = (IKsPinFactory*)(
this);
360 reinterpret_cast<IKsPinFactory*
>(*Output)->AddRef();
378 else if (
IsEqualGUID(refiid, IID_IAMBufferNegotiation))
386 *
Output = (IAMStreamConfig*)(
this);
387 reinterpret_cast<IAMStreamConfig*
>(*Output)->AddRef();
390 else if (
IsEqualGUID(refiid, IID_IMemAllocatorNotifyCallbackTemp))
528 DWORD *pCapabilities)
546 DWORD *pCapabilities)
710 const GUID *pTargetFormat,
712 const GUID *pSourceFormat)
731 DWORD dwCurrentFlags,
742 hr = FilterMediaSeeking->
SetPositions(pCurrent, dwCurrentFlags, pStop, dwStopFlags);
816 hr = FilterMediaSeeking->
GetRate(pdRate);
904 IKsObject * KsObjectParent;
910 hFilter = KsObjectParent->KsGetObjectHandle();
917 KsObjectParent->Release();
929 IKsObject * KsObjectParent;
935 hFilter = KsObjectParent->KsGetObjectHandle();
942 KsObjectParent->Release();
1042 if (
Operation == KsPeekOperation_AddRef)
1126 PFRAMING_PROP FramingProp,
1127 FRAMING_CACHE_OPS Option)
1129 if (Option > Framing_Cache_Write || Option < Framing_Cache_ReadLast)
1146 PFRAMING_PROP FramingProp,
1147 FRAMING_CACHE_OPS Option)
1186 if (
Operation == KsPeekOperation_AddRef)
1197 IKsAllocatorEx *KsAllocator)
1352 ULONG PropertyLength,
1420 DWORD cbInstanceData,
1461 DWORD cbInstanceData,
1502 DWORD *pTypeSupport)
1559 swprintf(
Buffer,
L"COutputPin::Connect CreatePin handle failed with %lx\n",
hr);
1610 swprintf(
Buffer,
L"COutputPin::Connect IMemAllocator::SetProperties failed with hr %lx\n",
hr);
1624 swprintf(
Buffer,
L"COutputPin::Connect IMemAllocator::Commit failed with hr %lx\n",
hr);
1637 swprintf(
Buffer,
L"COutputPin::Connect No IMemAllocatorCallbackTemp interface hr %lx\n",
hr);
1654 swprintf(
Buffer,
L"COutputPin::Connect IMemAllocatorNotifyCallbackTemp::SetNotify failed hr %lx\n",
hr);
1667 swprintf(
Buffer,
L"COutputPin::Connect IMemInputPin::NotifyAllocator failed with hr %lx\n",
hr);
1701 m_Pin = pReceivePin;
1835 IKsObject * KsObjectParent;
1842 hFilter = KsObjectParent->KsGetObjectHandle();
1928 IKsObject * KsObjectParent;
1940 hFilter = KsObjectParent->KsGetObjectHandle();
1980 IKsInterfaceHandler * InterfaceHandler;
2010 if (MediumList->
Count)
2058 swprintf(
Buffer,
L"COutputPin::CreatePin failed to create interface handler %lx\n",
hr);
2066 hr = InterfaceHandler->KsSetPin((IKsPin*)
this);
2072 swprintf(
Buffer,
L"COutputPin::CreatePin failed to initialize interface handler %lx\n",
hr);
2121 IKsObject * KsObjectParent;
2175 swprintf(
Buffer,
L"COutputPin::CreatePinHandle copy format %p pbFormat %lu\n", pmt, pmt->cbFormat);
2189 hFilter = KsObjectParent->KsGetObjectHandle();
2219 swprintf(
Buffer,
L"COutputPin::CreatePinHandle Major %s SubType %s Format %s pbFormat %p cbFormat %u\n", pMajor, pSub, pFormat, pmt->pbFormat, pmt->cbFormat);
2280 ULONG NumProperty = 0;
2282 ULONG NumEvents = 0;
2307 NumProperty /=
sizeof(
GUID);
2309 NumEvents /=
sizeof(
GUID);
2351 *NumGuids = NumProperty+NumEvents+
NumMethods;
2413 PKSSTREAM_SEGMENT * StreamSegment;
2506 hEvent = StreamSegment[0]->CompletionEvent;
2560 return Pin->IoProcessRoutine();
2645 swprintf(
Buffer,
L"COutputPin_SetState Setting State CurState: KSSTATE_STOP KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->
m_PinName,
hr);
2669 swprintf(
Buffer,
L"COutputPin_SetState Setting State CurState KSSTATE_ACQUIRE KSSTATE_PAUSE PinName %s hr %lx\n", pPin->
m_PinName,
hr);
2693 swprintf(
Buffer,
L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_RUN PinName %s hr %lx\n", pPin->
m_PinName,
hr);
2725 swprintf(
Buffer,
L"COutputPin_SetState Setting State CurState: KSSTATE_RUN KSSTATE_PAUSE PinName %s hr %lx\n", pPin->
m_PinName,
hr);
2749 swprintf(
Buffer,
L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->
m_PinName,
hr);
2781 swprintf(
Buffer,
L"COutputPin_SetState Setting State CurState: KSSTATE_ACQUIRE KSSTATE_STOP PinName %s hr %lx\n", pPin->
m_PinName,
hr);
HRESULT WINAPI CKsAllocator_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
#define InterlockedIncrement
#define InterlockedDecrement
enum _PinDirection PIN_DIRECTION
#define STDMETHODCALLTYPE
#define RegCloseKey(hKey)
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
HRESULT STDMETHODCALLTYPE GetCapabilities(DWORD *pCapabilities)
HRESULT STDMETHODCALLTYPE CreatePin(const AM_MEDIA_TYPE *pmt)
HRESULT STDMETHODCALLTYPE GetAllocatorProperties(ALLOCATOR_PROPERTIES *pprop)
IKsInterfaceHandler * m_InterfaceHandler
HRESULT STDMETHODCALLTYPE GetFormat(AM_MEDIA_TYPE **ppmt)
IKsAllocatorEx * m_KsAllocatorEx
HRESULT STDMETHODCALLTYPE GetCurrentPosition(LONGLONG *pCurrent)
ALLOCATOR_PROPERTIES m_Properties
HRESULT STDMETHODCALLTYPE IsFormatSupported(const GUID *pFormat)
PWCHAR STDMETHODCALLTYPE KsGetPinName()
HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **apPin, ULONG *nPin)
friend DWORD WINAPI COutputPin_IoThreadStartup(LPVOID lpParameter)
HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *pInfo)
HRESULT STDMETHODCALLTYPE KsSetPinBusCache(GUID Bus)
HRESULT STDMETHODCALLTYPE Backout(IPin *ppinOut, IGraphBuilder *pGraph)
HRESULT STDMETHODCALLTYPE KsProperty(PKSPROPERTY Property, ULONG PropertyLength, LPVOID PropertyData, ULONG DataLength, ULONG *BytesReturned)
HRESULT STDMETHODCALLTYPE KsReceiveAllocator(IMemAllocator *MemAllocator)
friend HRESULT STDMETHODCALLTYPE COutputPin_SetState(IPin *Pin, KSSTATE State)
HRESULT STDMETHODCALLTYPE KsSetPipe(IKsAllocatorEx *KsAllocator)
HRESULT STDMETHODCALLTYPE BeginFlush()
HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **pPin)
KSPIN_INTERFACE m_Interface
HRESULT STDMETHODCALLTYPE Render(IPin *ppinOut, IGraphBuilder *pGraph)
HRESULT STDMETHODCALLTYPE GetAvailable(LONGLONG *pEarliest, LONGLONG *pLatest)
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
BOOL m_bPinBusCacheInitialized
HRESULT WINAPI IoProcessRoutine()
PWCHAR STDMETHODCALLTYPE KsGetFilterName()
HRESULT STDMETHODCALLTYPE KsDeliver(IMediaSample *Sample, ULONG Flags)
HRESULT STDMETHODCALLTYPE Notify(IBaseFilter *pSelf, Quality q)
HRESULT STDMETHODCALLTYPE NotifyRelease()
HRESULT STDMETHODCALLTYPE GetStopPosition(LONGLONG *pStop)
HRESULT STDMETHODCALLTYPE GetPositions(LONGLONG *pCurrent, LONGLONG *pStop)
HRESULT STDMETHODCALLTYPE IsUsingTimeFormat(const GUID *pFormat)
PKSALLOCATOR_FRAMING_EX m_FramingEx[4]
HRESULT STDMETHODCALLTYPE Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HANDLE m_hBufferAvailable
HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
HRESULT STDMETHODCALLTYPE ConvertTimeFormat(LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
HRESULT STDMETHODCALLTYPE Set(REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData)
HRESULT STDMETHODCALLTYPE KsRemoveAggregate(REFGUID AggregateClass)
HRESULT WINAPI InitializeIOThread()
std::vector< IUnknown * > ProxyPluginVector
COutputPin(IBaseFilter *ParentFilter, LPCWSTR PinName, ULONG PinId, KSPIN_COMMUNICATION Communication)
HRESULT STDMETHODCALLTYPE SetTimeFormat(const GUID *pFormat)
HRESULT STDMETHODCALLTYPE LoadProxyPlugins(LPGUID pGuids, ULONG NumGuids)
HRESULT STDMETHODCALLTYPE KsAddAggregate(IN REFGUID AggregateClass)
FRAMING_PROP m_FramingProp[4]
HRESULT STDMETHODCALLTYPE SetFormat(AM_MEDIA_TYPE *pmt)
HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE *pmt)
HRESULT STDMETHODCALLTYPE GetTimeFormat(GUID *pFormat)
HRESULT STDMETHODCALLTYPE KsQueryMediums(PKSMULTIPLE_ITEM *MediumList)
HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir)
HRESULT STDMETHODCALLTYPE SetSink(IQualityControl *piqc)
ProxyPluginVector m_Plugins
IPin *STDMETHODCALLTYPE KsGetConnectedPin()
HRESULT STDMETHODCALLTYPE GetSupportedSets(LPGUID *pOutGuid, PULONG NumGuids)
HRESULT STDMETHODCALLTYPE KsSetPinFramingCache(PKSALLOCATOR_FRAMING_EX FramingEx, PFRAMING_PROP FramingProp, FRAMING_CACHE_OPS Option)
HRESULT STDMETHODCALLTYPE QuerySupported(REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport)
HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *Id)
ULONG STDMETHODCALLTYPE KsGetPipeAllocatorFlag()
LONG STDMETHODCALLTYPE KsDecrementPendingIoCount()
HRESULT STDMETHODCALLTYPE KsGetPinFramingCache(PKSALLOCATOR_FRAMING_EX *FramingEx, PFRAMING_PROP FramingProp, FRAMING_CACHE_OPS Option)
HRESULT STDMETHODCALLTYPE ConnectionMediaType(AM_MEDIA_TYPE *pmt)
HRESULT STDMETHODCALLTYPE SetRate(double dRate)
HRESULT STDMETHODCALLTYPE CheckCapabilities(DWORD *pCapabilities)
IMemInputPin * m_MemInputPin
HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **ppEnum)
HRESULT STDMETHODCALLTYPE GetPages(CAUUID *pPages)
IMemAllocator * m_MemAllocator
VOID STDMETHODCALLTYPE KsNotifyError(IMediaSample *Sample, HRESULT hr)
HRESULT STDMETHODCALLTYPE GetNumberOfCapabilities(int *piCount, int *piSize)
HRESULT STDMETHODCALLTYPE SetPositions(LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
HRESULT STDMETHODCALLTYPE KsSetPipeAllocatorFlag(ULONG Flag)
HRESULT STDMETHODCALLTYPE EndOfStream()
HRESULT STDMETHODCALLTYPE KsQueryInterfaces(PKSMULTIPLE_ITEM *InterfaceList)
HRESULT STDMETHODCALLTYPE KsPropagateAcquire()
HRESULT STDMETHODCALLTYPE GetRate(double *pdRate)
AM_MEDIA_TYPE m_MediaFormat
HRESULT STDMETHODCALLTYPE Get(REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
HRESULT STDMETHODCALLTYPE KsPinFactory(ULONG *PinFactory)
HRESULT STDMETHODCALLTYPE EndFlush()
HRESULT STDMETHODCALLTYPE KsMediaSamplesCompleted(PKSSTREAM_SEGMENT StreamSegment)
HRESULT STDMETHODCALLTYPE Disconnect()
HRESULT STDMETHODCALLTYPE CheckFormat(const AM_MEDIA_TYPE *pmt)
HRESULT STDMETHODCALLTYPE CreatePinHandle(PKSPIN_MEDIUM Medium, PKSPIN_INTERFACE Interface, const AM_MEDIA_TYPE *pmt)
ULONG m_PipeAllocatorFlag
HRESULT STDMETHODCALLTYPE GetStreamCaps(int iIndex, AM_MEDIA_TYPE **ppmt, BYTE *pSCC)
HRESULT STDMETHODCALLTYPE KsMethod(PKSMETHOD Method, ULONG MethodLength, LPVOID MethodData, ULONG DataLength, ULONG *BytesReturned)
HRESULT STDMETHODCALLTYPE SuggestAllocatorProperties(const ALLOCATOR_PROPERTIES *pprop)
STDMETHODIMP_(ULONG) AddRef()
HRESULT STDMETHODCALLTYPE GetDuration(LONGLONG *pDuration)
HRESULT STDMETHODCALLTYPE GetPreroll(LONGLONG *pllPreroll)
HRESULT STDMETHODCALLTYPE KsGetCurrentCommunication(KSPIN_COMMUNICATION *Communication, KSPIN_INTERFACE *Interface, KSPIN_MEDIUM *Medium)
KSPIN_COMMUNICATION m_Communication
HRESULT STDMETHODCALLTYPE QueryPreferredFormat(GUID *pFormat)
IKsAllocatorEx *STDMETHODCALLTYPE KsGetPipe(KSPEEKOPERATION Operation)
HANDLE STDMETHODCALLTYPE KsGetObjectHandle()
HRESULT STDMETHODCALLTYPE KsEvent(PKSEVENT Event, ULONG EventLength, LPVOID EventData, ULONG DataLength, ULONG *BytesReturned)
HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
STDMETHODIMP_(ULONG) Release()
IMemAllocator *STDMETHODCALLTYPE KsPeekAllocator(KSPEEKOPERATION Operation)
HRESULT STDMETHODCALLTYPE KsRenegotiateAllocator()
HRESULT STDMETHODCALLTYPE KsQualityNotify(ULONG Proportion, REFERENCE_TIME TimeDelta)
HRESULT STDMETHODCALLTYPE KsCreateSinkPinHandle(KSPIN_INTERFACE &Interface, KSPIN_MEDIUM &Medium)
GUID STDMETHODCALLTYPE KsGetPinBusCache()
IBaseFilter * m_ParentFilter
LONG STDMETHODCALLTYPE KsIncrementPendingIoCount()
const GUID IID_IKsPropertySet
KSDATAFORMAT * PKSDATAFORMAT
const GUID IID_IKsPinFactory
const GUID IID_IKsAggregateControl
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
#define INVALID_HANDLE_VALUE
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
UINT(* handler)(MSIPACKAGE *)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
const GUID IID_IKsControl
#define KSPROPERTY_TYPE_SET
#define KSPROPERTY_TYPE_SETSUPPORT
struct KSIDENTIFIER * PKSPROPERTY
#define KSPROPERTY_TYPE_GET
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData
GLdouble GLdouble GLdouble GLdouble q
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT SetNotify([in] IMemAllocatorNotifyCallbackTemp *pNotify)
HRESULT SetProperties([in] ALLOCATOR_PROPERTIES *pRequest, [out] ALLOCATOR_PROPERTIES *pActual)
HRESULT GetBuffer([out] IMediaSample **ppBuffer, [in] REFERENCE_TIME *pStartTime, [in] REFERENCE_TIME *pEndTime, [in] DWORD dwFlags)
HRESULT ReceiveConnection([in] IPin *pConnector, [in] const AM_MEDIA_TYPE *pmt)
HRESULT NewSegment([in] REFERENCE_TIME tStart, [in] REFERENCE_TIME tStop, [in] double dRate)
HRESULT QueryAccept([in] const AM_MEDIA_TYPE *pmt)
struct ISpecifyPropertyPages::tagCAUUID CAUUID
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define KSPRIORITY_NORMAL
@ KSPROPERTY_CONNECTION_ALLOCATORFRAMING
@ KSPROPERTY_CONNECTION_STATE
#define IOCTL_KS_PROPERTY
struct KSPIN_CONNECT * PKSPIN_CONNECT
@ KSPROPERTY_PIN_DATARANGES
@ KSPROPERTY_PIN_INTERFACES
#define KSPROPSETID_Connection
@ KSPIN_COMMUNICATION_BRIDGE
@ KSPIN_COMMUNICATION_NONE
KSIDENTIFIER * PKSPIN_INTERFACE
_In_ PKSPIN_CONNECT Connect
KSIDENTIFIER * PKSPIN_MEDIUM
#define IOCTL_KS_ENABLE_EVENT
#define IOCTL_KS_DISABLE_EVENT
KSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle, ULONG PinFactoryId, ULONG PropertyId, PVOID *Items)
KSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle, ULONG PinFactoryId, ULONG *MediaTypeCount)
KSDDKAPI HRESULT WINAPI KsGetMediaType(int Position, AM_MEDIA_TYPE *AmMediaType, HANDLE FilterHandle, ULONG PinFactoryId)
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
KSDDKAPI DWORD NTAPI KsCreatePin(HANDLE FilterHandle, PKSPIN_CONNECT Connect, ACCESS_MASK DesiredAccess, PHANDLE ConnectionHandle)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
_In_ ULONG _In_ ULONG _In_ ULONG Length
_Check_return_ HRESULT WINAPI StringFromIID(_In_ REFIID rclsid, _Outptr_ LPOLESTR *lplpsz)
HRESULT WINAPI COutputPin_Constructor(IBaseFilter *ParentFilter, LPCWSTR PinName, ULONG PinId, KSPIN_COMMUNICATION Communication, REFIID riid, LPVOID *ppv)
DWORD WINAPI COutputPin_IoThreadStartup(LPVOID lpParameter)
HRESULT STDMETHODCALLTYPE COutputPin_SetState(IPin *Pin, KSSTATE State)
const GUID IID_ISpecifyPropertyPages
#define IsEqualGUID(rguid1, rguid2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
WCHAR achName[MAX_PIN_NAME]
KSPIN_INTERFACE Interface
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define RtlMoveMemory(Destination, Source, Length)
_In_ PUSBD_INTERFACE_LIST_ENTRY InterfaceList
#define VFW_E_ALREADY_CONNECTED
#define VFW_E_NOT_CONNECTED
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define HKEY_LOCAL_MACHINE
_Must_inspect_result_ _In_ ULONG Flags