コード例 #1
0
ファイル: PRApi.cs プロジェクト: harrywong/PSRecSDK.Net
        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);
        }