This function is for use by MC-generated code and should not be used directly.
| 511 | |
| 512 | // This function is for use by MC-generated code and should not be used directly. |
| 513 | DECLSPEC_NOINLINE __inline |
| 514 | ULONG __stdcall |
| 515 | McGenEventWrite( |
| 516 | _In_ PMCGEN_TRACE_CONTEXT Context, |
| 517 | _In_ PCEVENT_DESCRIPTOR Descriptor, |
| 518 | _In_opt_ LPCGUID ActivityId, |
| 519 | _In_range_(1, 128) ULONG EventDataCount, |
| 520 | _Pre_cap_(EventDataCount) EVENT_DATA_DESCRIPTOR* EventData |
| 521 | ) |
| 522 | { |
| 523 | const USHORT UNALIGNED* Traits; |
| 524 | |
| 525 | // Some customized MCGEN_EVENTWRITETRANSFER macros might ignore ActivityId. |
| 526 | UNREFERENCED_PARAMETER(ActivityId); |
| 527 | |
| 528 | Traits = (const USHORT UNALIGNED*)(UINT_PTR)Context->Logger; |
| 529 | |
| 530 | if (Traits == NULL) { |
| 531 | EventData[0].Ptr = 0; |
| 532 | EventData[0].Size = 0; |
| 533 | EventData[0].Reserved = 0; |
| 534 | } else { |
| 535 | EventData[0].Ptr = (ULONG_PTR)Traits; |
| 536 | EventData[0].Size = *Traits; |
| 537 | EventData[0].Reserved = 2; // EVENT_DATA_DESCRIPTOR_TYPE_PROVIDER_METADATA |
| 538 | } |
| 539 | |
| 540 | return MCGEN_EVENTWRITETRANSFER( |
| 541 | Context->RegistrationHandle, |
| 542 | Descriptor, |
| 543 | ActivityId, |
| 544 | NULL, |
| 545 | EventDataCount, |
| 546 | EventData); |
| 547 | } |
| 548 | #endif // McGenEventWrite_def |
| 549 | |
| 550 | #if !defined(McGenEventRegisterUnregister) |
no outgoing calls
no test coverage detected