C# Class BExplorer.Shell.Interop.ShellNotifications

Class that allow to receive shell notifications !!!!! Add this code to your registered form : !!!!! protected override void WndProc(ref Message m) { switch(m.Msg) { case (int) ShellNotifications.WM_SHNOTIFY: if(Notifications.NotificationReceipt(m.WParam, m.LParam)) NewOperation((NotifyInfos) Notifications.NotificationsReceived[Notifications.NotificationsReceived.Count-1]); break; } base.WndProc(ref m); }
Show file Open project: Gainedge/BetterExplorer Class Usage Examples

Public Properties

Property Type Description
NotificationsReceived System.Collections.ArrayList

Public Methods

Method Description
GetPidlFromFolderID ( IntPtr hWnd, CSIDL Id ) : IntPtr

Get the Pidl from a special folder ID

NotificationReceipt ( IntPtr wParam, IntPtr lParam ) : bool

Message received from the WndProc of a registered form

RegisterChangeNotify ( IntPtr hWnd, CSIDL item, bool Recursively ) : ulong

Register a form handle This form will receive a WM_SHNOTIFY when a notification occures !!!!! Add this code to your registered form : !!!!! protected override void WndProc(ref Message m) { switch(m.Msg) { case (int) ShellNotifications.WM_SHNOTIFY: if(Notifications.NotificationReceipt(m.WParam, m.LParam)) NewOperation((NotifyInfos) Notifications.NotificationsReceived[Notifications.NotificationsReceived.Count-1]); break; } base.WndProc(ref m); }

UnregisterChangeNotify ( ) : System.Boolean

Unregister the form

Private Methods

Method Description
SHChangeNotifyRegister ( IntPtr hWnd, SHCNRF fSources, SHCNE fEvents, uint wMsg, int cEntries, [ pFsne ) : uint
SHGetSpecialFolderLocation ( IntPtr hWnd, CSIDL nFolder, IntPtr &Pidl ) : uint

Method Details

GetPidlFromFolderID() public static method

Get the Pidl from a special folder ID
public static GetPidlFromFolderID ( IntPtr hWnd, CSIDL Id ) : IntPtr
hWnd System.IntPtr Handle of the window
Id CSIDL ID of the special folder
return System.IntPtr

NotificationReceipt() public method

Message received from the WndProc of a registered form
public NotificationReceipt ( IntPtr wParam, IntPtr lParam ) : bool
wParam System.IntPtr
lParam System.IntPtr
return bool

RegisterChangeNotify() public method

Register a form handle This form will receive a WM_SHNOTIFY when a notification occures !!!!! Add this code to your registered form : !!!!! protected override void WndProc(ref Message m) { switch(m.Msg) { case (int) ShellNotifications.WM_SHNOTIFY: if(Notifications.NotificationReceipt(m.WParam, m.LParam)) NewOperation((NotifyInfos) Notifications.NotificationsReceived[Notifications.NotificationsReceived.Count-1]); break; } base.WndProc(ref m); }
public RegisterChangeNotify ( IntPtr hWnd, CSIDL item, bool Recursively ) : ulong
hWnd System.IntPtr
item CSIDL ID of the special folder
Recursively bool Look recursively at modifications
return ulong

UnregisterChangeNotify() public method

Unregister the form
public UnregisterChangeNotify ( ) : System.Boolean
return System.Boolean

Property Details

NotificationsReceived public property

public System.Collections.ArrayList NotificationsReceived
return System.Collections.ArrayList