The information in this article applies to:
SUMMARYWhen writing an application that drives SourceSafe via OLE automation, you may want to trap the error codes defined in the ssauterr.h file. Click the link to 'VC++ Error Header File' that you find at the following Web site: http://msdn.microsoft.com/ssafe/downloads/samples.aspThis article describes how to trap these error codes from Visual Basic and Visual C++. NOTE: This cannot be done in C++ if you use the code generated by the Class Wizard to generate a wrapper for SSAPI.DLL. MORE INFORMATIONVisual Basic CodeIn Visual Basic, the error code is returned as the HelpContext property of the Err object.An example of Visual Basic error handling code:
Visual C++ CodeIn Visual C++, the error code is a member of the HRESULT structure that is returned from the call to the automation method. The DriveVSS function below is based upon the code in the following article in the Microsoft Knowledge Base:Q169928 HOWTO: Open a SourceSafe Database with OLE Automation in C++where pVdb is a pointer to the IVSSDatabase interface. You will need to add the following:
to the header files listed in Q169928.
(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by David
de Groot, Microsoft Corporation
Additional query words:
Keywords : kbinterop kbSSafe500 kbSSafe600 kbVS97 |
Last Reviewed: August 18, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |