Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.  Creates a device capable of serving UI files and of operating on any of the
        /// protocols the device stack supports as standard but with no services or attributes as yet
        /// </summary>
        /// <param name="aUdn">Universally unique identifier.  The caller is responsible for calculating/assigning this</param>
        /// <param name="aResourceManager">Allows the owner of a device to serve UI files</param>
        public unsafe DvDeviceStandard(string aUdn, IResourceManager aResourceManager)
        {
            iResourceManager = aResourceManager;
            iGch             = GCHandle.Alloc(this);
            IntPtr ptr = GCHandle.ToIntPtr(iGch);
            IntPtr udn = InteropUtils.StringToHGlobalUtf8(aUdn);

            iCallbackResourceManager = new CallbackResourceManager(WriteResource);
            iHandle = DvDeviceStandardCreate(udn, iCallbackResourceManager, ptr);
            Marshal.FreeHGlobal(udn);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor.  Creates a device capable of serving UI files and of operating on any of the
 /// protocols the device stack supports as standard but with no services or attributes as yet
 /// </summary>
 /// <param name="aUdn">Universally unique identifier.  The caller is responsible for calculating/assigning this</param>
 /// <param name="aResourceManager">Allows the owner of a device to serve UI files</param>
 public DvDeviceStandard(string aUdn, IResourceManager aResourceManager)
 {
     iResourceManager = aResourceManager;
     iGch = GCHandle.Alloc(this);
     IntPtr ptr = GCHandle.ToIntPtr(iGch);
     IntPtr udn = InteropUtils.StringToHGlobalUtf8(aUdn);
     iCallbackResourceManager = new CallbackResourceManager(WriteResource);
     iHandle = DvDeviceStandardCreate(udn, iCallbackResourceManager, ptr);
     Marshal.FreeHGlobal(udn);
 }
Ejemplo n.º 3
0
 static extern IntPtr DvDeviceStandardCreate(IntPtr aUdn, CallbackResourceManager aResourceManager, IntPtr aPtr);
Ejemplo n.º 4
0
 static extern IntPtr DvDeviceStandardCreate(IntPtr aUdn, CallbackResourceManager aResourceManager, IntPtr aPtr);
Ejemplo n.º 5
0
 static extern unsafe uint DvDeviceCreate(char *aUdn, CallbackResourceManager aResourceManager, IntPtr aPtr);
Ejemplo n.º 6
0
 static unsafe extern IntPtr DvDeviceStandardCreate(char* aUdn, CallbackResourceManager aResourceManager, IntPtr aPtr);
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor.  Creates a device capable of serving UI files and of operating on any of the
 /// protocols the device stack supports as standard but with no services or attributes as yet
 /// </summary>
 /// <param name="aUdn">Universally unique identifier.  The caller is responsible for calculating/assigning this</param>
 /// <param name="aResourceManager">Allows the owner of a device to serve UI files</param>
 public unsafe DvDeviceStandard(string aUdn, IResourceManager aResourceManager)
 {
     iResourceManager = aResourceManager;
     iGch = GCHandle.Alloc(this);
     IntPtr ptr = GCHandle.ToIntPtr(iGch);
     char* udn = (char*)Marshal.StringToHGlobalAnsi(aUdn).ToPointer();
     iCallbackResourceManager = new CallbackResourceManager(WriteResource);
     iHandle = DvDeviceStandardCreate(udn, iCallbackResourceManager, ptr);
     Marshal.FreeHGlobal((IntPtr)udn);
 }