falahati/NvAPIWrapper

R/W DPCD through AUX channel

qingniaoheyu opened this issue · 1 comments

Hi!
I'm working on an soft which can operate DPCD through AUX channel.
My thought is use NvAPI_GetDisplayPortInfo/NvAPI_SetDisplayPort to accomplish that,but when I dont know how to call original NvAPI(a.k.a. the low-level AP),could you please make it more specific for me(I've tried Delegate.NvAPI_GetDisplayConfig(),but didnot work)?

Neither of these functions is supported as of now. Unfortunately. (NvAPI_GetDisplayPortInfo/NvAPI_SetDisplayPort)
You can add support fairly easily. You just need to put some time and check how other functions work so as to have some idea about the structure of the library and tools and helpers at your disposal.

The right way to call a supported function is either directly calling the low-level API via the GpuApi, DisplayApi, GeneralApi, or MosaicApi static classes or use the high-level abstraction classes to achieve the same result.
Regarding NvAPI_GetDisplayConfig, you can use the following code:

using NvAPIWrapper.Native;
var configs = DisplayApi.GetDisplayConfig();

or

using NvAPIWrapper.Display;
var paths = PathInfo.GetDisplaysConfig();