|
-
January 4th, 2003, 06:04 AM
#1
File Type
Hi Gurus
This is bit silly question ...
How to get the file type from Windows system ?. i.e When the file contains .txt extension then sys shows it as "TXT File", for Gif image it shows "GIF Image". for ini file "Confogration Settings" etc.
How to retrive this data from OS.
Thanx in advance.
Regards
Nagesh
-
January 4th, 2003, 01:26 PM
#2
SHGetFileInfo:
DWORD_PTR SHGetFileInfo(LPCTSTR pszPath,
DWORD dwFileAttributes,
SHFILEINFO *psfi,
UINT cbFileInfo,
UINT uFlags
);
Look at the SHGFI_TYPENAME:
SHGFI_TYPENAME
Retrieve the string that describes the file's type. The string is copied to the szTypeName member of the structure specified in psfi.
http://msdn.microsoft.com/library/de...etfileinfo.asp
Dan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|