General Category > Discussion - Software

Unexpected invalid handle - conflict between two devices

<< < (2/2)

dania:
AN_178 User Guide For libMPSSE - SPI says:
--- Quote ---Structure definition of FT_DEVICE_LIST_INFO_NODE is in the D2XX Programmer's Guide.
--- End quote ---
I expected that it would not be a problem to use FT_DEVICE_INFO_NODE defined in FTD2XX_NET in LibMPSSE functions call. Unfortunately, this turned out to be a problem. When I define the structure like this

--- Code: ---[StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct FT_DEVICE_LIST_INFO_NODE
    {
        public uint Flags;
        public uint Type;
        public uint ID;
        public uint LocID;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
        public byte[] SerialNumber;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
        public byte[] Description;
    }

--- End code ---
everything works as it should. This solved the issue.

Both devices were connected only to the PC and were not otherwise connected.

Navigation

[0] Message Index

[*] Previous page

Go to full version