i am trying to get the full name of my gpu and my gpu usage using nvapi.dll. i have encounter this post on this website: C# Performance Counter Help, Nvidia GPU.
he uses 2 sources, one in the dll itself (for getting the usage) and for full name he uses the header file of nvapi downloaded from the nevidia website.
There is any way i can avoid this duplication in my project? using only the dll or using only the header files brought by nevidia. Thanks for all the helpers
you can load DLL file dynamically when you need it,
in c# you can use .Net Reflection (if dll is developed in .Net framework), for example :
if mentioned dll is not developed under .Net framework but you are forced to use .Net framework (for more information see this) :
if you want to use in c/c++ you can use following code :
NOTE: if you want to load dll from unknown source I recommend to use c/c++, because in c/c++ you can manage your memory easier and free all your resources after dll loading,