SPFILENOTIFY_STARTREGISTRATION 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_STARTREGISTRATION notification to the callback routine once before registering 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_STARTREGISTRATION.



SPFILENOTIFY_STARTREGISTRATION
  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. The FileName member should be set to the fully qualified path of the file being registered. Win32Error is not used and should be set to NO_ERROR. FailureCode is not used and should be set to SPREG_SUCCESS.

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 codeDescription
FILEOP_ABORT

Do not register or unregister the file and stop processing the INF section.

FILEOP_DOIT

Register or unregister the file and continue processing the INF section.

FILE_SKIP

Skip registration or unregistration of the file but continue processing the INF section

 

Requirements

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_ENDREGISTRATION

 

 

Show: