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.