VOID NvGpuSysInfoInitializing( _In_ PPH_PLUGIN_SYSINFO_POINTERS Pointers ) { PH_SYSINFO_SECTION section; PPH_NVGPU_SYSINFO_CONTEXT context; context = (PPH_NVGPU_SYSINFO_CONTEXT)PhAllocate(sizeof(PH_NVGPU_SYSINFO_CONTEXT)); memset(context, 0, sizeof(PH_NVGPU_SYSINFO_CONTEXT)); memset(§ion, 0, sizeof(PH_SYSINFO_SECTION)); section.Context = context; section.Callback = NvGpuSectionCallback; context->GpuName = NvGpuQueryName(); PhInitializeStringRef(§ion.Name, context->GpuName->Buffer); context->Section = Pointers->CreateSection(§ion); }
VOID NvGpuSysInfoInitializing( _In_ PPH_PLUGIN_SYSINFO_POINTERS Pointers ) { PH_SYSINFO_SECTION section; if (!PhGetIntegerSetting(SETTING_NAME_ENABLE_GPU)) return; if (!NvApiInitialized) return; memset(§ion, 0, sizeof(PH_SYSINFO_SECTION)); section.Callback = NvGpuSectionCallback; GpuName = NvGpuQueryName(); PhInitializeStringRef(§ion.Name, GpuName->Buffer); Section = Pointers->CreateSection(§ion); }