X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <23f4d5c70812140822j1259f237ka0466086c03b1b20@mail.gmail.com>
Date: Sun, 14 Dec 2008 09:22:05 -0700
From: "Tim Stewart" <tim.j.stewart@gmail.com>
To: cygwin@cygwin.com
Subject: Fwd: 1.5.25 : Win32 API function RegisterShellWindowHook not supported
In-Reply-To: <23f4d5c70812140819p1b38b91fh7ac0a032fda113cc@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <23f4d5c70812140819p1b38b91fh7ac0a032fda113cc@mail.gmail.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
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

Environment:

   cygcheck -s shows that I'm running the 1.5.25 version of cygwin1.dll.

   I just updated my system a few days ago.

   I'm trying to compile some C++ code using g++.

Documentation for the missing API function:

   http://msdn.microsoft.com/en-us/library/ms644989.aspx

The Problem:

   The above documentation states that the function should be located
in winuser.h but it's not.  Its related function
DeregisterShellWindowHook is in winuser.h.

   Even if I add a hand-coded prototype for this function, I get a
linker error stating that the RegisterShellWindowProc function was
unresolved.  That's because it's not included in libuser32.a.

Workaround:

   I am using GetProcAddress to access the function.  For example:

      ::GetProcAddress(::GetModuleHandle("USER32.DLL"),
"RegisterShellHookWindow");

Thank you!

Tim Stewart

E-mail: mailto:tim.j.stewart@gmail.com
Cell Phone: 303.912.2312
LinkedIn: http://www.linkedin.com/in/timothystewart

--
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/

