Try compiling Project1.vbp from this NVidia.zip sample project. It does get NvOptimusEnablement exported as first ordinal in export table (dumpbin.exe /exports)
How did this happen?Code:Export Table: Name: Project1.exe Time Date Stamp: 0x5EB13DFF (5.5.2020 13:20:47) Version: 0.00 Ordinal Base: 1 Number of Functions: 1 Number of Names: 1 Ordinal Entry Point Name 1 0x00002000 NvOptimusEnablement
First I compiled nvidia.cpp from VS2016 x86 Native Tools Command Prompt with something like this
c:> cl -c nvidia.cpp
which produced nvidia.obj (not a .dll)
Then I opened Project1.vbp and manually added these two lines
Finally compiled the VB6 project to a folder where file nvidia.obj is present.Code:[VBCompiler] LinkSwitches=nvidia.obj
If I had tried to compile to c:\temp for instance the linker wouldn't be able to find nvidia.obj in target folder (unless I put full pathname in LinkSwitches beforehand).
cheers,
</wqw>




Reply With Quote