delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/11/16:32:38

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 11 Nov 2005 13:32:29 -0800 (PST)
From: "Paul J. Lucas" <pauljlucas AT mac DOT com>
To: cygwin AT cygwin DOT com
Subject: Error in GetICMProfile() declaration
Message-ID: <Pine.LNX.4.63.0511111327200.1443@vgfl.cnhywyhpnf.bet>
MIME-Version: 1.0
X-IsSubscribed: yes

In /usr/include/w32api/wingdi.h, GetICMProfile() has its second argument
declared as a DWORD.  According to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/icm/icm_5aed.asp

it should be declared as an LPDWORD.  Indeed, in order to call this
function correctly, I current have to do something like:

	HDC dc = GetDC( NULL );
	char path[ MAX_PATH ];
	DWORD len = sizeof path;
	GetICMProfile( dc, (DWORD)&len, path );

So this really looks like a bug in the declaration.

- Paul

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019