Figure 1   IDL Without IDispatch


 [
   object,
   uuid(1BAD0B0E-0000-0000-C000-000000000046)
 ]
 interface ICanBeUsed : IUnknown 
 {
   import "unknwn.idl";
   HRESULT DoSomething([in] long n, 
                       [out, retval] long *pRes);
   [propput] HRESULT Attr([in] long val);
   [propget] HRESULT Attr([out, retval] long *pv);
 }
 [
   uuid(2BAD0B0E-0000-0000-C000-000000000046),
   helpstring("Please Import Me In Visual Basic!"),
   version(1.0), lcid(0)
 ]
 library UseMeLib
 {
   importlib("stdole32.tlb");
   [
     uuid(3BAD0B0E-0000-0000-C000-000000000046)
   ]
   coclass UseThisClass
   {
     interface ICanBeUsed;
   }
 }


Figure 2   oleautomation Use in IDL


 [
   oleautomation,
   object,
   uuid(5BAD0B0E-0000-0000-C000-000000000046)
 ]
 interface ImOKYourSoSo : IUnknown 
 {
   import "unknwn.idl";
   HRESULT DoIt([in] long n, 
                [out, retval] BSTR *pRes);
 }
 [
   uuid(6BAD0B0E-0000-0000-C000-000000000046),
   helpstring("Please call RegisterTypeLib!"),
   version(1.0), lcid(0)
 ]
 library MarshalerLib
 {
   importlib("stdole32.tlb");
   interface ImOKYourSoSo; // bring def into TLB
 }