CPatchFile::OnStatus

The CPatchFile::OnStatus function performs user-defined actions following firing of a status event.

BOOL OnStatus(
LPPATCH_STATUS_INFORMATION lpInfo // pointer to status information structure
);

Parameters

lpInfo
[in] Pointer to status information structure.

Return Values

The default implementation returns TRUE in all circumstances.

A return value of FALSE will cause whatever method of the class that was running when the event fired to return with an error.

Remarks

This is a virtual function that may be implemented in a class derived from CPatchFile. The default implementation does nothing but return a value of TRUE. CPatchFile::OnStatus is called by an internal callback function defined within the class. The internal callback function is called whenever a method of the class such as CPatchFile::Create or CPatchFile::Apply has status information to report. The name of the internal callback function is InternalCallback. It is a private member of the CPatchFile class. DO NOT modify it.

An implementation of OnStatus in a class derived from CPatchFile may (for example):

  • Report the name of the file currently being processed to a status window.
  • Update a progress bar.
  • Process a user's Cancel action.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Include apatch.h.
Library: Use apatch32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP.

See Also

PATCH_STATUS_INFORMATION, CPatchFile::Apply, CPatchFile::Create