共用方式為


restricted

Prevents the item from being used by a macro programmer.

Allowed on

Type library, type information, coclass member, or member of a module or interface.

Flags

IMPLTYPEFLAG\_FRESTRICTED FUNCFLAG\_FRESTRICTED TYPEFLAG\_FRESTRICTED VARFLAG\_FRESTRICTED

Remarks

This attribute is allowed on a member of a coclass, independent of whether the member is a dispinterface or interface, and independent of whether the member is a sink or source. A member of a coclass cannot have both the restrictedand default attributes.

Example

[     odl, 
      dual,
      uuid(1e196b20-1f3c-1069-996b-00dd010ef676),
      helpstring("This is IForm"),
      restricted
   ]
   interface IForm: IDispatch
   {
      [propget]
      HRESULT Backcolor([out, retval] long *Value);

      [propput]
      HRESULT Backcolor([in] long Value);
   }


   [  odl, 
      dual,
      uuid(1e196b20-1f3c-1069-996b-00dd010ef767),
      helpstring("This is IFormEvents"),
      restricted
   ]
   interface IFormEvents: IDispatch
   {
      HRESULT Click();
   }


   [  uuid(1e196b20-1f3c-1069-996b-00dd010fe676),
      helpstring("This is Form")
   ]
   coclass Form
   {
      [default] interface IForm;
      [default, source] interface IFormEvents;
   }

Attribute Descriptions