📄 foo.h
字号:
// 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);
[id(2), helpstring("method Buggy")] HRESULT Buggy(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 ISupportErrorInfo
public ISupportErrorInfoImpl< &__uuidof(IFoo) >
{
public:
CFoo()
{
}
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
STDMETHOD(Something)(void);
/* STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid)
{
if (InlineIsEqualGUID(__uuidof(IFoo), riid))
return S_OK;
return S_FALSE;
}
*/
STDMETHOD(Buggy)(void);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -