An Example

Object RPC Style


[object, uuid(b5483f00-4f6c-101b-a1c7-00aa00389acb)]
interface IFoo: IUnknown
   {
   HRESULT Bar([in] short i, [in] IBozo* pIB, [out] IWaz** ppIW);
   HRESULT Zork([in, ref] UUID* iid,  [out, iid_is(iid)] void** ppvoid);
   };

DCE style


[uuid(b5483f00-4f6c-101b-a1c7-00aa00389acb)]
interface IFoo
   {
   HRESULT IFoo_QueryInterface([in] handle_t h, [in] ORPCTHIS* _orpcthis, [out] ORPCTHAT* _orpcthat, [in, ref] UUID* iid, [out] OBJREF** ppOR);
   ULONG IFoo_AddRef([in] handle_t, [in] ORPCTHIS* _orpcthis, [out] ORPCTHAT* _orpcthat);
   ULONG IFoo_Release([in] handle_t, [in] ORPCTHIS* _orpcthis, [out] ORPCTHAT* _orpcthat);
   HRESULT IFoo_Bar([in] handle_t h, [in] ORPCTHIS* _orpcthis, [out] ORPCTHAT* _orpcthat, [in, ref] OBJREF* porIB, [out, ref] OBJREF** pporIW);
   HRESULT IFoo_Zork([in]handle_t h, [in] ORPCTHIS* _orpcthis, [out] ORPCTHAT* _orpcthat, [in, ref] UUID* iid, [out] OBJREF** ppvoid);
   };

See Chapter 15 Network Protocol for information on the ORPCTHIS and ORPCTHAT structures and the IRemUnknown interface.