jp-slackspace / x-tension-c-sharp

An updated C# port of X-Ways X-Tensions API.
GNU General Public License v3.0
12 stars 1 forks source link

GetItemType HelperMethod #3

Closed rcairnc closed 6 years ago

rcairnc commented 6 years ago

Hello,

Although this works as described, the API has been since updated and can now return the item category, e.g 'Picture', 'Audio/video' and the file format consistency by combining the buffer length with some flags:

API documentation:

nBufferLenAndFlags contains the length of the buffer that lpTypeDescr points to in the lower word, measured in characters, and in v18.9 and later may be optionally combined with one of the below flags.

0x20000000: receive a textual description of the file type instead (e.g. “JPEG” or “Dynamic-Link Library”) 0x40000000: receive a textual designation of the category that the file type belongs to instead (e.g. “Pictures” or “Programs”) 0x80000000: receive type status as usual in the lowest byte, but file format consistency in the second-lowest byte (0=unknown, 1=OK, 2=irregular), v19.3 and later

jp-slackspace commented 6 years ago

Fixed. Thanks for reporting!