|
-
Oct 25th, 2023, 08:39 PM
#22
Re: C++ Created DLL File To Use In VB6
 Originally Posted by baka
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|