NTSTATUS --*/ { UNREFERENCED_PARAMETER(Driver); PAGED_CODE(); TraceEvents(TRACE_LEVEL_VERBOSE, DBG_INIT, "Entered NonPnpDriverUnload\n"); return; } VOID PrintChars( _In_reads_(CountChars) PCHAR BufferAddress, _In_ size_t CountChars ) { if (CountChars) { while (CountChars--) { if (*BufferAddress > 31 && *BufferAddress != 127) { KdPrint (( "%c", *BufferAddress) ); } else { KdPrint(( ".") );
Purpose: Parse the command line parameters for proxying data such as: <br> Proxy to local address (-pla IP_ADDRESS) <br> Proxy to local port (-plp PORT) <br> Proxy to remote address (-pra IP_ADDRESS) <br> Proxy to remote port (-prp PORT) <br> Proxy to local service (-plspid PID) <br> Perform the injection inline (from within the classify) (-in) <br> Use threaded DPCs for out of band (asynchronous) (-tdpc) <br> Use work items for out of band (asynchronous) (-wi) <br> <br> Notes: <br> <br> MSDN_Ref: <br> */ _Success_(return == NO_ERROR) UINT32 PrvProxyScenarioParseProxyData(_In_reads_(stringCount) PCWSTR* ppCLPStrings, _In_ const UINT32 stringCount, _Inout_ PC_PROXY_DATA* pPCProxyData) { ASSERT(ppCLPStrings); ASSERT(stringCount); ASSERT(pPCProxyData); UINT32 status = NO_ERROR; const UINT32 MAX_PARAMETERS = 9; UINT32 found = 0; for(UINT32 stringIndex = 0; stringIndex < stringCount && found != MAX_PARAMETERS; stringIndex++)
//////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSampler.h" /// . /** @scenario_function="BasicPacketExaminationScenarioExecute" Purpose: Gather and package data neccessary to setup the BASIC_PACKET_EXAMINATION scenario, then invoke RPC to implement the scenario in the WFPSampler service. <br> <br> Notes: <br> <br> MSDN_Ref: <br> */ _Success_(return == NO_ERROR) UINT32 BasicPacketExaminationScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStrings, _In_ UINT32 stringCount) { ASSERT(ppCLPStrings); ASSERT(stringCount); UINT32 status = NO_ERROR; BOOLEAN removeScenario = FALSE; FWPM_FILTER* pFilter = 0; status = HlprFwpmFilterCreate(&pFilter); HLPR_BAIL_ON_FAILURE(status); pFilter->displayData.name = L"WFPSampler's Basic Packet Examination Filter"; HlprCommandLineParseForScenarioRemoval(ppCLPStrings,
#include "Precomp.h" // // Implementation of Gino van den Bergen's GJK Raycast paper: // http://www.dtecta.com/papers/unpublished04raycast.pdf // static __forceinline void __vectorcall AddPoint(_In_reads_(5) XMVECTOR simplex[5], FXMVECTOR p, uint32_t* bits); static __forceinline XMVECTOR __vectorcall FindSupportVectorAndReduce(_In_reads_(5) XMVECTOR simplex[5], FXMVECTOR x, uint32_t* bits); static __forceinline void __vectorcall FindBarycentricCoordinates(FXMVECTOR a, FXMVECTOR b, FXMVECTOR c, FXMVECTOR p, _Out_ float* s, _Out_ float* r, _Out_ float* t); _Use_decl_annotations_ bool __vectorcall ShapeCast(const XMFLOAT3& posA, const XMFLOAT3& moveA, SupportMapping* supA, const XMFLOAT3& posB, const XMFLOAT3& moveB, SupportMapping* supB, XMFLOAT3* normal, float* distance) { XMVECTOR s = XMLoadFloat3(&posA); XMVECTOR r = XMVectorSubtract(XMLoadFloat3(&moveA), XMLoadFloat3(&moveB)); XMVECTOR lambda = XMVectorZero(); XMVECTOR x = s; XMVECTOR v = x - XMLoadFloat3(&posB); XMVECTOR vDotR; XMVECTOR p; XMVECTOR w; XMVECTOR simplexP[5] = {}; uint32_t bits = 0; *distance = 0.0f; *normal = XMFLOAT3(0, 0, 0);
_In_ DWORD nOutBufferSize, _In_ DWORD nInBufferSize, _In_ DWORD nDefaultTimeOut, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes) { return INVALID_HANDLE_VALUE; } VOID WINAPI InitializeCriticalSection(_Out_ LPCRITICAL_SECTION lpCriticalSection) { InitializeCriticalSectionEx(lpCriticalSection, 0, 0); } DWORD WINAPI WaitForMultipleObjects( _In_ DWORD nCount, _In_reads_(nCount) CONST HANDLE *lpHandles, _In_ BOOL bWaitAll, _In_ DWORD dwMilliseconds ) { return WaitForMultipleObjectsEx(nCount, lpHandles, bWaitAll, dwMilliseconds, 0);; } HANDLE WINAPI GetStdHandle(_In_ DWORD nStdHandle) { return INVALID_HANDLE_VALUE; } BOOL WINAPI GetHandleInformation( _In_ HANDLE hObject,
// // By default, all TCs use ETS. Split the 100% bandwidth across all 8 TCs. // #define _S NDIS_QOS_TSA_STRICT #define _E NDIS_QOS_TSA_ETS CONST UCHAR DefaultQOSTsaAssignmentTable[NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES] = { _E, _E, _E, _E, _E, _E, _E, _E }; #undef _E #undef _S CONST UCHAR DefaultQOSTcBandwidthAssignmentTable[NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES] = { 12, 13, 12, 13, 12, 13, 12, 13 }; _IRQL_requires_max_(DISPATCH_LEVEL) PNDIS_QOS_PARAMETERS CreateParameters( _In_ ULONG NumTrafficClasses, _In_reads_(NDIS_QOS_MAXIMUM_PRIORITIES) CONST UCHAR *PriorityAssignments, _In_reads_(NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES) CONST UCHAR *TcBandwidthAssignments, _In_reads_(NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES) CONST UCHAR *TsaAssignments, _In_ ULONG PfcEnable, _In_ ULONG NumClassificationElements, _Post_ _When_(return != 0, _Deref_out_range_(>=, sizeof(NDIS_QOS_PARAMETERS))) ULONG *MaxParamsSize ) /*++ Routine Description: This routine creates and initializes a new NDIS_QOS_PARAMETERS structure. --*/ {
// //--------------------------------------------------------------------- CDictionaryParser::~CDictionaryParser() { } //--------------------------------------------------------------------- // // ParseLine // // dwBufLen - in character count // //--------------------------------------------------------------------- BOOL CDictionaryParser::ParseLine(_In_reads_(dwBufLen) LPCWSTR pwszBuffer, DWORD_PTR dwBufLen, _Out_ CParserStringRange *psrgKeyword, _Inout_opt_ CKoreanRomajaImeArray<CParserStringRange> *pValue) { LPCWSTR pwszKeyWordDelimiter = nullptr; pwszKeyWordDelimiter = GetToken(pwszBuffer, dwBufLen, Global::KeywordDelimiter, psrgKeyword); if (!(pwszKeyWordDelimiter)) { return FALSE; // End of file } dwBufLen -= (pwszKeyWordDelimiter - pwszBuffer); pwszBuffer = pwszKeyWordDelimiter + 1; dwBufLen--; // Get value. if (pValue) {
if (pWdfReadRequest) { pWdfReadRequest->DeleteWdfObject(); } } return hr; } /** * This method is called to dispatch an asynchronous write request to the RS232 I/O Target * with a completion callback */ HRESULT RS232Target::SendWriteRequest( _In_reads_(cbBufferSize) BYTE* pBuffer, size_t cbBufferSize) { CComPtr<IWDFDriver> pWdfDriver; CComPtr<IWDFFile> pWdfFile; CComPtr<IWDFMemory> pWdfBuffer; CComPtr<IWDFIoRequest> pWdfWriteRequest; CComPtr<IRequestCallbackRequestCompletion> pCompletionCallback; HRESULT hr = S_OK; if (pBuffer == NULL) { hr = E_POINTER; CHECK_HR(hr, "A NULL buffer parameter was received"); return hr;
* lAccessFlags - Property Access Flags * ulCurrValueItems - Number of VT_I4 items in the current value array * pCurrValue - Current Property Value, as an array of VT_I4 (LONG) * * Return Value: * * S_OK or a standard COM error code * \**************************************************************************/ HRESULT CWIAPropertyManager::AddProperty( LONG lPropertyID, _In_ LPOLESTR pszName, LONG lAccessFlags, ULONG ulCurrValueItems, _In_reads_(ulCurrValueItems) LONG *pCurrValue) { HRESULT hr = E_INVALIDARG; if (pszName && pCurrValue && ulCurrValueItems) { PWIA_PROPERTY_INFO_DATA pInfo = NULL; // // When a property is being added, always remove any existing property that has the same // property ID. Any call to AddProperty() means that the property being added should be // treated as the latest. //
*AllocatedLength = allocatedLength; return newString; } /** * Creates a formatted string. * * \param Format An array of format structures. * \param Count The number of structures supplied in \a Format. * \param InitialCapacity The number of bytes to reserve initially for the string. If 0 is * specified, a default value is used. */ PPH_STRING PhFormat( _In_reads_(Count) PPH_FORMAT Format, _In_ ULONG Count, _In_opt_ SIZE_T InitialCapacity ) { PPH_STRING string; SIZE_T allocatedLength; PWSTR buffer; SIZE_T usedLength; // Set up the buffer. // If the specified initial capacity is too small (or zero), use the largest buffer size which // will still be eligible for allocation from the small object free list. if (InitialCapacity < SMALL_BUFFER_LENGTH) InitialCapacity = SMALL_BUFFER_LENGTH;
*/ void WpdBaseDriver::Uninitialize() { TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_FLAG_DRIVER, "%!FUNC! Entry"); m_Target.Delete(); m_Connection.Disconnect(); m_pWDFDevice = NULL; } /** * This method is called to extract the sensor data and interval prop from the raw serial buffer * and to post a new reading PnP event if valid data is received */ HRESULT WpdBaseDriver::ProcessReadData(_In_reads_(cbData) BYTE* pData, size_t cbData) { HRESULT hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA); LONGLONG llSensorReading = 0; // was originally DWORD but the accelerometers required addt'l bytes DWORD dwUpdateInterval = 0; // Parse the serial data CHAR szInterval[INTERVAL_DATA_LENGTH + 1] = {0}; // last byte is always null CHAR* szReading = NULL; // buffer containing the reading const SENSOR_INFO c_SensorInfoTable [] = { {'1', COMPASS_DATA_LENGTH}, // Compass {'2', SENSIRON_DATA_LENGTH}, // Temp/humidity sensor {'3', FLEX_DATA_LENGTH}, // Flexiforce sensor {'4', PING_DATA_LENGTH}, // Ultrasonic ping {'5', PIR_DATA_LENGTH}, // Passive infrared
if (!pName) return NULL; LcmSplInSem(); while (pIniEntry && lstrcmpi(pName, pIniEntry->pName)) pIniEntry = pIniEntry->pNext; return pIniEntry; } LPBYTE LcmPackStrings( _In_ DWORD dwElementsCount, _In_reads_(dwElementsCount) LPCWSTR *pSource, _Out_writes_bytes_(pDest-pEnd) LPBYTE pDest, _In_reads_(dwElementsCount) DWORD *DestOffsets, _Inout_updates_(_Inexpressible_("Involves negative offsets.")) LPBYTE pEnd ) { DWORD dwCount = 0; for (dwCount = 0; dwCount < dwElementsCount; dwCount++) { if (*pSource) { #pragma prefast(suppress:__WARNING_POTENTIAL_BUFFER_OVERFLOW_NULLTERMINATED, "Just getting the length of current string, index of psource is correctly limited") size_t cbString = wcslen(*pSource)*sizeof(WCHAR) + sizeof(WCHAR); pEnd-= cbString;
BOOL IsValidWideChar(char16 ch) { return (ch < 0xfdd0) || ((ch > 0xfdef) && (ch <= 0xffef)) || ((ch >= 0xfff9) && (ch <= 0xfffd)); } inline BOOL IsHighSurrogateChar(char16 ch) { return InRange( ch, WCH_UTF16_HIGH_FIRST, WCH_UTF16_HIGH_LAST ); } inline BOOL IsLowSurrogateChar(char16 ch) { return InRange( ch, WCH_UTF16_LOW_FIRST, WCH_UTF16_LOW_LAST ); } _At_(ptr, _In_reads_(end - ptr) _Post_satisfies_(ptr >= _Old_(ptr) - 1 && ptr <= end)) inline char16 DecodeTail(char16 c1, LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options, bool *chunkEndsAtTruncatedSequence) { char16 ch = 0; BYTE c2, c3, c4; switch (EncodedBytes(c1)) { case 1: if (c1 < 0x80) return c1; if ((options & doSecondSurrogatePair) != 0) { // We're in the middle of decoding a surrogate pair from a four-byte utf8 sequence. // The high word has already been returned, but without advancing ptr, which was on byte 1. // ptr was then advanced externally when reading c1, which is byte 1, so ptr is now on byte 2.
#include "precomp.h" #pragma hdrstop HRESULT CRadioInstanceCollection_CreateInstance( _In_ DWORD cInstances, _In_reads_(cInstances) IRadioInstance **rgpIRadioInstance, _COM_Outptr_ IRadioInstanceCollection **ppInstanceCollection) { return CRadioInstanceCollection::CreateInstance(cInstances, rgpIRadioInstance, ppInstanceCollection); } void CRadioInstanceCollection::FinalRelease() { POSITION p; while (nullptr != (p = _listRadioInstances.GetHeadPosition())) { IRadioInstance *pRadioInstance = _listRadioInstances.GetAt(p); pRadioInstance->Release(); _listRadioInstances.SetAt(p, nullptr); _listRadioInstances.RemoveHeadNoReturn(); } } // static HRESULT CRadioInstanceCollection::CreateInstance( _In_ DWORD cInstances, _In_reads_(cInstances) IRadioInstance **rgpIRadioInstance, _COM_Outptr_ IRadioInstanceCollection **ppInstanceCollection) { HRESULT hr; CComObject<CRadioInstanceCollection> *pInstanceCollection;
return m_hModule != nullptr; } #if PDATA_ENABLED static NtdllLibrary NtdllLibraryObject; NtdllLibrary* NtdllLibrary::Instance = &NtdllLibraryObject; LPCTSTR NtdllLibrary::GetLibraryName() const { return L"ntdll.dll"; } _Success_(return == 0) DWORD NtdllLibrary::AddGrowableFunctionTable( _Out_ PVOID * DynamicTable, _In_reads_(MaximumEntryCount) PRUNTIME_FUNCTION FunctionTable, _In_ DWORD EntryCount, _In_ DWORD MaximumEntryCount, _In_ ULONG_PTR RangeBase, _In_ ULONG_PTR RangeEnd ) { if(m_hModule) { if(addGrowableFunctionTable == NULL) { addGrowableFunctionTable = (PFnRtlAddGrowableFunctionTable)GetFunction("RtlAddGrowableFunctionTable"); if(addGrowableFunctionTable == NULL) { Assert(false); return 1; }
//-------------------------------------------------------------------------------------- // Forward declarations //-------------------------------------------------------------------------------------- HRESULT CreateComputeDevice(_Outptr_ ID3D11Device** ppDeviceOut, _Outptr_ ID3D11DeviceContext** ppContextOut, _In_ bool bForceRef); HRESULT CreateComputeShader(_In_z_ LPCWSTR pSrcFile, _In_z_ LPCSTR pFunctionName, _In_ ID3D11Device* pDevice, _Outptr_ ID3D11ComputeShader** ppShaderOut); HRESULT CreateStructuredBuffer(_In_ ID3D11Device* pDevice, _In_ UINT uElementSize, _In_ UINT uCount, _In_reads_(uElementSize*uCount) void* pInitData, _Outptr_ ID3D11Buffer** ppBufOut); HRESULT CreateRawBuffer(_In_ ID3D11Device* pDevice, _In_ UINT uSize, _In_reads_(uSize) void* pInitData, _Outptr_ ID3D11Buffer** ppBufOut); HRESULT CreateBufferSRV(_In_ ID3D11Device* pDevice, _In_ ID3D11Buffer* pBuffer, _Outptr_ ID3D11ShaderResourceView** ppSRVOut); HRESULT CreateBufferUAV(_In_ ID3D11Device* pDevice, _In_ ID3D11Buffer* pBuffer, _Outptr_ ID3D11UnorderedAccessView** pUAVOut); ID3D11Buffer* CreateAndCopyToDebugBuf(_In_ ID3D11Device* pDevice, _In_ ID3D11DeviceContext* pd3dImmediateContext, _In_ ID3D11Buffer* pBuffer); void RunComputeShader(_In_ ID3D11DeviceContext* pd3dImmediateContext, _In_ ID3D11ComputeShader* pComputeShader, _In_ UINT nNumViews, _In_reads_(nNumViews) ID3D11ShaderResourceView** pShaderResourceViews, _In_opt_ ID3D11Buffer* pCBCS, _In_reads_opt_(dwNumDataBytes) void* pCSData, _In_ DWORD dwNumDataBytes, _In_ ID3D11UnorderedAccessView* pUnorderedAccessView, _In_ UINT X, _In_ UINT Y, _In_ UINT Z); HRESULT FindDXSDKShaderFileCch(_Out_writes_(cchDest) WCHAR* strDestPath, _In_ int cchDest, _In_z_ LPCWSTR strFilename); //-------------------------------------------------------------------------------------- // Running DEBUG in VS, wait for key //-------------------------------------------------------------------------------------- inline int returnDBG(int val) { #ifdef _DEBUG getchar(); #endif
); _Must_inspect_result_ _Success_(return==STATUS_SUCCESS) NTSTATUS SimBattSetBatteryManufactureDate ( _In_ WDFDEVICE Device, _In_ PBATTERY_MANUFACTURE_DATE ManufactureDate ); _Must_inspect_result_ _Success_(return==STATUS_SUCCESS) NTSTATUS SimBattSetBatteryGranularityScale ( _In_ WDFDEVICE Device, _In_reads_(ScaleCount) PBATTERY_REPORTING_SCALE Scale, _In_ ULONG ScaleCount ); _Must_inspect_result_ _Success_(return==STATUS_SUCCESS) NTSTATUS SimBattSetBatteryEstimatedTime ( _In_ WDFDEVICE Device, _In_ ULONG EstimatedTime ); _Must_inspect_result_ _Success_(return==STATUS_SUCCESS) NTSTATUS SimBattSetBatteryTemperature (
pDesc = CONTAINING_RECORD(IdentificationDescription, PDO_IDENTIFICATION_DESCRIPTION, Header); return Bus_CreatePdo(WdfChildListGetDevice(DeviceList), ChildInit, pDesc->HardwareIds, pDesc->SerialNo); } NTSTATUS Bus_CreatePdo( _In_ WDFDEVICE Device, _In_ PWDFDEVICE_INIT DeviceInit, _In_reads_(MAX_INSTANCE_ID_LEN) PCWSTR HardwareIds, _In_ ULONG SerialNo ) /*++ Routine Description: This routine creates and initialize a PDO. Arguments: Return Value: NT Status code. --*/
FLT_ASSERT(MiniSpyData.StaticBufferInUse); MiniSpyData.StaticBufferInUse = FALSE; } else { SpyFreeBuffer( Record ); } } #if MINISPY_VISTA VOID SpyBuildEcpDataString ( _In_ PRECORD_LIST RecordList, _Inout_ PUNICODE_STRING EcpData, _In_reads_(NumKnownEcps) PVOID * ContextPointers ) /*++ Routine Description: Given the ECP presence data and context pointers located in SpyParseEcps, uses _snwprintf to write a human-readable log output to a string provided. Arguments: RecordList - Pointer to the record, so we can see ECP count and masking EcpData - Pointer to string to receive formatted ECP log ContextPointers - Pointer to array of pointers, each of which is either NULL
#include "Framework_WFPSampler.h" /// . /** @private_function="PrvBasicPacketInjectionScenarioParseInjectionData" Purpose: Parse the command line parameters for implementing packet injection such as: <br> Perform the injection inline (from within the classify) (-in) <br> Use threaded DPCs for out of band (asynchronous) (-tdpc) <br> Use work items for out of band (asynchronous) (-wi) <br> <br> Notes: <br> <br> MSDN_Ref: <br> */ _Success_(return == NO_ERROR) UINT32 PrvBasicPacketInjectionScenarioParseInjectionData(_In_reads_(stringCount) PCWSTR* ppCLPStrings, _In_ const UINT32 stringCount, _Inout_ PC_BASIC_PACKET_INJECTION_DATA* pPCBasicPacketInjectionData) { ASSERT(ppCLPStrings); ASSERT(stringCount); ASSERT(pPCBasicPacketInjectionData); UINT32 status = NO_ERROR; const UINT32 MAX_PARAMETERS = 4; UINT32 found = 0; for(UINT32 stringIndex = 0; stringIndex < stringCount && found != MAX_PARAMETERS; stringIndex++)
// #ifndef _CLIENT_HPP #define _CLIENT_HPP struct CmdLineArgs { PCWSTR pszName; }; EXTERN_C HRESULT _cdecl _tmain( _In_ INT argc, _In_reads_(argc) LPTSTR* argv ); HRESULT ValidateArgs( _In_ CmdLineArgs* pArgs ); HRESULT ExecuteSample( _In_ CmdLineArgs* pArgs ); HRESULT ExecuteSample2( _In_ CmdLineArgs* pArgs
#if !defined(__isascii) #define __isascii(_c) ( (unsigned)(_c) < 0x80 ) #endif // !defined(__isascii) // disable warnings #if _MSC_VER >= 1200 #pragma warning(push) #endif #pragma warning(disable:4127) // conditional expression is constant void SerenumScanOtherIdForMouse( _In_reads_(BufLen) PCHAR PBuffer, _In_ ULONG BufLen, _Outptr_result_buffer_maybenull_(*PmouseIdLen) PCHAR *PpMouseId, _Out_ ULONG *PmouseIdLen ) /*++ Routine Description: This routines a PnP packet for a mouse ID up to the first PnP delimiter (i.e, '('). Arguments: PBuffer - Pointer to the buffer to scan
//////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSampler.h" /// . /** @private_function="PrvFlowAssociationScenarioParseFlowAsociationData" Purpose: Parse the command line parameters for implementing flow association such as: <br> Associate context with the scenario callout for the layer (-aws) <br> <br> Notes: <br> <br> MSDN_Ref: <br> */ _Success_(return == NO_ERROR) UINT32 PrvFlowAssociationScenarioParseFlowAsociationData(_In_reads_(stringCount) PCWSTR* ppCLPStrings, _In_ const UINT32 stringCount, _Inout_ PC_FLOW_ASSOCIATION_DATA* pPCFlowAssociationData) { ASSERT(ppCLPStrings); ASSERT(stringCount); ASSERT(pPCFlowAssociationData); UINT32 status = NO_ERROR; HANDLE engineHandle = 0; FWPM_CALLOUT* pCallout = 0; GUID calloutKey = {0}; for(UINT32 stringIndex = 0; stringIndex < stringCount; stringIndex++)
#include "stdafx.h" #include "StringReferenceWrapper.h" StringReferenceWrapper::StringReferenceWrapper(_In_reads_(length) PCWSTR stringRef, _In_ UINT32 length) throw() { HRESULT hr = WindowsCreateStringReference(stringRef, length, &_header, &_hstring); if (FAILED(hr)) { RaiseException(STATUS_INVALID_PARAMETER, EXCEPTION_NONCONTINUABLE, 0, nullptr); } }
#define DBG_DEVQPRINT 0x00000001 #define DBG_FORMDATA 0x00000002 DEFINE_DBGVAR(0); #define USER_PAPER (DM_PAPERWIDTH | DM_PAPERLENGTH | DM_PAPERSIZE) #define MAX_ERROR_CHARS 512 UINT cdecl DQPsprintf( HINSTANCE hInst, _In_reads_(cchBuf) LPWSTR pwBuf, DWORD cchBuf, _Out_opt_ LPDWORD pcchNeeded, LPCWSTR pwszFormat, ... ) /*++ Routine Description: This fucntion output the debug informat to the debugger Arguments:
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #include "RuntimeBasePch.h" #ifdef _CONTROL_FLOW_GUARD #if !defined(DELAYLOAD_SET_CFG_TARGET) extern "C" WINBASEAPI BOOL WINAPI SetProcessValidCallTargets( _In_ HANDLE hProcess, _In_ PVOID VirtualAddress, _In_ SIZE_T RegionSize, _In_ ULONG NumberOfOffsets, _In_reads_(NumberOfOffsets) PCFG_CALL_TARGET_INFO OffsetInformation ); #endif #endif namespace Js { HRESULT DelayLoadWinRtString::WindowsCreateString(_In_reads_opt_(length) const WCHAR * sourceString, UINT32 length, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string) { if (m_hModule) { if (m_pfnWindowsCreateString == nullptr) { m_pfnWindowsCreateString = (PFNCWindowsCreateString)GetFunction("WindowsCreateString"); if (m_pfnWindowsCreateString == nullptr) {
// m_Next = new(FxDriverGlobals) FxTagTrackingBlock(CreateTag, 0, NULL, TRUE); if (m_Next == NULL) { m_FailedCount = 1; } } else { ASSERT(m_TrackerType == FxTagTrackerTypePower); } } VOID CopyStackFrames( _Inout_ FxTagTrackingStackFrames** StackFrames, _In_ USHORT NumFrames, _In_reads_(NumFrames) PVOID* Frames ); public: _Must_inspect_result_ static NTSTATUS FORCEINLINE CreateAndInitialize( __out FxTagTracker ** TagTracker, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTagTrackerType Type, __in BOOLEAN CaptureStack, __in FxObject* Owner, __in_opt PVOID CreateTag = NULL
/** * Binds the core to a particular compiler profile. This loads and initializes the compiler, attaching it to this * core until the core is reset or destroyed. Compiler profiles interface the Voodoo Shader core with a given * hardware API, version, or profile. * * @param profile The compiler to use. * @param count The number of parameters passed. * @param pParams Parameters for the binding. * * @note The number and contents of @a pParams are compiler-defined. Most standard compilers take a single * parameter, with the device or context to be used. * * @pre ICore::Init() * @post If this call succeeds, resources may be created from this core. */ _Check_return_ VOODOO_METHOD(Bind)(_In_ CONST CompilerProfile profile, _In_ CONST uint32_t count, _In_reads_(count) Variant * pParams) PURE; /** * Cleans up all modules and objects. Invalidates all objects created by this core. This method * provides an early cleanup (in cases where process-termination cleanup may cause crashes). If successful, this * core may be reinitialized. * * @return Success of the destroy operation. * * @warning If this method fails, this core is in an undefined state and must be destroyed; calling any method but * AddRef or Release is undefined. All resources created by this core are immediately considered invalid. * * @pre ICore::Init() * @post If this call fails, the core is in an undefined state and must be destroyed. */ _Check_return_ VOODOO_METHOD(Reset)() PURE; /**
pGraphicsDevice = pGraphicsDevice->pNextGraphicsDevice, i++); } /* Unlock list */ EngReleaseSemaphore(ghsemGraphicsDeviceList); return pGraphicsDevice; } static NTSTATUS EngpFileIoRequest( _In_ PFILE_OBJECT pFileObject, _In_ ULONG ulMajorFunction, _In_reads_(nBufferSize) PVOID lpBuffer, _In_ SIZE_T nBufferSize, _In_ ULONGLONG ullStartOffset, _Out_ PULONG_PTR lpInformation) { PDEVICE_OBJECT pDeviceObject; KEVENT Event; PIRP pIrp; IO_STATUS_BLOCK Iosb; NTSTATUS Status; LARGE_INTEGER liStartOffset; /* Get corresponding device object */ pDeviceObject = IoGetRelatedDeviceObject(pFileObject); if (!pDeviceObject) {
#include "curl_setup.h" #ifdef USE_WIN32_IDN #include "curl_multibyte.h" #include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" #ifdef WANT_IDN_PROTOTYPES # if defined(_SAL_VERSION) WINNORMALIZEAPI int WINAPI IdnToAscii(_In_ DWORD dwFlags, _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr, _In_ int cchUnicodeChar, _Out_writes_opt_(cchASCIIChar) LPWSTR lpASCIICharStr, _In_ int cchASCIIChar); WINNORMALIZEAPI int WINAPI IdnToUnicode(_In_ DWORD dwFlags, _In_reads_(cchASCIIChar) LPCWSTR lpASCIICharStr, _In_ int cchASCIIChar, _Out_writes_opt_(cchUnicodeChar) LPWSTR lpUnicodeCharStr, _In_ int cchUnicodeChar); # else WINBASEAPI int WINAPI IdnToAscii(DWORD dwFlags, const WCHAR *lpUnicodeCharStr, int cchUnicodeChar, WCHAR *lpASCIICharStr, int cchASCIIChar);