急救啊!!为什么我看不到方法
使用ATL设计了一个复合控件,在该复合控件的IDL中定义了一个结构如下.然后在接口定义了一个使用该结构的方法.编译该复合控件,没有错误和警告产生.在Activex control test container中可以看到该方法,但是将该复合控件插入VC项目中后,不能发现该方法,这是为什么?
一直郁闷着,请高手帮忙啊!
import "oaidl.idl";
import "ocidl.idl";
#include "olectl.h"
typedef //自定义结构
[uuid(88436cd7-822a-407e-8bca-79fcaedcfc9f)]
struct MyST
{
long x;
long y;
}MyST;
[
object,
uuid(F647B56D-B0F6-4802-8E23-FCB728C88BDB),
dual,
helpstring("IDel_yy Interface"),
pointer_default(unique)
]
interface IDel_yy : IDispatch
{
[propput, id(DISPID_BACKCOLOR)]
HRESULT BackColor([in]OLE_COLOR clr);
[propget, id(DISPID_BACKCOLOR)]
HRESULT BackColor([out,retval]OLE_COLOR* pclr);
[id(1), helpstring("method GetY")] HRESULT GetY([in] MyST* pValue); //使用结构的方法
};
[
uuid(CB034D8E-408C-45B5-A64B-92A02F7B4824),
version(1.0),
helpstring("Del_x1 1.0 Type Library")
]
library DEL_X1Lib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(9A564F4C-FB26-449D-B369-7037B385E9D2),
helpstring("_IDel_yyEvents Interface")
]
dispinterface _IDel_yyEvents
{
properties:
methods:
};
[
uuid(F0983055-1506-477C-9120-83AB0002D297),
helpstring("Del_yy Class")
]
coclass Del_yy
{
[default] interface IDel_yy;
[default, source] dispinterface _IDel_yyEvents;
};
};
以上为整个iDL文件.