369{
371
372 if (m_UseContextForQuery) {
373
374
375
376
377
379
382
385 "WDFWMIINSTANCE %p query instance using context for query, "
386 "query buffer length %d, context length %d, %!STATUS!",
388 }
389 else {
391
393 &GetContextHeader()->
Context[0],
394 m_ContextLength);
395 }
396 }
397 else if (m_QueryInstanceCallback.m_Method !=
NULL) {
399
401 ASSERT(m_Provider->GetMinInstanceBufferSize() == 0);
404 }
405
406 status = m_QueryInstanceCallback.Invoke(
412 );
413
417 "WDFWMIINSTANCE %p was queried and returned %!STATUS!, which is "
419
421
424 }
427
428
429
430
433 "WDFWMIINSTANCE %p was queried with buffer size %d, "
434 " but returned %d bytes and %!STATUS!, should return "
435 "!NT_SUCCESS in this case",
437
439
442 }
444
445
446
447
449 }
450 }
452 if (m_Provider->GetMinInstanceBufferSize()) {
455 "WDFWMIINSTANCE %p returned %!STATUS!, but it specified "
456 "a minimum instance size %d in its WDFWMIPROVIDER %p",
458 m_Provider->GetHandle());
461 "This is a break in the contract. Minimum instance size "
462 "should only be used for fixed sized instances");
463
465 }
466 }
467 }
468 else {
469 ASSERT(m_ExecuteMethodCallback.m_Method !=
NULL);
470
473 "WDFWMIINSTANCE %p was queried with no query callback and supports "
474 "execute method (%p), zero bytes returned",
GetHandle(),
475 m_ExecuteMethodCallback.m_Method);
476
479 }
480
482}
#define NT_SUCCESS(StatCode)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxVerifierDbgBreakPoint(pFxDriverGlobals)
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
#define STATUS_BUFFER_TOO_SMALL
#define TRACE_LEVEL_ERROR
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_UNSUCCESSFUL
_In_ ULONG _Out_ PULONG BufferUsed