Skip to content

Suggestion on detection of text files #272

@GeeLaw

Description

@GeeLaw

On src/CreateItemWindow.cpp#L45, the detection is done by comparing the preview handler CLSID with the current Windows text preview handler CLSID. This is not robust as the next version of Windows could use a different CLSID for text preview, and other software might override the text preview handler with its own CLSID.

From the business logic, the purpose of detecting this Windows text preview handler is to provide editor functionality for text files. The suggested way to test whether a file is text file is to query its perceived type using AssocGetPerceivedType function and check whether the perceived type is the predefined enumeration value PERCEIVED_TYPE_TEXT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions