26 #define DISK_ICON_ID 2
27 #define NETWORK_ICON_ID 3
31 _Out_ PVOID *NewIconOrBitmap,
34 _In_opt_ PVOID Context
39 _In_ ULONG_PTR WParam,
40 _In_ ULONG_PTR LParam,
41 _In_opt_ PVOID Context
46 _Out_ PVOID *NewIconOrBitmap,
49 _In_opt_ PVOID Context
54 _In_ ULONG_PTR WParam,
55 _In_ ULONG_PTR LParam,
56 _In_opt_ PVOID Context
61 _Out_ PVOID *NewIconOrBitmap,
64 _In_opt_ PVOID Context
69 _In_ ULONG_PTR WParam,
70 _In_ ULONG_PTR LParam,
71 _In_opt_ PVOID Context
118 _Out_ PVOID *NewIconOrBitmap,
121 _In_opt_ PVOID Context
130 RGB(0x00, 0x00, 0x00),
147 HANDLE maxGpuProcessId;
153 Icon->Pointers->BeginBitmap(&drawInfo.
Width, &drawInfo.
Height, &bitmap, &bits, &hdc, &oldBitmap);
154 maxDataCount = drawInfo.
Width / 2 + 1;
155 lineData1 = _alloca(maxDataCount *
sizeof(FLOAT));
168 SelectObject(hdc, oldBitmap);
169 *NewIconOrBitmap = bitmap;
177 maxGpuProcessId = NULL;
182 maxGpuProcessItem = NULL;
188 if (maxGpuProcessItem)
197 *NewText =
PhFormat(format, maxGpuProcessItem ? 8 : 3, 128);
203 _In_ ULONG_PTR WParam,
204 _In_ ULONG_PTR LParam,
205 _In_opt_ PVOID Context
208 switch (LOWORD(LParam))
224 _Out_ PVOID *NewIconOrBitmap,
227 _In_opt_ PVOID Context
236 RGB(0x00, 0x00, 0x00),
256 HANDLE maxDiskProcessId;
262 Icon->Pointers->BeginBitmap(&drawInfo.
Width, &drawInfo.
Height, &bitmap, &bits, &hdc, &oldBitmap);
263 maxDataCount = drawInfo.
Width / 2 + 1;
264 lineData1 = _alloca(maxDataCount *
sizeof(FLOAT));
265 lineData2 = _alloca(maxDataCount *
sizeof(FLOAT));
270 for (i = 0; i < lineDataCount; i++)
275 if (max < lineData1[i] + lineData2[i])
276 max = lineData1[i] + lineData2[i];
293 SelectObject(hdc, oldBitmap);
294 *NewIconOrBitmap = bitmap;
300 maxDiskProcessId = UlongToHandle(PhGetItemCircularBuffer_ULONG(&
EtMaxDiskHistory, 0));
302 maxDiskProcessId = NULL;
304 if (maxDiskProcessId)
307 maxDiskProcessItem = NULL;
314 if (maxDiskProcessItem)
320 *NewText =
PhFormat(format, maxDiskProcessItem ? 6 : 4, 128);
326 _In_ ULONG_PTR WParam,
327 _In_ ULONG_PTR LParam,
328 _In_opt_ PVOID Context
331 switch (LOWORD(LParam))
347 _Out_ PVOID *NewIconOrBitmap,
350 _In_opt_ PVOID Context
359 RGB(0x00, 0x00, 0x00),
379 HANDLE maxNetworkProcessId;
385 Icon->Pointers->BeginBitmap(&drawInfo.
Width, &drawInfo.
Height, &bitmap, &bits, &hdc, &oldBitmap);
386 maxDataCount = drawInfo.
Width / 2 + 1;
387 lineData1 = _alloca(maxDataCount *
sizeof(FLOAT));
388 lineData2 = _alloca(maxDataCount *
sizeof(FLOAT));
393 for (i = 0; i < lineDataCount; i++)
398 if (max < lineData1[i] + lineData2[i])
399 max = lineData1[i] + lineData2[i];
416 SelectObject(hdc, oldBitmap);
417 *NewIconOrBitmap = bitmap;
423 maxNetworkProcessId = UlongToHandle(PhGetItemCircularBuffer_ULONG(&
EtMaxNetworkHistory, 0));
425 maxNetworkProcessId = NULL;
427 if (maxNetworkProcessId)
430 maxNetworkProcessItem = NULL;
437 if (maxNetworkProcessItem)
443 *NewText =
PhFormat(format, maxNetworkProcessItem ? 6 : 4, 128);
449 _In_ ULONG_PTR WParam,
450 _In_ ULONG_PTR LParam,
451 _In_opt_ PVOID Context
454 switch (LOWORD(LParam))