This project is read-only.

Introducing new class: Shell32

Developer
Oct 2, 2012 at 9:02 PM

Introducing a new class: Shell32 which currently holds three helper methods:

Shell32.GetAssociation(string)
Searches for and retrieves a file or protocol association-related string from the registry.

Shell32.GetAssociation(file, Verify, Executable)
C:\Windows\win.ini    -->    "C:\Windows\system32\NOTEPAD.EXE"

Shell32.GetAssociation(file, Verify, FriendlyAppName)
C:\Windows\win.ini    -->    "Notepad"

Shell32.GetAssociation(file, OpenByExeName, FriendlyAppName)
C:\Windows\win.ini    -->    win.ini

Shell32.GetFileType(string)
C:\Windows\ModemLogs    -->   "File folder"
C:\Windows\msdfmap.ini     -->   "Configuration settings"
C:\Windows\notepad.exe    -->    "Application"

Shell32.SHGetFileInfo(string)
C:\Windows\Enterprise.xml    -->    "XML Document"
                                           -->    Attributes: "CapabilityMask, Stream, FileSystem"
                                          --->    Attributes  == "CapabilityMask, Stream, FileSystem"

SHGetFileInfo can also be used to retrieve Icons.

Developer
Oct 2, 2012 at 9:03 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.