spapak
Posts: 9
Joined: Mon Jun 26, 2006 6:40 am
Location: United Kingdom

_IPortEvents CLSID for WinCE

Thu Jun 12, 2008 8:14 pm

Hello,

can you please pass me the CLSID that is used by _IPortEvents for the Windows CE platform.
I have found the one used in XP {0x744fd705,0x79d5,0x40d4,{0x9c,0x3c,0x99,0x99,0x0d,0x1d,0x84,0xfe}}, through the CPP sample, but not the one in WinCE.

Many thanks
spapak

User avatar
johan
GpsGate
Posts: 15014
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: _IPortEvents CLSID for WinCE

Thu Jun 12, 2008 8:20 pm

Code: Select all

// SerialCE.idl : IDL source for SerialCE.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (SerialCE.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
#include "olectl.h"

[
	uuid(7138A9BE-53E5-49EF-8682-050ED534988D),
	version(1.0),
	helpstring("Franson SerialTools 2.0 (Windows CE)")
]
library SerialCE
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[	
		// uuid(D3AC4EAD-8EC0-47a5-8E7D-56944E519B76), 
		v1_enum, 
		helpstring("Handshake")
	]
	enum Handshake
	{
		None = 0,
		RTS = 1,
		DTR = 2,
		XonXoff = 4
	};


	[	
		// uuid(2F4ACDE1-519F-43dc-A11D-026900A0C026), 
		v1_enum, 
		helpstring("Parity")
	]
	enum Parity
	{
		No = 0,
		Odd = 1,
		Even = 2,
		Mark = 3,
		Space =4
	};


	[	
		// uuid(F60BA719-98D1-49e7-A7BD-E99B56C2A2BC), 
		v1_enum, 
		helpstring("StopBits")
	]
	enum StopBits
	{
		One = 0,
		OneAndOneHalf = 1,
		Two = 2
	};


	[
		object,
		uuid(9E19A2DE-0DD6-4CD1-9AF3-5B9B6B154586),
		dual,
		helpstring("IPort Interface"),
		pointer_default(unique)
	]
	interface IPort : IDispatch
	{
		[propget, id(1), helpstring("property Enabled")] HRESULT Enabled([out, retval] VARIANT *pVal);
		[propput, id(1), helpstring("property Enabled")] HRESULT Enabled([in] VARIANT newVal);
		[propget, id(2), helpstring("property BaudRate")] HRESULT BaudRate([out, retval] VARIANT *pVal);
		[propput, id(2), helpstring("property BaudRate")] HRESULT BaudRate([in] VARIANT newVal);
		[propget, id(3), helpstring("property ComPort")] HRESULT ComPort([out, retval] VARIANT *pVal);
		[propput, id(3), helpstring("property ComPort")] HRESULT ComPort([in] VARIANT newVal);
		[propget, id(4), helpstring("property Parity")] HRESULT Parity([out, retval] VARIANT *pVal);
		[propput, id(4), helpstring("property Parity")] HRESULT Parity([in] VARIANT newVal);
		[propget, id(5), helpstring("property StopBits")] HRESULT StopBits([out, retval] VARIANT *pVal);
		[propput, id(5), helpstring("property StopBits")] HRESULT StopBits([in] VARIANT newVal);
		[propget, id(6), helpstring("property ByteSize")] HRESULT ByteSize([out, retval] VARIANT *pVal);
		[propput, id(6), helpstring("property ByteSize")] HRESULT ByteSize([in] VARIANT newVal);
		[propget, id(7), helpstring("property StartTrigger")] HRESULT StartTrigger([out, retval] VARIANT *pVal);
		[propput, id(7), helpstring("property StartTrigger")] HRESULT StartTrigger([in] VARIANT newVal);
		[propget, id(8), helpstring("property EndTrigger")] HRESULT EndTrigger([out, retval] VARIANT *pVal);
		[propput, id(8), helpstring("property EndTrigger")] HRESULT EndTrigger([in] VARIANT newVal);
		[propget, id(9), helpstring("property BufferSize")] HRESULT BufferSize([out, retval] VARIANT *pVal);
		[propput, id(9), helpstring("property BufferSize")] HRESULT BufferSize([in] VARIANT newVal);
		[propget, id(10), helpstring("property Timeout")] HRESULT Timeout([out, retval] VARIANT *pVal);
		[propput, id(10), helpstring("property Timeout")] HRESULT Timeout([in] VARIANT newVal);
		[propget, id(11), helpstring("property DSR")] HRESULT DSR([out, retval] VARIANT *pVal);
		[propget, id(12), helpstring("property CTS")] HRESULT CTS([out, retval] VARIANT *pVal);
		[propget, id(13), helpstring("property RI")] HRESULT RI([out, retval] VARIANT *pVal);
		[propget, id(14), helpstring("property DCD")] HRESULT DCD([out, retval] VARIANT *pVal);
		[propget, id(15), helpstring("property Handshake")] HRESULT Handshake([out, retval] VARIANT *pVal);
		[propput, id(15), helpstring("property Handshake")] HRESULT Handshake([in] VARIANT newVal);
		[propput, id(16), helpstring("property RTS")] HRESULT RTS([in] VARIANT newVal);
		[propput, id(17), helpstring("property DTR")] HRESULT DTR([in] VARIANT newVal);
		[propget, id(18), helpstring("property MultiThreading")] HRESULT MultiThreading([out, retval] VARIANT *pVal);
		[propput, id(18), helpstring("property MultiThreading")] HRESULT MultiThreading([in] VARIANT newVal);
		[id(19), helpstring("method Read")] HRESULT Read([in] VARIANT BufferSize, [in] VARIANT Timeout, [out, retval]  VARIANT *pVal);
		[id(20), helpstring("method Read2")] HRESULT Read2([in] VARIANT StartTrigger, [in] VARIANT EndTrigger, [in] VARIANT Timeout, [out, retval]  VARIANT *pVal);
		[id(21), helpstring("method Write")] HRESULT Write([in] VARIANT Data, [out, retval] VARIANT* pVal);
		[id(22), helpstring("method Purge")] HRESULT Purge([in] VARIANT InBuffer, [in] VARIANT OutBuffer);
		[id(23), helpstring("method ByteArrayToString")] HRESULT ByteArrayToString([in] VARIANT ByteArray, [out, retval] VARIANT* pVal);
		[id(24), helpstring("method StringToByteArray")] HRESULT StringToByteArray([in] VARIANT Str, [out, retval] VARIANT *pVal);
		[propput, id(25), helpstring("property Break")] HRESULT Break([in] VARIANT newVal);
		[propput, id(26), helpstring("property InfraRed")] HRESULT InfraRed([in] VARIANT newVal);
		[propget, id(27), helpstring("property NoEvents")] HRESULT NoEvents([out, retval] VARIANT *pVal);
		[propput, id(27), helpstring("property NoEvents")] HRESULT NoEvents([in] VARIANT newVal);
		[propget, id(28), helpstring("property List")] HRESULT List([out, retval] VARIANT *pVal);
	};


	[
		uuid(B25E457A-B675-485D-9611-2FCFACAA7E46),
		helpstring("_IPortEvents Interface")
	]
	dispinterface _IPortEvents
	{
		properties:
		methods:
		[id(1), helpstring("method OnRead")] HRESULT OnRead([in] VARIANT* Data);
		[id(2), helpstring("method OnDSR")] HRESULT OnDSR([in] VARIANT* Value);
		[id(3), helpstring("method OnCTS")] HRESULT OnCTS([in] VARIANT* Value);
		[id(4), helpstring("method OnRI")] HRESULT OnRI([in] VARIANT* Value);
		[id(5), helpstring("method OnDCD")] HRESULT OnDCD([in] VARIANT* Value);
		[id(6), helpstring("method OnForceClose")] HRESULT OnForceClose([in] VARIANT* ErrorCode);
		[id(7), helpstring("method OnWritten")] HRESULT OnWritten([in] VARIANT* BytesWritten);
	};
	

	[
		object,
		uuid(3DF2A070-BDD5-43A3-B949-11D0323D2376),
		dual,
		helpstring("ILicense Interface"),
		pointer_default(unique)
	]
	interface ILicense : IDispatch
	{
		[propput, id(1), helpstring("property LicenseKey")] HRESULT LicenseKey([in] VARIANT newVal);
	};


	[
		object,
		uuid(F66A07CB-B883-43DB-A383-98DCBF4F4898),
		dual,
		helpstring("IVPort Interface"),
		pointer_default(unique)
	]
	interface IVPort : IDispatch
	{
		[id(1), helpstring("method DataToPort")] HRESULT DataToPort([in] VARIANT Data, [out, retval] VARIANT* pVal);
		[id(2), helpstring("method DataFromPort")] HRESULT DataFromPort([in] VARIANT BufferSize, [in] VARIANT Timeout, [out, retval] VARIANT* pVal);
		[id(3), helpstring("method DataFromPort2")] HRESULT DataFromPort2([in] VARIANT StartTrigger, [in] VARIANT EndTrigger, [in] VARIANT Timeout, [out, retval] VARIANT* pVal);
		[propget, id(4), helpstring("property StartTrigger")] HRESULT StartTrigger([out, retval] VARIANT *pVal);
		[propput, id(4), helpstring("property StartTrigger")] HRESULT StartTrigger([in] VARIANT newVal);
		[propget, id(5), helpstring("property EndTrigger")] HRESULT EndTrigger([out, retval] VARIANT *pVal);
		[propput, id(5), helpstring("property EndTrigger")] HRESULT EndTrigger([in] VARIANT newVal);
		[propget, id(6), helpstring("property BufferSize")] HRESULT BufferSize([out, retval] VARIANT *pVal);
		[propput, id(6), helpstring("property BufferSize")] HRESULT BufferSize([in] VARIANT newVal);
		[propget, id(7), helpstring("property Timeout")] HRESULT Timeout([out, retval] VARIANT *pVal);
		[propput, id(7), helpstring("property Timeout")] HRESULT Timeout([in] VARIANT newVal);
		[propget, id(8), helpstring("property NoEvents")] HRESULT NoEvents([out, retval] VARIANT *pVal);
		[propput, id(8), helpstring("property NoEvents")] HRESULT NoEvents([in] VARIANT newVal);
		[propget, id(9), helpstring("property ComPort")] HRESULT ComPort([out, retval] VARIANT *pVal);
		[propput, id(9), helpstring("property ComPort")] HRESULT ComPort([in] VARIANT newVal);
		[propget, id(10), helpstring("property Created")] HRESULT Created([out, retval] VARIANT *pVal);
		[propput, id(10), helpstring("property Created")] HRESULT Created([in] VARIANT newVal);
		[propget, id(11), helpstring("property MultiThreading")] HRESULT MultiThreading([out, retval] VARIANT *pVal);
		[propput, id(11), helpstring("property MultiThreading")] HRESULT MultiThreading([in] VARIANT newVal);
		[id(12), helpstring("method PortStatus")] HRESULT PortStatus([in] VARIANT Status, [in] VARIANT Timeout, [out, retval]  VARIANT *pVal);
	};


	[
		uuid(317C4455-6295-4A0F-B910-F0398F7A8EC9),
		helpstring("Port Class")
	]
	coclass Port
	{
		[default] interface IPort;
		[default, source] dispinterface _IPortEvents;
	};


	[
		uuid(D2B6604F-A2EE-419A-B76D-807A998DF974),
		helpstring("License Class")
	]
	coclass License
	{
		[default] interface ILicense;
	};


	[
		uuid(F92635E1-7132-47E6-A6C7-6398DB856909),
		helpstring("_IVPortEvents Interface")
	]
	dispinterface _IVPortEvents
	{
		properties:
		methods:
		[id(1), helpstring("method OnDataFromPort")] HRESULT OnDataFromPort([in] VARIANT* Data);
		[id(2), helpstring("method OnOpened")] HRESULT OnOpened();
		[id(3), helpstring("method OnClosed")] HRESULT OnClosed();
	};


	[
		uuid(E9672510-4C97-4DFD-BD0E-F38C17A65D3F),
		helpstring("VPort Class")
	]
	coclass VPort
	{
		[default] interface IVPort;
		[default, source] dispinterface _IVPortEvents;
	};
};
Regards,
Johan

Franson Support

spapak
Posts: 9
Joined: Mon Jun 26, 2006 6:40 am
Location: United Kingdom

RE: _IPortEvents CLSID for WinCE

Thu Jun 12, 2008 8:24 pm

Thanks Johan for the prompt reply.

Return to “SerialTools”