#ifndef NVAPI_MINIMAL_H
#define NVAPI_MINIMAL_H
typedef uint32_t NvU32;
typedef uint16_t NvU16;
typedef uint8_t NvU8;
#define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16))
#define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
NV_DECLARE_HANDLE(NvDRSSessionHandle);
NV_DECLARE_HANDLE(NvDRSProfileHandle);
#define NVAPI_UNICODE_STRING_MAX 2048
#define NVAPI_BINARY_DATA_MAX 4096
typedef NvU16 NvAPI_UnicodeString[NVAPI_UNICODE_STRING_MAX];
typedef char NvAPI_ShortString[64];
#define NVAPI_SETTING_MAX_VALUES 100
typedef enum _NVDRS_SETTING_TYPE
{
NVDRS_DWORD_TYPE,
NVDRS_BINARY_TYPE,
NVDRS_STRING_TYPE,
NVDRS_WSTRING_TYPE
} NVDRS_SETTING_TYPE;
typedef enum _NVDRS_SETTING_LOCATION
{
NVDRS_CURRENT_PROFILE_LOCATION,
NVDRS_GLOBAL_PROFILE_LOCATION,
NVDRS_BASE_PROFILE_LOCATION,
NVDRS_DEFAULT_PROFILE_LOCATION
} NVDRS_SETTING_LOCATION;
typedef struct _NVDRS_GPU_SUPPORT
{
NvU32 geforce : 1;
NvU32 quadro : 1;
NvU32 nvs : 1;
NvU32 reserved4 : 1;
NvU32 reserved5 : 1;
NvU32 reserved6 : 1;
NvU32 reserved7 : 1;
NvU32 reserved8 : 1;
NvU32 reserved9 : 1;
NvU32 reserved10 : 1;
NvU32 reserved11 : 1;
NvU32 reserved12 : 1;
NvU32 reserved13 : 1;
NvU32 reserved14 : 1;
NvU32 reserved15 : 1;
NvU32 reserved16 : 1;
NvU32 reserved17 : 1;
NvU32 reserved18 : 1;
NvU32 reserved19 : 1;
NvU32 reserved20 : 1;
NvU32 reserved21 : 1;
NvU32 reserved22 : 1;
NvU32 reserved23 : 1;
NvU32 reserved24 : 1;
NvU32 reserved25 : 1;
NvU32 reserved26 : 1;
NvU32 reserved27 : 1;
NvU32 reserved28 : 1;
NvU32 reserved29 : 1;
NvU32 reserved30 : 1;
NvU32 reserved31 : 1;
NvU32 reserved32 : 1;
} NVDRS_GPU_SUPPORT;
typedef struct _NVDRS_BINARY_SETTING
{
NvU32 valueLength;
NvU8 valueData[NVAPI_BINARY_DATA_MAX];
} NVDRS_BINARY_SETTING;
typedef struct _NVDRS_SETTING_VALUES
{
NvU32 version;
NvU32 numSettingValues;
NVDRS_SETTING_TYPE settingType;
union
{
NvU32 u32DefaultValue;
NVDRS_BINARY_SETTING binaryDefaultValue;
NvAPI_UnicodeString wszDefaultValue;
};
union
{
NvU32 u32Value;
NVDRS_BINARY_SETTING binaryValue;
NvAPI_UnicodeString wszValue;
}settingValues[NVAPI_SETTING_MAX_VALUES];
} NVDRS_SETTING_VALUES;
#define NVDRS_SETTING_VALUES_VER MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1)
typedef struct _NVDRS_SETTING_V1
{
NvU32 version;
NvAPI_UnicodeString settingName;
NvU32 settingId;
NVDRS_SETTING_TYPE settingType;
NVDRS_SETTING_LOCATION settingLocation;
NvU32 isCurrentPredefined;
NvU32 isPredefinedValid;
union
{
NvU32 u32PredefinedValue;
NVDRS_BINARY_SETTING binaryPredefinedValue;
NvAPI_UnicodeString wszPredefinedValue;
};
union
{
NvU32 u32CurrentValue;
NVDRS_BINARY_SETTING binaryCurrentValue;
NvAPI_UnicodeString wszCurrentValue;
};
} NVDRS_SETTING_V1;
#define NVDRS_SETTING_VER1 MAKE_NVAPI_VERSION(NVDRS_SETTING_V1, 1)
typedef NVDRS_SETTING_V1 NVDRS_SETTING;
#define NVDRS_SETTING_VER NVDRS_SETTING_VER1
typedef struct _NVDRS_APPLICATION_V4
{
NvU32 version;
NvU32 isPredefined;
NvAPI_UnicodeString appName;
NvAPI_UnicodeString userFriendlyName;
NvAPI_UnicodeString launcher;
NvAPI_UnicodeString fileInFolder;
NvU32 isMetro:1;
NvU32 isCommandLine:1;
NvU32 reserved:30;
NvAPI_UnicodeString commandLine;
} NVDRS_APPLICATION_V4;
#define NVDRS_APPLICATION_VER_V4 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V4,4)
typedef NVDRS_APPLICATION_V4 NVDRS_APPLICATION;
#define NVDRS_APPLICATION_VER NVDRS_APPLICATION_VER_V4
typedef struct _NVDRS_PROFILE_V1
{
NvU32 version;
NvAPI_UnicodeString profileName;
NVDRS_GPU_SUPPORT gpuSupport;
NvU32 isPredefined;
NvU32 numOfApps;
NvU32 numOfSettings;
} NVDRS_PROFILE_V1;
typedef NVDRS_PROFILE_V1 NVDRS_PROFILE;
#define NVDRS_PROFILE_VER1 MAKE_NVAPI_VERSION(NVDRS_PROFILE_V1,1)
#define NVDRS_PROFILE_VER NVDRS_PROFILE_VER1
#endif