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

