Article View: borland.public.cppbuilder.nativeapi
Article #3481Bizzaar problem when calling EnumWindows API function.
From: David
Date: Sun, 18 Jun 2006 12:24
Date: Sun, 18 Jun 2006 12:24
22 lines
1630 bytes
1630 bytes
Hello
When I use the same module in one project I get the following errors when I
call EnumProc as though it is expecting a different type of function
pointer. But in other projects it is OK. If I cast the function pointer too
what it thinks it expects then things are OK but I shouldn't have to do this
!!What on Earth is going on ??
Thanks in advance
David
BOOL CALLBACK EnumProc(HWND h, LPARAM lp)
{
........
}
EnumWindows(EnumProc,0); // this call causes the error
[C++ Error] App.cpp(91): E2034 Cannot convert 'int (__stdcall *)(void
*,long)' to 'int (__stdcall *)()'
[C++ Error] App.cpp(91): E2342 Type mismatch in parameter 'lpEnumFunc'
(wanted 'int (__stdcall *)()', got 'int (__stdcall *)(void *,long)')
Technical Details
Message-ID:
<44954617$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4e294185b67adeb4,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "David" <davids@unite.com.au> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Bizzaar problem when calling EnumWindows API function. Date: Sun, 18 Jun 2006 22:24:55 +1000 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 211.26.206.233 Message-ID: <44954617$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1150633495 211.26.206.233 (18 Jun 2006 05:24:55 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail