27 typedef struct _BOX_INFO
31 WCHAR IpcRootBuffer[256];
34 typedef struct _BOXED_PROCESS
41 _In_opt_ PVOID Parameter,
42 _In_opt_ PVOID Context
46 _In_opt_ PVOID Parameter,
47 _In_opt_ PVOID Context
51 _In_opt_ PVOID Parameter,
52 _In_opt_ PVOID Context
56 _In_opt_ PVOID Parameter,
57 _In_opt_ PVOID Context
61 _In_opt_ PVOID Parameter,
62 _In_opt_ PVOID Context
66 _In_opt_ PVOID Parameter,
67 _In_opt_ PVOID Context
71 _In_opt_ PVOID Parameter,
72 _In_opt_ PVOID Context
76 _In_opt_ PVOID Parameter,
77 _In_opt_ PVOID Context
81 _In_opt_ PVOID Context,
82 _In_ BOOLEAN TimerOrWaitFired
114 _In_ HINSTANCE Instance,
116 _Reserved_ PVOID Reserved
121 case DLL_PROCESS_ATTACH:
132 info->
Description = L
"Provides functionality for sandboxed processes.";
133 info->
Url = L
"http://processhacker.sf.net/forums/viewtopic.php?t=1115";
140 &PluginLoadCallbackRegistration
146 &PluginShowOptionsCallbackRegistration
152 &PluginMenuItemCallbackRegistration
159 &MainMenuInitializingCallbackRegistration
165 &ProcessesUpdatedCallbackRegistration
171 &GetProcessHighlightingColorCallbackRegistration
177 &GetProcessTooltipTextCallbackRegistration
211 _In_opt_ PVOID Parameter,
212 _In_opt_ PVOID Context
217 HANDLE timerQueueHandle;
228 module = LoadLibrary(sbieDllPath->
Buffer);
243 _In_opt_ PVOID Parameter,
244 _In_opt_ PVOID Context
256 _In_opt_ PVOID Parameter,
257 _In_opt_ PVOID Context
262 switch (menuItem->
Id)
269 L
"all sandboxed processes",
275 ULONG enumerationKey = 0;
282 while (
PhEnumHashtable(BoxedProcessesHashtable, &boxedProcess, &enumerationKey))
284 HANDLE processHandle;
289 NtClose(processHandle);
301 _In_opt_ PVOID Parameter,
302 _In_opt_ PVOID Context
317 _In_opt_ PVOID Parameter,
318 _In_opt_ PVOID Context
322 ULONG enumerationKey = 0;
332 while (
PhEnumHashtable(BoxedProcessesHashtable, &boxedProcess, &enumerationKey))
348 _In_opt_ PVOID Parameter,
349 _In_opt_ PVOID Context
362 getHighlightingColor->
BackColor = RGB(0x33, 0x33, 0x00);
371 _In_opt_ PVOID Parameter,
372 _In_opt_ PVOID Context
392 _In_opt_ PVOID Context,
393 _In_ BOOLEAN TimerOrWaitFired
426 boxedProcess.ProcessId = ULongToHandle(*pid);
427 memcpy(boxedProcess.BoxName, boxName,
sizeof(boxName));
438 ULONG filePathLength = 0;
439 ULONG keyPathLength = 0;
440 ULONG ipcPathLength = 0;
443 memcpy(boxInfo->BoxName, boxName,
sizeof(boxName));
455 if (ipcPathLength <
sizeof(boxInfo->IpcRootBuffer))
457 boxInfo->IpcRootBuffer[0] = 0;
462 boxInfo->IpcRootBuffer,
468 if (boxInfo->IpcRootBuffer[0] != 0)
509 switch (LOWORD(wParam))
512 EndDialog(hwndDlg, IDCANCEL);
519 EndDialog(hwndDlg, IDOK);
526 { L
"SbieDll.dll", L
"SbieDll.dll" },
527 { L
"All files (*.*)", L
"*.*" }