In my code, an ICC profile is created and copy to the system folder (C:\Windows\System32\spool\drivers\color)
then assign this profile to current document in photoshop using sPSActionControl->Play(&result, StringToKey("assignProfile"), iDescriptor, mode); // iDescriptor contains the ICC profile name
after assigning profile, the .icc file is associated with the ps process, that is, I can't delete it or rename it, nor can I replace it with another file having the same name. But on Mac, the ICC file won't be associated with the process, so I can overwrite the icc file and do other work, that's better.
How to make the icc file not taken by photoshop after assigning profile on windows?