jitclient.cpp

来自「Chapter11-Scalability.rar com example」· C++ 代码 · 共 37 行

CPP
37
字号
// JITClient.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

void sub();

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	CCPLComInitializer init;

	try {
		sub();
	}catch(_com_error& e) {
		::MessageBox(NULL, CPLGetError(e), NULL, MB_OK);
	}

	return 0;
}

void sub()
{
	// Create three objects
	JITSVRLib::IMyJITDemoPtr spJITDemo1(__uuidof(JITSVRLib::MyJITDemo));
	JITSVRLib::IMyJITDemoPtr spJITDemo2(__uuidof(JITSVRLib::MyJITDemo));
	JITSVRLib::IMyJITDemoPtr spJITDemo3(__uuidof(JITSVRLib::MyJITDemo));

	long val1 = spJITDemo1->GetSalary();

	long val2 = spJITDemo1->GetSalary();
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?