[ local [, interface-attribute-list] ] interface interface-name
[ object, uuid(string-uuid), local [, interface-attribute-list] ]
interface interface-name
[ local [, function-attribute-list] ] function-declarator ;
/* IDL file #1 */
[local] interface local_procs
{ void MyLocalProc(void);}
/* IDL file #2 */
[object,
uuid(12345678-1234-1234-123456789ABC),
local] interface local_object_procs
{ void MyLocalObjectProc(void);}
/* IDL file #3 */
[uuid(12345678-1234-1234-123456789ABC)]
interface mixed_procs
{
[local] void MyLocalProc(void);
HRESULT MyRemoteProc([in] short sParam);
}
The local attribute can be applied to individual functions or to the interface as a whole.
When used in the interface header, the local attribute allows you to use the MIDL compiler as a header generator. The compiler does not generate stubs for any functions and does not ensure that the header can be transmitted.
For an RPC interface, the local attribute cannot be used at the same time as the uuid attribute. Either uuid or local must be present in the interface header, and the one you choose must occur exactly once.
For an OLE interface (identified by the object interface attribute), the interface attribute list can include the local attribute even though the uuid attribute is present.
When used in an individual function, the local attribute designates a local procedure for which no stubs are generated. Using local as a function attribute is a Microsoft extension to DCE IDL. Therefore this attribute is not available when you compile using the MIDL /osf switch.
Note that an interface without attributes can be imported into a base IDL file. However, the interface must contain only datatypes with no procedures. If even one procedure is contained in the interface, a local or UUID attribute must be specified.