Click here to Skip to main content
15,894,720 members
Articles / Programming Languages / Visual C++ 12.0

Strip'em Add-in for Visual Studio 6.0

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
7 Mar 2001CC (ASA 2.5) 68.8K   843   19  
This Add-in converts the text format (DOS or UNIX) of a file when it is saved in Visual Studio.
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__459378B4_A006_11D3_BEB7_52544C099BAF__INCLUDED_)
#define AFX_STDAFX_H__459378B4_A006_11D3_BEB7_52544C099BAF__INCLUDED_

#define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxdisp.h>

#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
#include <atlcom.h>

// Developer Studio Object Model
#include <ObjModel\addauto.h>
#include <ObjModel\appdefs.h>
#include <ObjModel\appauto.h>
#include <ObjModel\blddefs.h>
#include <ObjModel\bldauto.h>
#include <ObjModel\textdefs.h>
#include <ObjModel\textauto.h>
#include <ObjModel\dbgdefs.h>
#include <ObjModel\dbgauto.h>


enum STRIP_MODE
{
    SM_NONE = 0,
    SM_UNIX = 1,
    SM_WINDOWS = 2
};

extern STRIP_MODE gStripM;

#define CR  13
#define LF  10

void SaveStatusInRegistry();


/////////////////////////////////////////////////////////////////////////////
// Debugging support

// Use VERIFY_OK around all calls to the Developer Studio objects which
//  you expect to return S_OK.
// In DEBUG builds of your add-in, VERIFY_OK displays an ASSERT dialog box
//  if the expression returns an HRESULT other than S_OK.  If the HRESULT
//  is a success code, the ASSERT box will display that HRESULT.  If it
//  is a failure code, the ASSERT box will display that HRESULT plus the
//  error description string provided by the object which raised the error.
// In RETAIL builds of your add-in, VERIFY_OK just evaluates the expression
//  and ignores the returned HRESULT.

#ifdef _DEBUG

void GetLastErrorDescription(CComBSTR& bstr);       // Defined in Stripem.cpp
#define VERIFY_OK(f) \
    { \
        HRESULT hr = (f); \
        if (hr != S_OK) \
        { \
            if (FAILED(hr)) \
            { \
                CComBSTR bstr; \
                GetLastErrorDescription(bstr); \
                _RPTF2(_CRT_ASSERT, "Object call returned %lx\n\n%S", hr, (BSTR) bstr); \
            } \
            else \
                _RPTF1(_CRT_ASSERT, "Object call returned %lx", hr); \
        } \
    }

#else //_DEBUG

#define VERIFY_OK(f) (f);

#endif //_DEBUG

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__459378B4_A006_11D3_BEB7_52544C099BAF__INCLUDED)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License


Written By
Software Developer (Senior)
Israel Israel
It's all in my website

Comments and Discussions