How to use Nvapi.h for changing [Manage 3D settings] for a particular Exe


I have to change the setting for a particular Exe. Without program i can do the below steps,

  1. Open Nvidia control panel.
  2. 3D settings → Manage 3D settings.
  3. Program settings(Tab).
  4. Add (My Exe to the list Example: C:\MyApplication.exe).
  5. Change setting [OpenGL GDI compatibility] - Prefer compatible.

I need to do the same programmatically.
So i need to use Nvapi.h for this.
There are lot of interfaces inside this. But there is no sample code or enough comment.
I got the below sample code for changing the general setting.

This worked fine for changing the common setting(common for all Exe).
But i need to change the setting for a particular Exe.
Please help me to give some sample code for this.

Dear @aneessecond

Thank you for contacting NVIDIA developer forum.
Our technical team has received your query and we will get back to you after initial investigation.

NVAPI Forum Moderator