Article View: borland.public.cppbuilder.nativeapi
Article #17486Compiler error
From: Terry
Date: Wed, 12 Mar 2003 02:12
Date: Wed, 12 Mar 2003 02:12
29 lines
1788 bytes
1788 bytes
I have been staring at this and i just cannot figure out what
is causing the error.
BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam)
{
//code
}
BOOL CALLBACK ProcessEnumProc(DWORD dw, WORD w16, LPCSTR lpstr, LPARAM
lParam)
{
// code
}
void __fastcall TForm1::ToolButton1Click(TObject *Sender)
{
EnumProcs(ProcessEnumProc, (LPARAM)ListView1); << the error below
[C++ Error] Unit1.cpp(354): E2034 Cannot convert 'int (__stdcall
*)(unsigned long,unsigned short,const char *,long)' to 'int (__stdcall
*)(unsigned long,unsigned short,char *,long)'
[C++ Error] Unit1.cpp(354): E2342 Type mismatch in parameter 'lpProc'
(wanted 'int (__stdcall *)(unsigned long,unsigned short,char *,long)',
got 'int (__stdcall *)(unsigned long,unsigned short,const char
*,long)')
}
Can anyone see a problem here?
Technical Details
Message-ID:
<3e6e976e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,804592ee0e8d4a4e,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-12 17:43:15 PST Reply-To: "Terry" <terry@helloworld.com> From: "Terry" <terry@helloworld.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Compiler error Date: Tue, 11 Mar 2003 20:12:01 -0600 Lines: 31 Organization: here X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 66.140.12.234 Message-ID: <3e6e976e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047435118 66.140.12.234 (11 Mar 2003 18:11:58 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail