Export (0) Print
Expand All
Expand Minimize

SetupCommitFileQueue function

[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]

The SetupCommitFileQueue function performs file operations queued on a setup file queue.

The best practice is to collect all the required file operations for the file queue and commit the queue only once because a file queue cannot be reused after it has been committed. If additional processing of the queue is required after it has been committed, the handle to the queue should be closed and a new file queue created. For more information, see Committing a Queue.

If a file is modified, the caller of this function is required have privileges to write into the target directory.

Syntax


BOOL SetupCommitFileQueue(
  _In_  HWND Owner,
  _In_  HSPFILEQ QueueHandle,
  _In_  PSP_FILE_CALLBACK MsgHandler,
  _In_  PVOID Context
);

Parameters

Owner [in]

Optional handle to a window to use as the parent of any progress dialog boxes.

QueueHandle [in]

Handle to a setup file queue, as returned by SetupOpenFileQueue.

MsgHandler [in]

Pointer to an optional callback routine to be notified of various significant events that are in the queue processing. For more information, see Default Queue Callback Routine or FileCallback If the callback routine is null, SetupCommitFileQueue returns TRUE and the error is 0 or NO_ERROR.

Context [in]

Value that is passed to the callback function supplied by the MsgHandler parameter. If the default callback routine has been specified as MsgHandler, this context must be the context returned from SetupInitDefaultQueueCallback or SetupInitDefaultQueueCallbackEx.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The callback routine specified in MsgHandler should be compatible with the parameters that SetupCommitFileQueue passed to it during a queue commit.

If Unicode is defined in your callback application, and you specify MsgHandler as the default queue callback routine, the callback routine will expect Unicode parameters. Otherwise, the default queue callback routine will expect ANSI parameters.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Setupapi.h

Library

Setupapi.lib

DLL

Setupapi.dll

Unicode and ANSI names

SetupCommitFileQueueW (Unicode) and SetupCommitFileQueueA (ANSI)

See also

Overview
Functions
SetupCloseFileQueue

 

 

Community Additions

ADD
Show:
© 2014 Microsoft