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; }
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); }