Handle() public method

Get the handle to the underlying native device
public Handle ( ) : IntPtr
return System.IntPtr
コード例 #1
0
ファイル: CpProxy.cs プロジェクト: hacx/ohNet
 protected unsafe CpProxy(String aDomain, String aName, uint aVersion, CpDevice aDevice)
 {
     IntPtr domain = InteropUtils.StringToHGlobalUtf8(aDomain);
     IntPtr name = InteropUtils.StringToHGlobalUtf8(aName);
     iHandle = CpProxyCreate(domain, name, aVersion, aDevice.Handle());
     Marshal.FreeHGlobal(domain);
     Marshal.FreeHGlobal(name);
     IntPtr serviceHandle = CpProxyService(iHandle);
     iService = new CpService(serviceHandle);
     iGchProxy = GCHandle.Alloc(this);
     iSubscriptionStatusLock = new Mutex();
 }
コード例 #2
0
ファイル: CpProxy.cs プロジェクト: wifigeek/ohNet
 protected unsafe CpProxy(String aDomain, String aName, uint aVersion, CpDevice aDevice)
 {
     char* domain = (char*)Marshal.StringToHGlobalAnsi(aDomain);
     char* name = (char*)Marshal.StringToHGlobalAnsi(aName);
     iHandle = CpProxyCreate(domain, name, aVersion, aDevice.Handle());
     Marshal.FreeHGlobal((IntPtr)domain);
     Marshal.FreeHGlobal((IntPtr)name);
     IntPtr serviceHandle = CpProxyService(iHandle);
     iService = new CpService(serviceHandle);
     iGchProxy = GCHandle.Alloc(this);
     iSubscriptionStatusLock = new Mutex();
 }
コード例 #3
0
        protected CpProxy(String aDomain, String aName, uint aVersion, CpDevice aDevice)
        {
            IntPtr domain = InteropUtils.StringToHGlobalUtf8(aDomain);
            IntPtr name   = InteropUtils.StringToHGlobalUtf8(aName);

            iHandle = CpProxyCreate(domain, name, aVersion, aDevice.Handle());
            Marshal.FreeHGlobal(domain);
            Marshal.FreeHGlobal(name);
            IntPtr serviceHandle = CpProxyService(iHandle);

            iService  = new CpService(serviceHandle);
            iGchProxy = GCHandle.Alloc(this);
            iSubscriptionStatusLock = new Mutex();
        }