Skip to content

Use EnableTraceEx to support Windows 2008 Server SP1#5

Open
superfashi wants to merge 1 commit into
bi-zone:masterfrom
superfashi:master
Open

Use EnableTraceEx to support Windows 2008 Server SP1#5
superfashi wants to merge 1 commit into
bi-zone:masterfrom
superfashi:master

Conversation

@superfashi

Copy link
Copy Markdown

EnableTraceEx2 only exists after Windows 2008 Server SP2, yet the new features are not being used. Switch to EnableTraceEx for better backwards compatibility.

@yalegko

yalegko commented May 18, 2021

Copy link
Copy Markdown
Member

Hey! Thank you for the contribution and huge sorry for a late answer!

Sadly, I'm unsure that we can safely move to the EnableTraceEx for the all OS w/o breaking any features available now.

For example, I'm not sure that EnableTraceEx is forward(?) compatible and supports new EnableProperty values listed in (v2) ENABLE_TRACE_PARAMETERS structure, such as:

  • EVENT_ENABLE_PROPERTY_EVENT_KEY;
  • EVENT_ENABLE_PROPERTY_PROCESS_START_KEY;
  • etc.

Are there any clear (and preferably official) list of differences between features of EnableTraceEx vs EnableTraceEx2?

As for support of Windows 2008 Server SP1 and below, I believe it's out of maintenance now, isn't it? Perhaps we could think about a fallback to the old API when the new one is not available, but I'm unsure how useful it would be.

@superfashi

Copy link
Copy Markdown
Author

fallback seems to be a better option, though I think the old API EnableTraceEx definitely has its EnableProperty the same as ENABLE_TRACE_PARAMETERS.EnableProperty. If you want to make sure, probably I can reverse the library and see if they get processed by the same function.

@yalegko

yalegko commented Jun 6, 2021

Copy link
Copy Markdown
Member

I'm not sure that we could just RE a DLL and ensure it in a one single version.

I'm concerned about our future need in modern API and about MS guys who will change the undocumented behaviour somehow.

So, as for me, small and readable fallback (can we make it nice?) seems a better option.

p.s. Huge sorry for answering once a month! 😅

scudette pushed a commit to scudette/etw that referenced this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants