🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Retrieves information about the file system

#11999
From: Daniele Pellone
Date: Sun, 04 Jan 2004 12:28
18 lines
1367 bytes
Hi at all !!!

When I use the command "SHGetFileInfo", I receive the error
"ERROR_NOT_ENOUGH_MEMORY", but the icon is however returned.
Here my code:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  SHFILEINFO FileInfo;

SHGetFileInfo("c:\\windows\\win.ini",0,&FileInfo,sizeof(FileInfo),SHGFI_ICON
);
  ShowMessage(GetLastError());
  Image1->Picture->Icon->Handle=FileInfo.hIcon;
}

Could anybody explain me the correct use of SHGetFileInfo?
Thanks in advance.
Technical Details
Message-ID: <3ff806ec@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.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,1d988a36ee413979,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-04 04:42:31 PST
Reply-To: "Daniele Pellone" <pellone@tiscali.it>
From: "Daniele Pellone" <pellone@tiscali.it>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Retrieves information about the file system
Date: Sun, 4 Jan 2004 13:28:14 +0100
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 62.11.117.45
Message-ID: <3ff806ec@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1073219308 62.11.117.45 (4 Jan 2004 04:28:28 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail