AssociateColorProfileWithDevice, Where do you get the DeviceName?
http://msdn.microsoft.com/en-us/library/dd371799(v=VS.85).aspx
So with a signature like this:
BOOL WINAPI开发者_StackOverflow中文版 AssociateColorProfileWithDevice( PCTSTR pMachineName, PCTSTR pProfileName, PCTSTR pDeviceName );
pMachineName Reserved. Must be NULL. This parameter is intended to point to the name of the machine on which to associate the specified profile and device. A NULL pointer indicates the local machine.
pProfileName Points to the file name of the profile to associate.
pDeviceName Points to the name of the device to associate.
pMachineName is suppose to be null, easy enough. pProfileName is the file full file path, check. pDeviceName, how do I get this value?
You can use EnumDisplayDevices
to all available display devices:
http://msdn.microsoft.com/en-us/library/dd162609.aspx
http://msdn.microsoft.com/en-us/library/dd183569.aspx
精彩评论