Article View: borland.public.cppbuilder.nativeapi
Article #7129EnumResourceNames
From: jB
Date: Mon, 14 Mar 2005 20:50
Date: Mon, 14 Mar 2005 20:50
46 lines
2024 bytes
2024 bytes
Could someone please advise me why my callback function will not compile.
Thanks
jB
/---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
try
{
try
{
hResourceDLL = LoadLibrary(Edit1->Text.c_str());
EnumResourceNames(hResourceDLL,
"RT_ICON",
EnumResProc,
NULL
);
}
catch(...)
{
MessageDlg("Cannot Load Library", mtError,
TMsgDlgButtons() << mbOK, 0);
}
}
__finally
{
FreeLibrary (hResourceDLL);
}
}
//---------------------------------------------------------------------------
BOOL CALLBACK EnumResProc( HMODULE hModule, LPTSTR lpszType, char *
lpszName, long lParam )
{
if( 0 == strcmp( lpszType, "RT_ICON" ) ||
0 == strcmp( lpszType,"RT_GROUP_ICON" ) )
{
iTotalIcons++; // defined in header
}
return (true);
}
Technical Details
Message-ID:
<4235f905@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!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,da3abd9f4e77eb05,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "jB" <.> Newsgroups: borland.public.cppbuilder.nativeapi Subject: EnumResourceNames Date: Mon, 14 Mar 2005 21:50:02 +0100 Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 NNTP-Posting-Host: 212.254.248.110 Message-ID: <4235f905@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1110833413 212.254.248.110 (14 Mar 2005 12:50:13 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail