🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11788

EnumResourceNames()

#11788
From: Robert G. Hoover
Date: Wed, 14 Jan 2004 17:10
29 lines
1855 bytes
Hello,

I'm trying to use EnumResourceNames and I'm getting the following compiler
error in C++ Builder 6....

E2034 Cannor convert 'int (__stdcall *)(void *, constant char *, char *,
long)' to 'int (__stdcall *)()'
E2342 Type mismatch in parameter 'lpEnumFunc' (wanted 'int (__stdcall *)()',
got 'int (__stdcall *)(void *, const char *, char *, long)')

My declaration is as follows...

BOOL CALLBACK EnumResNameCallback(HMODULE hModule, LPCTSTR lpszType, LPSTR
lpszName, LONG lParam)

My call is as follows....

EnumResourceNames(hInstance, "PIPL", &EnumResNameCallback, lParam);



If I remove all parameters and declare as EnumResNameCallback() then it
compiles. I think I declared everything according to the WinAPI
documentation. Did I miss something? Why does my compiler not expect any
parameters?

Thanks,

Rob
Technical Details
Message-ID: <400577f5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!216.196.98.140.MISMATCH!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b2e65093aac64f42,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-14 09:12:42 PST
From: "Robert G. Hoover" <not.a.real.address@anywhere.sorry>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: EnumResourceNames()
Date: Wed, 14 Jan 2004 12:10:20 -0500
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 208.59.156.227
Message-ID: <400577f5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074100213 208.59.156.227 (14 Jan 2004 09:10:13 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!216.196.98.140.MISMATCH!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail