SetupInitDefaultQueueCallbackEx

The SetupInitDefaultQueueCallback function initializes the context used by the default queue callback routine included with the Setup API in the same manner as SetupInitDefaultQueueCallback, except that an additional window is provided to the callback function to accept progress messages.

PVOID SetupInitDefaultQueueCallbackEx(
  HWND OwnerWindow,              // parent of callback dialog boxes
  HWND AlternateProgressWindow,  // handle to progress window
  UINT ProgressMessage,          // specifies progress message
  DWORD Reserved1,               // wParam of a window message
  PVOID Reserved2                // lParam of a window message
);
 

Parameters

OwnerWindow
Supplies the handle of the window to use as the parent of any dialog boxes generated by the default callback routine.
AlternateProgressWindow
Supplies the handle to a window that will receive the progress messages. To prevent progress messages from being displayed, you can specify this parameter to be INVALID_HANDLE_VALUE.
ProgressMessage
The message that is sent to AlternateProgressWindow once when the copy queue is started, and each time a file is copied.
Reserved1
This parameter is the first message parameter that will be sent to the AlternateProgressWindow by the default callback routine.
Reserved2
This parameter is the second message parameter that will be sent to the AlternateProgressWindow by the default callback routine.

Return Values

A pointer to the context used by the default queue callback routine.

To get extended error information, call GetLastError.

Remarks

When the queue starts to commit the copy sub queue, the default queue callback routine will send a message to the window specified in AlternateProgressWindow. Reserved1 will have the value 0, and Reserved2 will contain a pointer to the number of enqueued file copy operations.

For each file copy operation completed, the default queue callback routine will send a message to AlternateProgressWindow, which can be used to 'tick' the progress bar. Reserved1 will have the value 1, and Reserved2 will be 0.

SetupInitDefaultQueueCallbackEx can be used to get the default behavior for disk prompting, error handling, and so on, and also provide a gauge embedded in a wizard page or other specialized dialog box.

QuickInfo

  Windows NT: Use version 4.0 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in setupapi.h.
  Import Library: Link with setupapi.lib.

See Also

Overview, Functions, SetupInitDefaultQueueCallback