SPFILENOTIFY_ENDREGISTRATION message

When using the RegisterDlls INF directive to self-register DLLs, callers of SetupInstallFromInfSection may receive notifications on each file as it is registered or unregistered. To send a SPFILENOTIFY_ENDREGISTRATION notification to a callback routine once after registering or unregistering a file, include SPINST_REGISTERCALLBACKAWARE plus SPINST_REGSVR in the Flags parameter of SetupInstallFromInfSection. To send notification of unregistration, include SPINST_REGISTERCALLBACKAWARE plus SPINST_UNREGSVR in the Flags parameter.

The callback routine specified by the MsgHandler parameter of SetupInstallFromInfSection must be the type PSP_FILE_CALLBACK. Set the Context parameter to the same Context specified in SetupInstallFromInfSection. Set the Notification parameter to SPFILENOTIFY_ENDREGISTRATION.

SPFILENOTIFY_ENDREGISTRATION
  Param1 = (UINT_PTR) pointer to file information;
  Param2 = (UINT_PTR) file registration or unregistration;
            

Parameters

Param1

Pointer to a SP_REGISTER_CONTROL_STATUS structure containing information about the file being registered or unregistered. The member cbsize should be set to the size of the structure. FileName should be set to the fully qualified path of the file being registered. Win32Error should be set to a system error code indicating an extended error code. FailureCode should be set to one of the valid failure codes indicating the outcome of the registration. For valid failure codes see SP_REGISTER_CONTROL_STATUS.

Param2

If the file is being registered, Param2 should be set to a pointer to a nonzero value. If the file is being unregistered, Param2 should be set to a pointer to zero.

Return value

After receiving notification, the callback function may return one of the following values.

Return code Description
FILEOP_ABORT
Stop processing the INF section.
FILEOP_DOIT
Continue processing the INF section.
FILE_SKIP
Continue processing the INF section

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Setupapi.h

See also

Overview

Notifications

SetupInstallFromInfSection

SPFILENOTIFY_STARTREGISTRATION