13 #ifndef DMCCOM_H_I_2FC43D18_4D95_434F_A3D5_6D32828701C4
14 #define DMCCOM_H_I_2FC43D18_4D95_434F_A3D5_6D32828701C4
25 typedef unsigned long DWORD;
37 typedef short int SHORT;
38 typedef short int NEAR* PSHORT;
39 typedef short int FAR* LPSHORT;
40 typedef unsigned short int USHORT;
41 typedef unsigned short int NEAR* PUSHORT;
42 typedef unsigned short int FAR* LPUSHORT;
43 #if defined(_WIN32) || defined(__WIN32__)
44 typedef long int LONG;
46 typedef long int NEAR* PLONG;
47 typedef long int FAR* LPLONG;
48 typedef unsigned long int ULONG;
49 typedef unsigned long int NEAR* PULONG;
50 typedef unsigned long int FAR* LPULONG;
52 typedef char NEAR* PCHAR;
53 typedef char FAR* LPCHAR;
54 typedef unsigned char UCHAR;
55 typedef unsigned char NEAR* PUCHAR;
56 typedef unsigned char FAR* LPUCHAR;
57 typedef unsigned char BYTE;
58 typedef unsigned char NEAR* PBYTE;
59 typedef unsigned char FAR* LPBYTE;
60 typedef void NEAR* PVOID;
61 typedef void FAR* LPVOID;
62 typedef char FAR* PSZ;
64 #if defined(_WIN32) || defined(__WIN32__)
65 #define GALILCALL __stdcall
67 #define GALILCALL FAR PASCAL __export
70 #if !defined(_WIN32) && !defined(__WIN32__)
77 typedef LONG HANDLEDMC;
78 typedef HANDLEDMC FAR* PHANDLEDMC;
81 typedef int GALILREGISTRY;
82 typedef GALILREGISTRY* PGALILREGISTRY;
83 typedef GALILREGISTRY* PGALILREGISTRY2;
84 typedef GALILREGISTRY* PGALILREGISTRY3;
162 #define DMCWARNING_MONITOR 1
164 #define DMCERROR_TIMEOUT -1
165 #define DMCERROR_COMMAND -2
166 #define DMCERROR_CONTROLLER -3
167 #define DMCERROR_FILE -4
168 #define DMCERROR_DRIVER -5
169 #define DMCERROR_HANDLE -6
170 #define DMCERROR_HMODULE -7
171 #define DMCERROR_MEMORY -8
172 #define DMCERROR_BUFFERFULL -9
173 #define DMCERROR_RESPONSEDATA -10
174 #define DMCERROR_DMA -11
175 #define DMCERROR_ARGUMENT -12
176 #define DMCERROR_DATARECORD -13
177 #define DMCERROR_DOWNLOAD -14
178 #define DMCERROR_FIRMWARE -15
179 #define DMCERROR_CONVERSION -16
180 #define DMCERROR_RESOURCE -17
181 #define DMCERROR_REGISTRY -18
182 #define DMCERROR_BUSY -19
183 #define DMCERROR_DEVICE_DISCONNECTED -20
184 #define DMCERROR_TIMEING_ERROR -21
185 #define DMCERROR_WRITEBUFFER_TOO_LARGE -22
186 #define DMCERROR_NO_MODIFY_PNP_CONTROLLER -23
187 #define DMCERROR_FUNCTION_OBSOLETE -24
188 #define DMCERROR_STREAMING_COMMAND_IN_PROGRESS -25
189 #define DMCERROR_DEVICEDRIVER_VERSION_TOO_OLD -26
190 #define DMCERROR_STREAMING_COMMAND_MUST_BE_SOLITARY -27
191 #define DMCERROR_FIRMWARE_VERSION_TOO_OLD -28
192 #define DMCERROR_ETHERNET_NO_MORE_HANDLES -29
193 #define DMCERROR_NETWORK_UNREACHABLE -30
484 LONG FAR GALILCALL
DMCOpen(USHORT usController,
void *hwnd,
501 LONG FAR GALILCALL
DMCOpen2(USHORT usController, LONG lThreadID,
504 return DMCOpen(usController, 0, phdmc);
510 LONG FAR GALILCALL DMCOpenDesc(PSZ pszDescription,
void *hwnd, PHANDLEDMC phdmc, PUSHORT pControllerNum)
512 return DMCERROR_ARGUMENT;
516 LONG FAR GALILCALL DMCOpenDesc2(PSZ pszDescription, LONG lThreadID, PHANDLEDMC phdmc, PUSHORT pControllerNum)
518 return DMCERROR_ARGUMENT;
522 LONG FAR GALILCALL DMCGetHandle(USHORT usController, PHANDLEDMC phdmc)
524 return DMCERROR_HANDLE;
527 HANDLE GALILCALL DMCInterruptEventHandle( USHORT arg)
532 LONG FAR GALILCALL DMCChangeInterruptNotification(HANDLEDMC hdmc, LONG lHandle)
534 return DMCERROR_HANDLE;
548 LONG FAR GALILCALL
DMCClose(HANDLEDMC hdmc);
571 LONG FAR GALILCALL
DMCCommand(HANDLEDMC hdmc, PSZ pszCommand,
572 LPCHAR pchResponse, ULONG cbResponse);
577 LONG FAR GALILCALL DMCFastCommand(HANDLEDMC hdmc, PSZ pszCommand)
579 return DMCERROR_HANDLE;
582 LONG FAR GALILCALL DMCBinaryCommand(HANDLEDMC hdmc, LPBYTE pbCommand, ULONG ulCommandLength,
583 LPCHAR pchResponse, ULONG cbResponse)
585 return DMCERROR_HANDLE;
601 LPCHAR pchResponse, ULONG cbResponse);
606 LONG FAR GALILCALL DMCWriteData(HANDLEDMC hdmc,
607 LPCHAR pchBuffer, ULONG cbBuffer, LPULONG pulBytesWritten)
609 return DMCERROR_HANDLE;
612 LONG FAR GALILCALL DMCReadData(HANDLEDMC hdmc,
613 LPCHAR pchBuffer, ULONG cbBuffer, LPULONG pulBytesRead)
615 return DMCERROR_HANDLE;
631 LPULONG pulResponseLen);
644 LPCHAR pchResponse, ULONG cbResponse);
649 LONG FAR GALILCALL DMCError(HANDLEDMC hdmc, LONG lError, LPCHAR pchMessage,
652 return DMCERROR_HANDLE;
655 LONG FAR GALILCALL DMCClear(HANDLEDMC hdmc)
660 LONG FAR GALILCALL DMCReset(HANDLEDMC hdmc)
662 return DMCERROR_HANDLE;
665 LONG FAR GALILCALL DMCMasterReset(HANDLEDMC hdmc)
667 return DMCERROR_HANDLE;
689 LONG FAR GALILCALL
DMCVersion(HANDLEDMC hdmc, LPCHAR pchVersion,
715 LONG FAR GALILCALL
DMCUploadFile(HANDLEDMC hdmc, PSZ pszFileName);
731 LONG FAR GALILCALL DMCSendFile(HANDLEDMC hdmc, PSZ pszFileName)
733 return DMCERROR_HANDLE;
736 LONG FAR GALILCALL DMCSendBinaryFile(HANDLEDMC hdmc, PSZ pszFileName)
738 return DMCERROR_HANDLE;
761 USHORT usFirstElement, USHORT usLastElement, LPCHAR pchData, ULONG cbData,
762 LPULONG cbBytesWritten);
780 LONG FAR GALILCALL
DMCArrayUpload(HANDLEDMC hdmc, PSZ pszArrayName,
781 USHORT usFirstElement, USHORT usLastElement, LPCHAR pchData, ULONG cbData,
782 LPULONG pulBytesRead, SHORT fComma);
788 LONG FAR GALILCALL DMCCommand_AsciiToBinary(HANDLEDMC hdmc, PSZ pszAsciiCommand,
789 ULONG ulAsciiCommandLength, LPBYTE pbBinaryResult,
790 ULONG cbBinaryResult, LPULONG pulBinaryResultLength)
792 return DMCERROR_HANDLE;
795 LONG FAR GALILCALL DMCCommand_BinaryToAscii(HANDLEDMC hdmc, LPBYTE pbBinaryCommand,
796 ULONG ulBinaryCommandLength, PSZ pszAsciiResult,
797 ULONG cbAsciiResult, LPULONG pulAsciiResultLength)
799 return DMCERROR_HANDLE;
802 LONG FAR GALILCALL DMCFile_AsciiToBinary(HANDLEDMC hdmc, PSZ pszInputFileName,
803 PSZ pszOutputFileName)
805 return DMCERROR_HANDLE;
808 LONG FAR GALILCALL DMCFile_BinaryToAscii(HANDLEDMC hdmc, PSZ pszInputFileName,
809 PSZ pszOutputFileName)
811 return DMCERROR_HANDLE;
814 LONG FAR GALILCALL DMCReadSpecialConversionFile(HANDLEDMC hdmc, PSZ pszFileName)
816 return DMCERROR_HANDLE;
834 LONG FAR GALILCALL DMCGetDataRecord(HANDLEDMC hdmc, USHORT usGeneralOffset,
835 USHORT usAxisInfoOffset, LPUSHORT pusDataType, LPLONG plData)
837 return DMCERROR_HANDLE;
840 LONG FAR GALILCALL DMCGetDataRecordByItemId(HANDLEDMC hdmc, USHORT usItemId,
841 USHORT usAxisId, LPUSHORT pusDataType, LPLONG plData)
843 return DMCERROR_HANDLE;
846 LONG FAR GALILCALL DMCGetDataRecordSize(HANDLEDMC hdmc, LPUSHORT pusRecordSize)
848 return DMCERROR_HANDLE;
851 LONG FAR GALILCALL DMCCopyDataRecord(HANDLEDMC hdmc, PVOID pDataRecord)
853 return DMCERROR_HANDLE;
856 LONG FAR GALILCALL DMCGetDataRecordRevision(HANDLEDMC hdmc, LPUSHORT pusRevision)
858 return DMCERROR_HANDLE;
861 LONG FAR GALILCALL DMCDiagnosticsOn(HANDLEDMC hdmc, PSZ pszFileName,
864 return DMCERROR_HANDLE;
867 LONG FAR GALILCALL DMCDiagnosticsOff(HANDLEDMC hdmc)
869 return DMCERROR_HANDLE;
872 LONG FAR GALILCALL DMCGetTimeout(HANDLEDMC hdmc, LONG FAR* pTimeout)
874 return DMCERROR_HANDLE;
877 LONG FAR GALILCALL DMCSetTimeout(HANDLEDMC hdmc, LONG lTimeout)
879 return DMCERROR_HANDLE;
882 LONG FAR GALILCALL DMCGetDelay(HANDLEDMC hdmc, LONG FAR* pDelay)
884 return DMCERROR_HANDLE;
887 LONG FAR GALILCALL DMCSetDelay(HANDLEDMC hdmc, LONG lDelay)
889 return DMCERROR_HANDLE;
892 LONG FAR GALILCALL DMCAddGalilRegistry(PGALILREGISTRY pgalilregistry,
893 LPUSHORT pusController)
895 return DMCERROR_RESOURCE;
898 LONG FAR GALILCALL DMCAddGalilRegistry2(PGALILREGISTRY2 pgalilregistry2,
899 LPUSHORT pusController)
901 return DMCERROR_RESOURCE;
904 LONG FAR GALILCALL DMCAddGalilRegistry3(PGALILREGISTRY3 pgalilregistry3,
905 LPUSHORT pusController)
907 return DMCERROR_RESOURCE;
910 LONG FAR GALILCALL DMCModifyGalilRegistry(USHORT usController,
911 PGALILREGISTRY pgalilregistry)
913 return DMCERROR_RESOURCE;
916 LONG FAR GALILCALL DMCModifyGalilRegistry2(USHORT usController,
917 PGALILREGISTRY2 pgalilregistry2)
919 return DMCERROR_RESOURCE;
922 LONG FAR GALILCALL DMCModifyGalilRegistry3(USHORT usController,
923 PGALILREGISTRY3 pgalilregistry3)
925 return DMCERROR_RESOURCE;
928 LONG FAR GALILCALL DMCGetGalilRegistryInfo(USHORT usController,
929 PGALILREGISTRY pgalilregistry)
931 return DMCERROR_RESOURCE;
934 LONG FAR GALILCALL DMCGetGalilRegistryInfo2(USHORT usController,
935 PGALILREGISTRY2 pgalilregistry2)
937 return DMCERROR_RESOURCE;
940 LONG FAR GALILCALL DMCGetGalilRegistryInfo3(USHORT usController,
941 PGALILREGISTRY3 pgalilregistry3)
943 return DMCERROR_RESOURCE;
946 LONG FAR GALILCALL DMCEnumGalilRegistry(USHORT FAR* pusCount,
947 PGALILREGISTRY pgalilregistry)
949 return DMCERROR_RESOURCE;
952 LONG FAR GALILCALL DMCEnumGalilRegistry2(USHORT FAR* pusCount,
953 PGALILREGISTRY2 pgalilregistry2)
955 return DMCERROR_RESOURCE;
958 LONG FAR GALILCALL DMCEnumGalilRegistry3(USHORT FAR* pusCount,
959 PGALILREGISTRY3 pgalilregistry3)
961 return DMCERROR_RESOURCE;
964 LONG FAR GALILCALL DMCDeleteGalilRegistry(SHORT sController)
966 return DMCERROR_RESOURCE;
969 LONG FAR GALILCALL DMCGetControllerDesc(USHORT usController, PSZ pszControllerDesc, ULONG cbControllerDesc)
971 return DMCERROR_RESOURCE;
974 LONG FAR GALILCALL DMCRegisterPnpControllers(USHORT* pusCount)
980 SHORT FAR GALILCALL DMCSelectController(
int * hwnd)
986 VOID FAR GALILCALL DMCEditRegistry(
int * hwnd)
991 LONG FAR GALILCALL DMCAssignIPAddress(
int * hWnd, PGALILREGISTRY2 pgalilregistry2)
993 return DMCERROR_ARGUMENT;
996 LONG FAR GALILCALL DMCWaitForMotionComplete(HANDLEDMC hdmc, PSZ pszAxes, SHORT fDispatchMsgs)
998 return DMCERROR_HANDLE;
1001 LONG FAR GALILCALL DMCDownloadFirmwareFile(HANDLEDMC hdmc, PSZ pszFileName, SHORT fDisplayDialog)
1003 return DMCERROR_HANDLE;
1006 LONG FAR GALILCALL DMCCompressFile(PSZ pszInputFileName, PSZ pszOutputFileName, USHORT usLineWidth,
1007 PUSHORT pusLineCount)
1009 return DMCERROR_FILE;
1036 #if defined(_WIN32) || defined(__WIN32__)
1039 LONG FAR GALILCALL DMCReadRegister(HANDLEDMC hdmc, USHORT usOffset, PBYTE pbStatus)
1041 return DMCERROR_HANDLE;
1044 LONG FAR GALILCALL DMCWriteRegister(HANDLEDMC hdmc, USHORT usOffset, BYTE bStatus)
1046 return DMCERROR_HANDLE;
1049 LONG FAR GALILCALL DMCStartDeviceDriver(USHORT usController)
1054 LONG FAR GALILCALL DMCStopDeviceDriver(USHORT usController)
1059 LONG FAR GALILCALL DMCStopDeviceDriverEx( DWORD dwType )
1064 LONG FAR GALILCALL DMCStartDeviceDriverEx( DWORD dwType )
1069 LONG FAR GALILCALL DMCQueryDeviceDriver( DWORD dwType )
1074 LONG FAR GALILCALL DMCSendCW2OnClose( HANDLEDMC hdmc, BOOL *pbValue )
1076 return DMCERROR_HANDLE;
1079 LONG FAR GALILCALL DMCGetDataRecordItemOffsetById( HANDLEDMC hdmc, USHORT usItemId,
1080 USHORT usAxisId, LPUSHORT pusOffset, LPUSHORT pusDataType )
1082 return DMCERROR_HANDLE;
1103 LONG FAR GALILCALL DMCGetDataRecordConstPointerArray(HANDLEDMC hdmc,
const char **pchDataRecord, LPUSHORT pusNumDataRecords)
1105 return DMCERROR_HANDLE;
1111 struct CDMCFullDataRecord;
1112 LONG FAR GALILCALL DMCGetDataRecordArray(HANDLEDMC hdmc, CDMCFullDataRecord **pDataRecordArray, LPUSHORT pusNumDataRecords)
1114 return DMCERROR_HANDLE;
1117 struct CDMCFullDataRecord2;
1118 LONG FAR GALILCALL DMCGetDataRecordArray2(HANDLEDMC hdmc, CDMCFullDataRecord2 **pDataRecordArray, LPUSHORT pusNumDataRecords)
1120 return DMCERROR_HANDLE;
1135 #endif // DMCCOM_H_I_2FC43D18_4D95_434F_A3D5_6D32828701C4
LONG FAR GALILCALL DMCOpen2(USHORT usController, LONG lThreadID, PHANDLEDMC phdmc)
Open communications with the Galil controller. DMCOpen2 is a wrapper around DMCOpen.
Definition: Dmccom.h:501
LONG FAR GALILCALL DMCGetAdditionalResponseLen(HANDLEDMC hdmc, LPULONG pulResponseLen)
Query the Galil controller for the length of additional response data.
LONG FAR GALILCALL DMCArrayDownload(HANDLEDMC hdmc, PSZ pszArrayName, USHORT usFirstElement, USHORT usLastElement, LPCHAR pchData, ULONG cbData, LPULONG cbBytesWritten)
Download an array to the Galil controller.
LONG FAR GALILCALL DMCRefreshDataRecord(HANDLEDMC hdmc, ULONG ulLength)
Refresh the data record used for fast polling.
LONG FAR GALILCALL DMCGetAdditionalResponse(HANDLEDMC hdmc, LPCHAR pchResponse, ULONG cbResponse)
Query the Galil controller for more response data.
LONG FAR GALILCALL DMCGetUnsolicitedResponse(HANDLEDMC hdmc, LPCHAR pchResponse, ULONG cbResponse)
Query the Galil controller for unsolicited responses.
LONG FAR GALILCALL DMCDownloadFile(HANDLEDMC hdmc, PSZ pszFileName, PSZ pszLabel)
Download a file to the Galil controller.
LONG FAR GALILCALL DMCOpen(USHORT usController, void *hwnd, PHANDLEDMC phdmc)
Open communications with the Galil controller.
LONG FAR GALILCALL DMCUploadFile(HANDLEDMC hdmc, PSZ pszFileName)
Upload a file from the Galil controller.
LONG FAR GALILCALL DMCArrayUpload(HANDLEDMC hdmc, PSZ pszArrayName, USHORT usFirstElement, USHORT usLastElement, LPCHAR pchData, ULONG cbData, LPULONG pulBytesRead, SHORT fComma)
Upload an array from the Galil controller.
LONG FAR GALILCALL DMCClose(HANDLEDMC hdmc)
Close communications with the Galil controller.
LONG FAR GALILCALL DMCUploadToBuffer(HANDLEDMC hdmc, LPCHAR pchBuffer, ULONG cbBuffer)
Upload to a buffer from the Galil controller.
LONG FAR GALILCALL DMCGetDataRecordConstPointer(HANDLEDMC hdmc, const char **pchDataRecord)
Get a const pointer to the most recent data record.
LONG FAR GALILCALL DMCCommand(HANDLEDMC hdmc, PSZ pszCommand, LPCHAR pchResponse, ULONG cbResponse)
Send a DMC command in ascii format to the Galil controller.
LONG FAR GALILCALL DMCVersion(HANDLEDMC hdmc, LPCHAR pchVersion, ULONG cbVersion)
Get the version of the Galil controller.
LONG FAR GALILCALL DMCDownloadFromBuffer(HANDLEDMC hdmc, PSZ pszBuffer, PSZ pszLabel)
Download from a buffer to the Galil controller.