Пример #1
0
        public uint GetDeviceList(out PrDeviceList pDeviceList)
        {
            uint size = (uint)BUFFER_SIZE;
            uint response = 0;

            IntPtr pSpace = Marshal.AllocHGlobal((int)size);
            response = PR_GetDeviceList(ref size, pSpace);

            pDeviceList = (PrDeviceList)Marshal.PtrToStructure(pSpace, typeof(PrDeviceList));
            Marshal.FreeHGlobal(pSpace);
            return response;
        }
Пример #2
0
        public uint GetDeviceList(out PrDeviceList pDeviceList)
        {
            uint size     = (uint)BUFFER_SIZE;
            uint response = 0;

            IntPtr pSpace = Marshal.AllocHGlobal((int)size);

            response = PR_GetDeviceList(ref size, pSpace);

            pDeviceList = (PrDeviceList)Marshal.PtrToStructure(pSpace, typeof(PrDeviceList));
            Marshal.FreeHGlobal(pSpace);
            return(response);
        }