// Queue1.idl : IDL source for Queue1.dll // // This file will be processed by the MIDL tool to // produce the type library (Queue1.tlb) and marshalling code. import "oaidl.idl"; import "ocidl.idl"; [ object, uuid(AFB0FF70-487E-11D6-A9A4-00606772164E), helpstring("IQueue Interface"), pointer_default(unique) ] interface IGet : IUnknown { // To get items. Note: aLength is the length of the buffer going in, the actual length going out [helpstring("method Get")] HRESULT Get([in]char*aItem, [in,out]UINT*aLength, [in]UINT*aTimeout); // Wait until data is available [helpstring("method Available")] HRESULT Available([in]UINT*aLength, [in]UINT*aTimeout); // This will clear the queue [helpstring("method Clear")] HRESULT Clear(); // This will interrupt the Get or Available operations [helpstring("method Interrupt")] HRESULT Interrupt(); // This will return the number of characters in the queue [helpstring("method Used")] HRESULT Used([out]UINT*aSize); }; [ object, uuid(AFB0FF71-487E-11D6-A9A4-00606772164E), helpstring("IQueue Interface"), pointer_default(unique) ] interface IQueue : IUnknown { // This will get the object that is supplying the characters [propget, helpstring("property Interface")] HRESULT Interface([out, retval] IGet* *pVal); // Setting the interface will start the queue. There is no reason to start it before that [propput, helpstring("property Interface")] HRESULT Interface([in] IGet* newVal); // This will return the number of characters free for the queue // (I cannot put this above because the number of characters might // not be possible if this were a linked implementation. [helpstring("method Free")] HRESULT Free([out]UINT*aSize); }; [ uuid(AFB0FF60-487E-11D6-A9A4-00606772164E), version(1.0), helpstring("Queue1 1.0 Type Library") ] library QUEUE1Lib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ uuid(AFB0FF7B-487E-11D6-A9A4-00606772164E), helpstring("Queue Class") ] coclass Queue { [default] interface IGet; interface IQueue; }; };