SccHistory Function

This function displays the history of the specified files.

SCCRTN SccHistory(
   LPVOID    pvContext,
   HWND      hWnd,
   LONG      nFiles,
   LPCSTR*   lpFileNames,
   LONG      fOptions,
   LPCMDOPTS pvOptions


  • pvContext
    [in] The source control plug-in context structure.

  • hWnd
    [in] A handle to the IDE window that the source control plug-in can use as a parent for any dialog boxes that it provides.

  • nFiles
    [in] Number of files specified in the lpFileName array.

  • lpFileName
    [in] Array of fully qualified names of files.

  • fOptions
    [in] Command flags (currently not used).

  • pvOptions
    [in] Source control plug-in-specific options.

Return Value

The source control plug-in implementation of this function is expected to return one of the following values:




Version history was successfully obtained.


The source control system actually modified the file on disk while fetching the history (for instance, by getting an old version of it), so the IDE should reload this file.


The file is not under source control.


The source control system does not support this operation.


The user is not allowed to perform this operation.


There was a problem accessing the source control system, probably due to network or contention issues. A retry is recommended.


The project is has not been opened.


Nonspecific failure. File history could not be obtained.


The source control plug-in can display its own dialog box to show the history of each file, using hWnd as the parent window. Alternatively, the optional text output callback function supplied to the SccOpenProject Function can be used, if it is supported.

Note that under certain circumstances, the file being examined may change during the execution of this call. For example, the Visual SourceSafe history command gives the user a chance to get an old version of the file. In such a case, the source control plug-in returns SCC_I_RELOAD to warn the IDE that it needs to reload the file.


If the source control plug-in does not support this function for an array of files, only the file history for the first file can be displayed.

See Also


SccOpenProject Function


Source Control Plug-in API Functions