How to use NvAPI_DISP_TryCustomDisplay to change display resolution

We need to change display resolution in a Windows 10 VM based on T4-4Q vGPU. we found that any custom resolution will fail to set with “NvAPI_DISP_TryCustomDisplay” API.

Could you help to provide any samples/docs/assets/steps about how to use “NvAPI_DISP_TryCustomDisplay” to set display resolution? Also, if “NvAPI_DISP_TryCustomDisplay” can not set these display resolutions, is there any other ways/APIs that can help to change display resolution? thanks.

Dear @Lisa-Su

Thank you for contacting NVIDIA developer forum.
We have sent your query to our technical team and we will get back to you on the updates.

Thanks,
NVAPI Forum Moderator

Hello @Lisa-Su

Are you specifically interested in creating and setting a “custom resolution”, or do you just want to change resolution to the ones available in the EDID (the resolutions that you see in MS Display Settings UI)?

Thank you.
NVAPI Forum Moderator

We want to set the custom resolution of the T4 graphics card in the WIndows 10 VM through NVAPI, which is used for the custom resolution scene of the VDI desktop