Annotation of mstools/ole20/samples/dispdemo/misc.cpp, revision 1.1

1.1     ! root        1: /*** 
        !             2: *misc.cpp
        !             3: *
        !             4: *  Copyright (C) 1992-93, Microsoft Corporation.  All Rights Reserved.
        !             5: *  Information Contained Herein Is Proprietary and Confidential.
        !             6: *
        !             7: *Purpose:
        !             8: *
        !             9: *Implementation Notes:
        !            10: *
        !            11: *****************************************************************************/
        !            12: 
        !            13: #include "dispdemo.h"
        !            14: 
        !            15: #include <stdio.h>
        !            16: #include <stdarg.h>
        !            17: 
        !            18: 
        !            19: int g_fTrace = 0;
        !            20: 
        !            21: extern "C" void
        !            22: ChkAssert(int fCond, char *file, int line)
        !            23: {
        !            24:     char buf[128];
        !            25: 
        !            26:     if(fCond)
        !            27:       return;
        !            28: 
        !            29:     sprintf(buf, "Assertion failed: %s(%d)\n", file, line);
        !            30: 
        !            31: #ifdef _MAC
        !            32:     DebugStr(c2pstr(buf));
        !            33: #else
        !            34:     OutputDebugString(buf);
        !            35:     DebugBreak();
        !            36: #endif
        !            37: }
        !            38: 
        !            39: STDAPI
        !            40: InitOle(void)
        !            41: {
        !            42:     HRESULT hresult;
        !            43: 
        !            44:     if((hresult = OleInitialize(NULL)) != NOERROR)
        !            45:       return hresult;
        !            46: 
        !            47:     return NOERROR;
        !            48: }
        !            49: 
        !            50: STDAPI
        !            51: UninitOle()
        !            52: {
        !            53:     OleUninitialize();
        !            54: 
        !            55:     return NOERROR;
        !            56: }
        !            57: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.