#pragma once
#include "ftd2xx.h"

// DLL が export している関数の定義

typedef FT_STATUS(__stdcall* _FT_CreateDeviceInfoList)(LPDWORD);
typedef FT_STATUS(__stdcall* _FT_GetDeviceInfoList)(FT_DEVICE_LIST_INFO_NODE*, LPDWORD);
typedef FT_STATUS(__stdcall* _FT_GetDeviceInfoDetail)(DWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPVOID, LPVOID, FT_HANDLE*);
typedef FT_STATUS(__stdcall* _FT_Open)(int, FT_HANDLE*);
typedef FT_STATUS(__stdcall* _FT_Close)(FT_HANDLE);
typedef FT_STATUS(__stdcall* _FT_Write)(FT_HANDLE, LPVOID, DWORD, LPDWORD);
typedef FT_STATUS(__stdcall* _FT_ResetDevice)(FT_HANDLE);
typedef FT_STATUS(__stdcall* _FT_Purge)(FT_HANDLE, ULONG);
typedef FT_STATUS(__stdcall* _FT_GetStatus)(FT_HANDLE, DWORD*, DWORD*, DWORD*);
typedef FT_STATUS(__stdcall* _FT_GetDeviceInfo)(FT_HANDLE, FT_DEVICE*, LPDWORD, PCHAR, PCHAR, LPVOID);
typedef FT_STATUS(__stdcall* _FT_SetBaudRate)(FT_HANDLE, ULONG);
typedef FT_STATUS(__stdcall* _FT_SetTimeouts)(FT_HANDLE, DWORD, DWORD);
typedef FT_STATUS(__stdcall* _FT_SetBitMode)(FT_HANDLE, UCHAR, UCHAR);
typedef FT_STATUS(__stdcall* _FT_GetBitMode)(FT_HANDLE, PUCHAR);
typedef FT_STATUS(__stdcall* _FT_CyclePort)(FT_HANDLE);
typedef FT_STATUS(__stdcall* _FT_ReadEE)(FT_HANDLE, DWORD, LPWORD);
typedef FT_STATUS(__stdcall* _FT_WriteEE)(FT_HANDLE, DWORD, WORD);
typedef FT_STATUS(__stdcall* _FT_EraseEE)(FT_HANDLE);
typedef FT_STATUS(__stdcall* _FT_EEPROM_Read)(FT_HANDLE, void*, DWORD, char*, char*, char*, char*);
typedef FT_STATUS(__stdcall* _FT_EEPROM_Program)(FT_HANDLE, void *, DWORD, char *, char *, char *, char *);
typedef FT_STATUS(__stdcall* _FT_GetQueueStatus)(FT_HANDLE, LPDWORD);
typedef FT_STATUS(__stdcall* _FT_Read)(FT_HANDLE, LPVOID, DWORD, LPDWORD);
typedef FT_STATUS(__stdcall* _FT_SetLatencyTimer)(FT_HANDLE, UCHAR);
typedef FT_STATUS(__stdcall* _FT_SetBitMode)(FT_HANDLE, UCHAR, UCHAR);
typedef FT_STATUS(__stdcall* _FT_SetUSBParameters)(FT_HANDLE, DWORD, DWORD);
typedef FT_STATUS(__stdcall* _FT_SetChars)(FT_HANDLE, UCHAR, UCHAR, UCHAR, UCHAR);
typedef FT_STATUS(__stdcall* _FT_OpenEx)(PVOID, DWORD, FT_HANDLE*);
