// $projectname$.idl: ActiveX 控件项目的类型库源。 // 此文件将由 MIDL 编译器工具处理以 // 生成类型库($projectname$.tlb),该类型库将成为 // $projectname$.ocx。 #include #include [ uuid($guid_libid$), version(1.0), control ] library $safeprojectname$Lib { importlib(STDOLE_TLB); // $control_class$ 的主调度接口 [ uuid($guid_primary_iid$) ] dispinterface _D$safeprojectname$ { properties: [!if ASYNC_PROPERTY_LOAD] [id(DISPID_READYSTATE), readonly] long ReadyState; [!endif] methods: [!if ABOUT_BOX] [id(DISPID_ABOUTBOX)] void AboutBox(); [!endif] }; // $control_class$ 的事件调度接口 [ uuid($guid_event_iid$) ] dispinterface _D$safeprojectname$Events { properties: // 事件接口没有任何属性 methods: [!if ASYNC_PROPERTY_LOAD] [id(DISPID_READYSTATECHANGE)] void ReadyStateChange(); [!endif] }; // $control_class$ 的类信息 [ [!if RUNTIME_LICENSE] uuid($guid_control_clsid$), licensed [!else] uuid($guid_control_clsid$) [!endif] ] coclass $safeprojectname$ { [default] dispinterface _D$safeprojectname$; [default, source] dispinterface _D$safeprojectname$Events; }; };