foo.h

来自「Visual_C++[1].NET_Bible1 Visual_C++宝典书中」· C头文件 代码 · 共 55 行

H
55
字号
// Foo.h : Declaration of the CFoo

#pragma once
#include "resource.h"       // main symbols


// IFoo
[
	object,
	uuid("C06D95D1-708A-4768-9E14-2B29923EBADD"),
	dual,	helpstring("IFoo Interface"),
	pointer_default(unique)
]
__interface IFoo : IDispatch
{
	[id(1), helpstring("method Something")] HRESULT Something(void);
};



// CFoo
[
	coclass,
	threading("apartment"),
	vi_progid("SimpleServer.Foo"),
	progid("SimpleServer.Foo.1"),
	version(1.0),
	uuid("A1F1E7D9-1C00-468F-898A-054AE9EF76AB"),
	helpstring("Foo Class")
]
class ATL_NO_VTABLE CFoo : 
	public IFoo
{
public:
	CFoo()
	{
	}

	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

public:

	STDMETHOD(Something)(void);
};

⌨️ 快捷键说明

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