I'm trying to do an experiment in VB6. I haven't used VB6 in forever, but in C++, if you enabled DirectX, OpenGL, or Vulkan, doesn't matter really, and you have a NVidea based graphics card, adding this one line of code makes your graphics program run a hell of a lot faster than usual, usually 3 to 5 times faster because it is utilizing the GeForce portion of your video card:

c++ Code:
  1. // Enables the GeForce Experience
  2. extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }

As a result, you get the GeForce experience tab, and it shows the FPS, not to mention faster graphics:



I understand that VB6 is limited, but I've done much worse things that pushed it to its limits back in my day. And since it is also capable of doing DirectX, it can potentially use the GeForce as well.

The question is, how can I write extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } in VB6?