Monthly Archives: November 2005

cppunit simple sample

#include "stdafx.h" #define WIN32_LEAN_AND_MEAN        // Exclude rarely-used stuff from Windows headers#include <stdio.h>#include <tchar.h>#include <iostream>#include <cppunit/testcase.h>#include <cppunit/testcaller.h>#include <cppunit/testresult.h>#include <cppunit/TestSuite.h>#include <cppunit/TestResultCollector.h>#include <cppunit/BriefTestProgressListener.h>#include <cppunit/CompilerOutputter.h>#include <cppunit/ui/text/TestRunner.h> #include "cppunit_auto_link.h"//not a standard cppunit include file class Complex{public:    Complex(int a,int b){}    bool operator==(const Complex& b)    {    … Continue reading

Posted in Uncategorized | Leave a comment

callback from unmanaged to managed code

 // callback_test.cpp : main project file. #include "stdafx.h"#include <windows.h>#include <iostream>using namespace System;using namespace System::Runtime::InteropServices;typedef void (__stdcall *MTAPI_NOTIFY_FUNC)(int code);void __stdcall PumpingProcedure(int code){     std::cout<<__FUNCTION__<<"("<<code<<")"<<std::endl;     }class CObject{public:     bool IsConnected(){return true;}     void Disconnect(){}     void Release(){}     virtual int   __stdcall PumpingSwitch(MTAPI_NOTIFY_FUNC pfnFunc,const HWND destwnd,const UINT eventmsg,const int flags)=0;};class ExCObject :public … Continue reading

Posted in Computers and Internet | Leave a comment

welcome to http://fruitfruit.blogspot.com/

Posted in Uncategorized | Leave a comment

welcome to www.fruitfruit.com

Posted in Uncategorized | Leave a comment