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(&section, 0, sizeof(PH_SYSINFO_SECTION));

    section.Context = context;
    section.Callback = NvGpuSectionCallback;

    context->GpuName = NvGpuQueryName();
    PhInitializeStringRef(&section.Name, context->GpuName->Buffer);

    context->Section = Pointers->CreateSection(&section);
}
Exemple #2
0
VOID NvGpuSysInfoInitializing(
    _In_ PPH_PLUGIN_SYSINFO_POINTERS Pointers
    )
{
    PH_SYSINFO_SECTION section;

    if (!PhGetIntegerSetting(SETTING_NAME_ENABLE_GPU))
        return;

    if (!NvApiInitialized)
        return;

    memset(&section, 0, sizeof(PH_SYSINFO_SECTION));

    section.Callback = NvGpuSectionCallback;

    GpuName = NvGpuQueryName();
    PhInitializeStringRef(&section.Name, GpuName->Buffer);

    Section = Pointers->CreateSection(&section);
}