Share via


SHELLCALLBACKS (Windows Embedded CE 6.0)

1/6/2010

This structure specifies callback functions through which the operating system (OS) forwards the SHAddToRecentDocs and Shell_NotifyIcon functions to a custom shell.

Syntax

typedef struct {
  DWORD dwSize;
  PFNSHELL_NOTIFYICON pfnShell_NotifyIcon;
  PFNSHHADDTORECENTDOCS pfnSHAddToRecentDocs;
} SHELLCALLBACKS;

Members

  • dwSize
    DWORD that specifies the size of this structure, in bytes. You must specify a value for this member.
  • pfnShell_NotifyIcon
    Pointer to a callback function to which the OS should forward the Shell_NotifyIcon function. The OS always forwards Shell_NotifyIcon to a custom shell if this callback function is present. The following code example shows the prototype for this callback function.

    typedef BOOL (WINAPI* PFNSHELL_NOTIFYICON)(DWORD dwMessage, 
                                               PNOTIFYICONDATA lpData);
    
  • pfnSHAddToRecentDocs
    Pointer to a callback function to which the OS should forward the SHAddToRecentDocs function. The OS always forwards SHAddToRecentDocs to a custom shell if this callback function is present. The following code example shows the prototype for this callback function.

    typedef void (WINAPI* PFNSHHADDTORECENTDOCS)(UINT uFlags, LPCVOID pv);
    

Remarks

You must register these callback functions by passing the SHELLCALLBACKS structure to the ShellRegisterCallbacks function.

Because Windows Embedded CE performs no thread switching during the callbacks, the thread belongs to the client process. Therefore, the callback functions should perform only a minimal amount of processing.

Typically, a callback function saves a copy of the parameter data and defers any required processing to a separate thread that belongs to the shell. The callback function must fully copy the parameter data because any pointers passed to the callback function are invalid on another thread or at a later callback.

Requirements

Header shellcb.h
Windows Embedded CE Windows CE 2.12 and later

See Also

Reference

Shell OS Structures
SHAddToRecentDocs
Shell_NotifyIcon
ShellRegisterCallbacks