Skip to content
Discussion options

You must be logged in to vote

Your null check is incorrect. When you apply this change:

-if (hTimer == null)
+if (hTimer.IsInvalid)

You'll find you get error 87. If you throw Win32Exception you get the full error message, which indicates you have an invalid parameter in the first of your two calls.

I'm no expert on this API, but my guess is it's your dwDesiredAccess argument.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gavin-Williams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants