Quote Originally Posted by baka View Post
I asked Poe, here what I got:

Code:
Declare Function NvAPI_Initialize Lib "nvapi.dll" () As Long
Declare Function NvAPI_EnumPhysicalGPUs Lib "nvapi.dll" (ByRef gpuHandles As Long, ByRef gpuCount As Long) As Long
Declare Function NvAPI_GPU_SetEDID Lib "nvapi.dll" (ByVal gpuHandle As Long, ByVal displayPath As Long) As Long
```
Public Sub EnableNvOptimus()
    Dim nvapiInitResult As Long
    Dim gpuHandles(1 To 10) As Long ' Adjust the array size as per your requirement
    Dim gpuCount As Long
    
    nvapiInitResult = NvAPI_Initialize()
    
    If nvapiInitResult = 0 Then
        NvAPI_EnumPhysicalGPUs VarPtr(gpuHandles(1)), gpuCount
        
        If gpuCount > 0 Then
            NvAPI_GPU_SetEDID gpuHandles(1), 0 ' Set the displayPath parameter as per your requirement
        End If
    End If
End Sub
now Im not sure if this works.
also asked about it and here the answer:
Nope. It can't find the DLL entry point NVAPI_Initialize