Introducing new class: Shell32

Oct 2, 2012 at 8:02 PM

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

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

C:\Windows\ModemLogs    -->   "File folder"
C:\Windows\msdfmap.ini     -->   "Configuration settings"
C:\Windows\notepad.exe    -->    "Application"

C:\Windows\Enterprise.xml    -->    "XML Document"
                                           -->    Attributes: "CapabilityMask, Stream, FileSystem"
                                          --->    Attributes  == "CapabilityMask, Stream, FileSystem"

SHGetFileInfo can also be used to retrieve Icons.

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