Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
Created April 23, 2012 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piscisaureus/2472912 to your computer and use it in GitHub Desktop.
Save piscisaureus/2472912 to your computer and use it in GitHub Desktop.
#include <assert.h>
#include <stdio.h>
#include <Windows.h>
void __stdcall apc(ULONG_PTR context) {
printf("APC jeuj\n");
}
int main() {
HANDLE e;
e = CreateEvent(NULL, TRUE, TRUE, NULL);
QueueUserAPC(apc, GetCurrentThread(), 42);
WaitForSingleObjectEx(e, INFINITE, TRUE);
printf("WaitForSingleObjectEx returned\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment