3 #define ID_SAMPLE_MENU_ITEM 1
4 #define ID_SHOW_ME_SOME_OBJECTS 2
7 __in_opt PVOID Parameter,
12 __in_opt PVOID Parameter,
17 __in_opt PVOID Parameter,
22 __in_opt PVOID Parameter,
27 __in_opt PVOID Parameter,
32 __in_opt PVOID Parameter,
45 __in HINSTANCE Instance,
47 __reserved PVOID Reserved
52 case DLL_PROCESS_ATTACH:
57 PluginInstance =
PhRegisterPlugin(L
"ProcessHacker.SamplePlugin", Instance, &info);
71 &PluginLoadCallbackRegistration
77 &PluginShowOptionsCallbackRegistration
83 &PluginMenuItemCallbackRegistration
90 &MainWindowShowingCallbackRegistration
96 &GetProcessHighlightingColorCallbackRegistration
102 &GetProcessTooltipTextCallbackRegistration
125 __in_opt PVOID Parameter,
143 __in_opt PVOID Parameter,
147 PhShowError((HWND)Parameter, L
"Show some options here.");
164 MB_ICONINFORMATION | MB_OKCANCEL,
172 return result == IDOK;
176 __in_opt PVOID Parameter,
182 switch (menuItem->
Id)
192 HANDLE directoryHandle;
200 if (
NT_SUCCESS(status = NtOpenDirectoryObject(&directoryHandle, DIRECTORY_QUERY, &oa)))
203 NtClose(directoryHandle);
211 __in_opt PVOID Parameter,
223 __in_opt PVOID Parameter,
230 processItem = getHighlightingColor->
Parameter;
233 if (getHighlightingColor->
Handled)
239 getHighlightingColor->
BackColor = RGB(0x00, 0x00, 0x00);
246 __in_opt PVOID Parameter,
258 L
"Sample plugin:\n The process name is: %s\n",