Sign in to follow this  
Followers 0
Lion1985

Work with DLL files

2 posts in this topic

Hey All, i want to thank the whole community of AutoIt to make a tool like this possible, i use it a lot.

In most cases i use autoIt by using examples and helping topics from where i make it a whole new script with more functions/actions.

But now i got stuck on the question from someone which is about working with a DLL file.

I can find enough about http://www.autoitscript.com/autoit3/docs/functions/DllCall.htm

But i cant find a way to call the functions in the dll file and get it to give me a callback, i guess in some cases i have to give it a location to some file for example and in some cases i just have to give the dll functions some string to make the font bigger of some text within the program.

Does anyone have the knownledge to get me started?

It have the following functions:

lmc1_AddBarCodeToLib 0x1000db30 0x0000db30 7 (0x7)
lmc1_AddCircleToLib 0x10014ee0 0x00014ee0 8 (0x8)
lmc1_AddCurveToLib 0x10010210 0x00010210 9 (0x9)
lmc1_AddCurveToLib2 0x10010440 0x00010440 10 (0xa)
lmc1_AddFileToLib 0x1000d360 0x0000d360 11 (0xb)
lmc1_AddPointToLib 0x10010690 0x00010690 12 (0xc)
lmc1_AddTextToLib 0x1000cf60 0x0000cf60 13 (0xd)
lmc1_AxisCorrectOrigin 0x1000f0e0 0x0000f0e0 14 (0xe)
lmc1_AxisMoveTo 0x1000f090 0x0000f090 15 (0xf)
lmc1_AxisMoveToPulse 0x1000f160 0x0000f160 16 (0x10)
lmc1_CameraMark 0x1000b690 0x0000b690 17 (0x11)
lmc1_CancelMark 0x10012a70 0x00012a70 18 (0x12)
lmc1_ChangeEarCode 0x10014d60 0x00014d60 19 (0x13)
lmc1_ChangeEarCodeStr 0x10014e20 0x00014e20 1 (0x1)
lmc1_ChangeEntName 0x10013cc0 0x00013cc0 20 (0x14)
lmc1_ChangeTextByName 0x1000e930 0x0000e930 21 (0x15)
lmc1_ClearEntLib 0x1000cc10 0x0000cc10 22 (0x16)
lmc1_Close 0x10008bc0 0x00008bc0 23 (0x17)
lmc1_CloseUsbMonitor 0x10013330 0x00013330 24 (0x18)
lmc1_CopyEnt 0x10013c10 0x00013c10 25 (0x19)
lmc1_DeleteEnt 0x10013880 0x00013880 26 (0x1a)
lmc1_DestroyAllCurve 0x10005910 0x00005910 27 (0x1b)
lmc1_DirectSetDevCfg 0x1000c140 0x0000c140 28 (0x1c)
lmc1_DrawTextInWnd 0x10011480 0x00011480 29 (0x1d)
Lmc1_EnableBreakCrossPoint 0x10014150 0x00014150 5 (0x5)
lmc1_EntityIsBarcode 0x1000ec80 0x0000ec80 30 (0x1e)
lmc1_FlyMark 0x100111a0 0x000111a0 31 (0x1f)
lmc1_GetAllCurveFromLib 0x10005830 0x00005830 32 (0x20)
lmc1_GetAllFontRecord 0x1000f290 0x0000f290 33 (0x21)
lmc1_GetAxisCoor 0x1000f120 0x0000f120 34 (0x22)
lmc1_GetAxisCoorPulse 0x1000f1d0 0x0000f1d0 35 (0x23)
lmc1_GetBitmapEntParam 0x100130a0 0x000130a0 36 (0x24)
lmc1_GetCharSizeByIndex 0x10013d60 0x00013d60 37 (0x25)
lmc1_GetClientID 0x100113d0 0x000113d0 38 (0x26)
lmc1_GetCurCoor 0x10010060 0x00010060 39 (0x27)
lmc1_GetDevCfg 0x1000f260 0x0000f260 40 (0x28)
lmc1_GetDongleID 0x100113f0 0x000113f0 41 (0x29)
lmc1_GetEntityCount 0x1000fb00 0x0000fb00 43 (0x2b)
lmc1_GetEntityName 0x1000fb20 0x0000fb20 44 (0x2c)
lmc1_GetEntSize 0x1000f470 0x0000f470 42 (0x2a)
lmc1_GetEzdFilePrevBitmap 0x1000beb0 0x0000beb0 45 (0x2d)
lmc1_GetFirstPulseKiller 0x100150a0 0x000150a0 46 (0x2e)
lmc1_GetFontRecord 0x1000f370 0x0000f370 47 (0x2f)
lmc1_GetFontRecordCount 0x1000f340 0x0000f340 48 (0x30)
lmc1_GetLibParamCount 0x10014580 0x00014580 2 (0x2)
lmc1_GetLibParamName 0x100145a0 0x000145a0 3 (0x3)
lmc1_GetOutPort 0x1000b930 0x0000b930 49 (0x31)
lmc1_GetPenColor 0x1000c930 0x0000c930 50 (0x32)
lmc1_GetPenName 0x1000ca10 0x0000ca10 51 (0x33)
lmc1_GetPenNumberFromName 0x10012c40 0x00012c40 52 (0x34)
lmc1_GetPenParam 0x1000c2d0 0x0000c2d0 53 (0x35)
lmc1_GetPenParam2 0x1000c460 0x0000c460 54 (0x36)
lmc1_GetPrevBitmap 0x1000be30 0x0000be30 55 (0x37)
lmc1_GetPrevBitmap2 0x1000be60 0x0000be60 56 (0x38)
lmc1_GetPrevBitmapByName 0x10012570 0x00012570 57 (0x39)
lmc1_GetPrevBitmapByName2 0x10012530 0x00012530 58 (0x3a)
lmc1_GetPrevBitmapByRange 0x100124d0 0x000124d0 59 (0x3b)
lmc1_GetTextByName 0x1000eb30 0x0000eb30 60 (0x3c)
lmc1_GetTextEntBasePt 0x10012f00 0x00012f00 61 (0x3d)
lmc1_GetTextEntParam 0x10013990 0x00013990 62 (0x3e)
lmc1_GotoPos 0x100108d0 0x000108d0 63 (0x3f)
lmc1_GroupEnt 0x10013380 0x00013380 64 (0x40)
lmc1_hans_SetAjustParam 0x10014220 0x00014220 127 (0x7f)
lmc1_HatchEnt 0x10013620 0x00013620 65 (0x41)
lmc1_Initial 0x100077c0 0x000077c0 68 (0x44)
lmc1_Initial2 0x100064a0 0x000064a0 69 (0x45)
lmc1_InitMarkFlyToBoard 0x10011170 0x00011170 66 (0x42)
lmc1_InitUsbMonitor 0x10013320 0x00013320 67 (0x43)
lmc1_IsDemoState 0x10015070 0x00015070 70 (0x46)
lmc1_LaserOn 0x10010840 0x00010840 71 (0x47)
lmc1_LoadEzdFile 0x1000b000 0x0000b000 72 (0x48)
lmc1_Mark 0x1000b6d0 0x0000b6d0 73 (0x49)
lmc1_MarkEntity 0x1000b960 0x0000b960 74 (0x4a)
lmc1_MarkEntityByPen 0x1000bb50 0x0000bb50 75 (0x4b)
lmc1_MarkEntityFly 0x1000bcc0 0x0000bcc0 76 (0x4c)
lmc1_MarkEntityTrape 0x10012cb0 0x00012cb0 77 (0x4d)
lmc1_MarkFlyByStartSignal 0x1000a100 0x0000a100 78 (0x4e)
lmc1_MarkLine 0x1000fc90 0x0000fc90 79 (0x4f)
lmc1_MarkLine2 0x1000ff20 0x0000ff20 80 (0x50)
lmc1_MarkPoint 0x1000ffd0 0x0000ffd0 81 (0x51)
lmc1_MarkPointBuf 0x10012600 0x00012600 82 (0x52)
lmc1_MarkPointBuf2 0x10012850 0x00012850 83 (0x53)
lmc1_MirrorEnt 0x1000f7a0 0x0000f7a0 84 (0x54)
lmc1_MonoSpaceFixed 0x10014170 0x00014170 4 (0x4)
lmc1_MonospaceMode 0x10013fa0 0x00013fa0 85 (0x55)
lmc1_MoveEnt 0x1000f590 0x0000f590 86 (0x56)
lmc1_MoveTextEntBasePtAbsolute 0x10012fd0 0x00012fd0 87 (0x57)
lmc1_OpenTickle 0x10012a90 0x00012a90 88 (0x58)
lmc1_ReadLmcCfgFile 0x1000fc00 0x0000fc00 89 (0x59)
lmc1_ReadPort 0x1000b8d0 0x0000b8d0 90 (0x5a)
lmc1_RedLightMark 0x1000b3d0 0x0000b3d0 91 (0x5b)
lmc1_RedLightMarkContour 0x1000b530 0x0000b530 92 (0x5c)
lmc1_Reset 0x1000f220 0x0000f220 93 (0x5d)
lmc1_RotateEnt 0x1000f9d0 0x0000f9d0 94 (0x5e)
lmc1_SaveEntLibToFile 0x1000f410 0x0000f410 95 (0x5f)
lmc1_SaveLmcCfgFile 0x1000fc60 0x0000fc60 96 (0x60)
lmc1_ScaleEnt 0x1000f690 0x0000f690 97 (0x61)
lmc1_SetBitmapEntParam 0x100131c0 0x000131c0 98 (0x62)
lmc1_SetDevCfg 0x1000c090 0x0000c090 99 (0x63)
lmc1_SetEntAllChildPen 0x10013f00 0x00013f00 100 (0x64)
lmc1_SetEntityName 0x10013920 0x00013920 101 (0x65)
lmc1_SetFirstPulseKiller 0x100150e0 0x000150e0 102 (0x66)
lmc1_SetFontParam 0x1000caf0 0x0000caf0 103 (0x67)
lmc1_SetHatchParam 0x1000c1b0 0x0000c1b0 104 (0x68)
lmc1_SetIPGPower 0x100109d0 0x000109d0 105 (0x69)
lmc1_SetPenColor 0x1000c9a0 0x0000c9a0 106 (0x6a)
lmc1_SetPenDisable 0x1000c8c0 0x0000c8c0 107 (0x6b)
lmc1_SetPenName 0x1000ca80 0x0000ca80 108 (0x6c)
Lmc1_SetPenNumberName 0x10012bf0 0x00012bf0 6 (0x6)
lmc1_SetPenParam 0x1000c5c0 0x0000c5c0 109 (0x6d)
lmc1_SetPenParam2 0x1000c750 0x0000c750 110 (0x6e)
lmc1_SetPwm 0x10010a40 0x00010a40 111 (0x6f)
lmc1_SetRotateMoveParam 0x1000ee80 0x0000ee80 112 (0x70)
lmc1_SetRotateMoveParam2 0x1000ef50 0x0000ef50 113 (0x71)
lmc1_SetRotateParam 0x1000ed40 0x0000ed40 114 (0x72)
lmc1_SetSpiPower 0x10012eb0 0x00012eb0 115 (0x73)
lmc1_SetSpiWave 0x10012e50 0x00012e50 116 (0x74)
lmc1_SetTickleParam 0x10012b20 0x00012b20 117 (0x75)
lmc1_SetTransformMatrix 0x1000edc0 0x0000edc0 118 (0x76)
lmc1_StopMark 0x1000b120 0x0000b120 119 (0x77)
lmc1_TextResetSn 0x1000ea40 0x0000ea40 120 (0x78)
lmc1_TransformAllEnt 0x10014380 0x00014380 121 (0x79)
lmc1_UnGroupEnt 0x10013540 0x00013540 122 (0x7a)
lmc1_UnHatchEnt 0x100137a0 0x000137a0 123 (0x7b)
lmc1_UpdatePenParam 0x100144b0 0x000144b0 124 (0x7c)
lmc1_UsbMonitorGetNewDevice 0x10013340 0x00013340 125 (0x7d)
lmc1_WritePort 0x1000b900 0x0000b900 126 (0x7e)

And the following *.h file:

#ifndef MARKEZDDLL_H
#define MARKEZDDLL_H
//ËùÓк¯Êý¶¼·µ»ØÒ»¸öÕûÐÎöµ
#define LMC1_ERR_SUCCESS         0  //³É¹¦
#define LMC1_ERR_EZCADRUN       1  //·¢ÏöEZCADÔÚÔËÐÐ
#define LMC1_ERR_NOFINDCFGFILE   2  //ÕÒ²»µ½EZCAD.CFG
#define LMC1_ERR_FAILEDOPEN   3  //´Ò¿ªLMC1ʧ°Ü
#define LMC1_ERR_NODEVICE       4  //ûÓÐÓÐЧµÄlmc1É豸
#define LMC1_ERR_HARDVER         5  //lmc1°æ±¾´íÎÓ
#define LMC1_ERR_DEVCFG       6  //ÕÒ²»µ½É豸ÅÄöÃÎļþ
#define LMC1_ERR_STOPSIGNAL   7  //±¨¾¯ÐźÅ
#define LMC1_ERR_USERSTOP       8  //Óû§í£ö¹
#define LMC1_ERR_UNKNOW       9  //²»Ã÷´íÎÓ
#define LMC1_ERR_OUTTIME         10 //³¬Ê±
#define LMC1_ERR_NOINITIAL     11 //δ³Õʼ»¯
#define LMC1_ERR_READFILE       12 //¶ÁÎļþ´íÎÓ
#define LMC1_ERR_OWENWNDNULL     13 //´°¿ÚΪ¿Õ
#define LMC1_ERR_NOFINDFONT   14 //ÕÒ²»µ½ö¸¶¨Ãû³æµÄ×öÌÅ
#define LMC1_ERR_PENNO         15 //´íÎӵıʺÅ
#define LMC1_ERR_NOTTEXT         16 //ö¸¶¨Ãû³æµÄ¶ÔÏÓ²»ÊÇÎı¾¶ÔÏÓ
#define LMC1_ERR_SAVEFILE       17 //±£´æÎļþʧ°Ü
#define LMC1_ERR_NOFINDENT         18 //ÕÒ²»µ½ö¸¶¨¶ÔÏÓ
#define LMC1_ERR_STATUE     19 //µ±Ç°×´Ì¬Ï²»ÄÜö´Ðд˲ù×÷
//³Õʼ»¯lmc1¿Øö濨
//ÊÄè˲ÎÊý: strEzCadPath  EzCadèí¼þµÄö´Ðз¾¶
//        bTestMode = TRUE ±íʾ²ÂÊÔģʽ  bTestMode = FALSE ±íʾÕý³£Ä£Ê½
//        pOwenWnd    ±íʾ¸¸´°¿Ú¶ÔÏÓ£¬èǹûÐèҪʵÏöí£ö¹´Ò±Ê£¬ÔÒÏµí³»Á´Ó´Ë´°¿Ú½Øè¡ÏûÏ¢
typedef int (*LMC1_INITIAL)(TCHAR* strEzCadPath,//ezcadµÄ¹¤×÷Ŀ¼
       BOOL bTestMode,//ÊÇ·ñÊDzÂÊÔģʽ
       HWND hOwenWnd);//¸¸´°¿Ú
//¹Ø±Õlmc1¿Øö濨
typedef int (*LMC1_CLOSE)();
//ÔØèËezdÎļþ£¬²¢ÇųýÊý¾ý¿ÂËùÓжÔÏÓ
//ÊÄè˲ÎÊý: strFileName  EzCadÎļþÃû³æ
typedef int (*LMC1_LOADEZDFILE)(TCHAR* strFileName);
//±Ê¿Ìµ±Ç°Êý¾ý¿ÂÀϵÄËùÓÐÊý¾ý
//ÊÄè˲ÎÊý: bFlyMark = TRUE ʹÄܷɶ¯´Ò±Ê  bFlyMark = FALSE ʹÄܷɶ¯´Ò±Ê
typedef int (*LMC1_MARK)(BOOL bFlyMark);
//±Ê¿Ìµ±Ç°Êý¾ý¿ÂÀϵÄö¸¶¨¶ÔÏÓ
//ÊÄè˲ÎÊý: strEntName Òª¼Ó¹¤µÄö¸¶¨¶ÔÏÓµÄÃû³æ
typedef int (*LMC1_MARKENTITY)(TCHAR* strEntName);
//·É¶¯±Ê¿Ìµ±Ç°Êý¾ý¿ÂÀϵÄö¸¶¨¶ÔÏÓ
//ÊÄè˲ÎÊý: strEntName ·É¶¯´Ò±Êö¸¶¨¶ÔÏÓµÄÃû³æ
typedef int (*LMC1_MARKENTITYFLY)(TCHAR* strEntName);
// ¶Álmc1µÄÊÄè˶˿Ú
//ÊÄè˲ÎÊý: ¶Áè˵ÄÊÄè˶˿ڵÄÊý¾ý
typedef int (*LMC1_READPORT)(WORD& data);
// дlmc1µÄÊijö¶Ë¿Ú
//ÊÄè˲ÎÊý: Ҫдµ½µÄÊijö¶Ë¿ÚµÄÊý¾ý
typedef int (*LMC1_WRITEPORT)(WORD data);
//µÃµ½µ±Ç°Êý¾ý¿ÂÀϵÄËùÓÐÊý¾ýµÄÔ¤ÀÀí¼Ïñ
//ÊÄè˲ÎÊý: pWnd         Ô¤ÀÀí¼ÏñÏÔʾµ½Äĸö´°¿Ú
//        nBMPWIDTH    Ô¤ÀÀí¼ÏñµÄ¿í¶è
//        nBMPHEIGHT   Ô¤ÀÀí¼ÏñµÄ¸ß¶è
typedef  CBitmap* (*LMC1_GETPREVBITMAP)(HWND hwnd,int nBMPWIDTH,int nBMPHEIGHT);
//µÃµ½µ±Ç°Êý¾ý¿ÂÀϵÄö¸¶¨¶ÔÏÓÊý¾ýµÄÔ¤ÀÀí¼Ïñ
//ÊÄè˲ÎÊý: pWnd         Ô¤ÀÀí¼ÏñÏÔʾµ½Äĸö´°¿Ú
//        nBMPWIDTH    Ô¤ÀÀí¼ÏñµÄ¿í¶è
//        nBMPHEIGHT   Ô¤ÀÀí¼ÏñµÄ¸ß¶è
//        strEntName    ö¸¶¨¶ÔÏÓµÄÃû³æ
typedef  CBitmap* (*LMC1_GETPREVBITMAPBYNAME)(TCHAR* strEntName,HWND hwnd,int nBMPWIDTH,int nBMPHEIGHT);
//µ÷ÓÃÉèöÃÉ豸²ÎÊýµÄ¶Ô»°¿Ò
typedef int (*LMC1_SETDEVCFG)();
const int HATCHATTRIB_ALLCALC = 0x01;//諲¿¶ÔÏÓ×÷ΪÕûÌÅÒ»æмæËÃ
const int HATCHATTRIB_BIDIR   = 0x08;//Ë«ÏÒÌγÄ
const int HATCHATTRIB_EDGE    = 0x02;//×ßÒ»´Î±ß
const int HATCHATTRIB_LOOP    = 0x10;//»·ÐÎÌγÄ
//Éèöõ±Ç°µÄÌγIJÎÊý£¬èǹûÒªÏÒÊý¾ý¿ÂÀÏÌí¼ÓжÔÏÓʱʹÄÜÌγÄʱ£¬»ÁʹÓô˲ÎÊýÌγÄ
typedef int (*LMC1_SETHATCHPARAM)(BOOL   bEnableContour,//ʹÄÜÂöÀª±¾Éí
       int    bEnableHatch1,//ʹÄÜÌγÄ1
       int    nPenNo1,//ÌγıÊ
       int    nHatchAttrib1,//ÌγÄÊÔÐÔ
       double dHatchEdgeDist1,//ÌγÄÏ߱߾À
       double dHatchLineDist1,//ÌγÄÏ߼ľÀ
       double dHatchStartOffset1,//ÌγÄÏßæÐʼæ«Òæ¾ÀÀË
       double dHatchEndOffset1,//ÌγÄÏß½ÁÊØæ«Òæ¾ÀÀË
       double dHatchAngle1,//ÌγÄÏ߽Ƕè (»¡¶èöµ)
       int    bEnableHatch2,//ʹÄÜÌγÄ1
       int    nPenNo2,//ÌγıÊ
       int    nHatchAttrib2,//ÌγÄÊÔÐÔ
       double dHatchEdgeDist2,//ÌγÄÏ߱߾À
       double dHatchLineDist2,//ÌγÄÏ߼ľÀ
       double dHatchStartOffset2,//ÌγÄÏßæÐʼæ«Òæ¾ÀÀË
       double dHatchEndOffset2,//ÌγÄÏß½ÁÊØæ«Òæ¾ÀÀË
       double dHatchAngle2);//ÌγÄÏ߽Ƕè (»¡¶èöµ)
//Éèöõ±Ç°µÄ×öÌŲÎÊý£¬èǹûÒªÏÒÊý¾ý¿ÂÀÏÌí¼ÓÐÂÎı¾¶ÔÏÓʱ»ÁʹÓôË×öÌŲÎÊý
typedef int (*LMC1_SETFONTPARAM)(TCHAR* strFontName,//×öÌÅÃû³æ
      double dCharHeight,//×ö·û¸ß¶è
      double dCharWidth,//×ö·û¿í¶è
      double dCharAngle,//×ö·ûÇýÇ
      double dCharSpace,//×ö·û¼Ä¾À
      double dLineSpace,//ÐмľÀ
      BOOL   bEqualCharWidth);//µè×ö·û¿í¶èģʽ
//µÃµ½ö¸¶¨±ÊºÅ¶ÔÓ¦µÄ¼Ó¹¤²ÎÊý
typedef int (*LMC1_GETPENPARAM)(int   nPenNo,//ÒªÉèöõıʺÅ(0-255)   
      int&    nMarkLoop,//¼Ó¹¤´ÎÊý
      double&   dMarkSpeed,//±Ê¿Ì´ÎÊýmm/s
      double&   dPowerRatio,//¹¦ÂÊ°ù·ö±è(0-100%)
      double&   dCurrent,//µÇÁ÷A
      int&    nFreq,//æµÂÊHZ
      //int&      nQPulseWidth,//QÂö³Å¿í¶èus
      double&     dQPulseWidth,//QÂö³Å¿í¶èus
      int&    nStartTC,//¿ªÊ¼ñÓʱus
      int&    nLaserOffTC,//¼¤¹Â¹Ø±ÕñÓʱus
      int&    nEndTC,//½ÁÊØñÓʱus
      int&    nPolyTC,//¹Õ½ÇñÓʱus   //
      double&   dJumpSpeed, //ÌØתËù¶èmm/s
      int&    nJumpPosTC, //ÌØתλöÃñÓʱus
      int&    nJumpDistTC,//ÌØת¾ÀÀËñÓʱus
      double&   dEndComp,//Ä©µÃ²¹³¥mm
      double&   dAccDist,//¼ÓËù¾ÀÀËmm
      double&   dPointTime,//´ÒµÃñÓʱ ms      
      BOOL&  bPulsePointMode,//Âö³ÅµÃģʽ
      int&    nPulseNum,//Âö³ÅµÃÊýÄ¿
      double&   dFlySpeed);

typedef int (*LMC1_GETPENPARAM2)(int       nPenNo,//ÒªÉèöõıʺÅ(0-255)   
       int&   nMarkLoop,//¼Ó¹¤´ÎÊý
       double&   dMarkSpeed,//±Ê¿Ì´ÎÊýmm/s
       double&   dPowerRatio,//¹¦ÂÊ°ù·ö±è(0-100%)
       double&   dCurrent,//µÇÁ÷A
       int&   nFreq,//æµÂÊHZ
       double&    dQPulseWidth,//QÂö³Å¿í¶èus
       int&   nStartTC,//¿ªÊ¼ñÓʱus
       int&   nLaserOffTC,//¼¤¹Â¹Ø±ÕñÓʱus
       int&   nEndTC,//½ÁÊØñÓʱus
       int&   nPolyTC,//¹Õ½ÇñÓʱus   //
       double&   dJumpSpeed, //ÌØתËù¶èmm/s
       int&   nJumpPosTC, //ÌØתλöÃñÓʱus
       int&   nJumpDistTC,//ÌØת¾ÀÀËñÓʱus
       double&   dPointTime,//´ÒµÃñÓʱ ms 
       int& nSpiWave,
       BOOL&     bWobbleMode,
       double&   bWobbleDiameter,
       double&   bWobbleDist);
//ÉèöÃö¸¶¨±ÊºÅ¶ÔÓ¦µÄ¼Ó¹¤²ÎÊý
typedef int (*LMC1_SETPENPARAM)(int   nPenNo,//ÒªÉèöõıʺÅ(0-255)   
      int     nMarkLoop,//¼Ó¹¤´ÎÊý
      double   dMarkSpeed,//±Ê¿Ì´ÎÊýmm/s
      double   dPowerRatio,//¹¦ÂÊ°ù·ö±è(0-100%)
      double   dCurrent,//µÇÁ÷A
      int     nFreq,//æµÂÊHZ
      //int   nQPulseWidth,//QÂö³Å¿í¶èus
      double      dQPulseWidth,//QÂö³Å¿í¶èus
      int     nStartTC,//¿ªÊ¼ñÓʱus
      int     nLaserOffTC,//¼¤¹Â¹Ø±ÕñÓʱus
      int     nEndTC,//½ÁÊØñÓʱus
      int     nPolyTC,//¹Õ½ÇñÓʱus   //
      double   dJumpSpeed, //ÌØתËù¶èmm/s
      int     nJumpPosTC, //ÌØתλöÃñÓʱus
      int     nJumpDistTC,//ÌØת¾ÀÀËñÓʱus
      double   dEndComp,//Ä©µÃ²¹³¥mm
      double   dAccDist,//¼ÓËù¾ÀÀËmm
      double   dPointTime,//´ÒµÃñÓʱ ms   
      BOOL   bPulsePointMode,//Âö³ÅµÃģʽ
      int     nPulseNum,
      double   dFlySpeed);//Âö³ÅµÃÊýÄ¿

//ÉèöÃö¸¶¨±ÊºÅ¶ÔÓ¦µÄ¼Ó¹¤²ÎÊý
typedef int (*LMC1_SETPENPARAM2)(int      nPenNo,//ÒªÉèöõıʺÅ(0-255)   
       int    nMarkLoop,//¼Ó¹¤´ÎÊý
       double   dMarkSpeed,//±Ê¿Ì´ÎÊýmm/s
       double   dPowerRatio,//¹¦ÂÊ°ù·ö±è(0-100%)
       double   dCurrent,//µÇÁ÷A
       int    nFreq,//æµÂÊHZ
       double     dQPulseWidth,//QÂö³Å¿í¶èus
       int    nStartTC,//¿ªÊ¼ñÓʱus
       int    nLaserOffTC,//¼¤¹Â¹Ø±ÕñÓʱus
       int    nEndTC,//½ÁÊØñÓʱus
       int    nPolyTC,//¹Õ½ÇñÓʱus   //
       double   dJumpSpeed, //ÌØתËù¶èmm/s
       int    nJumpPosTC, //ÌØתλöÃñÓʱus
       int    nJumpDistTC,//ÌØת¾ÀÀËñÓʱus
       int nSpiWave,
       BOOL  bWobbleMode,
       double   bWobbleDiameter,
       double   bWobbleDist);
//Çųý¶ÔÏÓ¿ÂÀÏËùÓÐÊý¾ý
typedef int (*LMC1_CLEARENTLIB)(); 
//¶ÔæË·½Ê½Ê±Êý×ö´Ú±íµÄÒÂÒÅ
//   6 ---  5 --- 4
//   |          |
//   |          |
//   7   8    3
//   |          |
//   |          |
//   0 ---  1 --- 2
//¼ÓèËÐÂÎı¾µ½Êý¾ý¿ÂöÐ
typedef int (*LMC1_ADDTEXTTOLIB)(TCHAR* pStr,//ÒªÌí¼ÓµÄ×ö·û´®
          TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
       double dPosX,//×ö·û´®µÄ×ÓϽǻùµÃµÄx×رÊ
       double dPosY,//×ö·û´®µÄ×ÓϽǻùµÃµÄy×رÊ
       double dPosZ,//×ö·û´®¶ÔÏÓµÄz×رÊ
       int    nAlign,//¶ÔæË·½Ê½0£­8
       double dTextRotateAngle,//×ö·û´®èæ»ùµÃÐýתµÄ½Ç¶èöµ(»¡¶èöµ)
       int nPenNo,//¶ÔÏÓʹÓõļӹ¤²ÎÊý
       BOOL bHatchText);//ÊÇ·ñÌγÄÎı¾¶ÔÏÓ
//¼ÓèËö¸¶¨Îļþµ½Êý¾ý¿ÂöÐ
//ö§³öµÄÎļþÓÐezd,dxf,dst,plt,ai,bmp,jpg,tga,png,gif,tiffµè
typedef int  (*LMC1_ADDFILETOLIB)(TCHAR* pFileName, //ÎļþÃû³æ
           TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
       double dPosX, //Îļþ×ÓϽǻùµÃx×رÊ
       double dPosY, //Îļþ×ÓϽǻùµÃy×رÊ
       double dPosZ, //Îļþz×رÊ
       int    nAlign,//¶ÔæË·½Ê½0£­8
       double dRatio,//ÎļþËշűèÀý  
       int nPenNo,//¶ÔÏÓʹÓõļӹ¤²ÎÊý
       BOOL bHatchFile);//ÊÇ·ñÌγÄÎļþ¶ÔÏÓ èǹûÊÇezdÎļþ»Òλí¼Îļþ´Ë²ÎÊýÎþЧ

//¼ÓèËÇÚÏßµ½Êý¾ý¿ÂöÐ
typedef int (*LMC1_ADDCURVETOLIB)(double ptBuf[][2],//ÇÚÏ߶¥µÃÊý×É
        int  ptNum,//ÇÚÏ߶¥µÃÊý
        TCHAR* pEntName,//ÇÚÏ߶ÔÏÓÃû³æ
        int nPenNo,//ÇÚÏ߶ÔÏÓʹÓõıʺÅ
        int bHatch);//ÇÚÏßÊÇ·ñÌγÄ

#define BARCODETYPE_39    0
#define BARCODETYPE_93    1
#define BARCODETYPE_128A    2
#define BARCODETYPE_128B    3
#define BARCODETYPE_128C    4
#define BARCODETYPE_128OPT  5
#define BARCODETYPE_EAN128A 6
#define BARCODETYPE_EAN128B 7
#define BARCODETYPE_EAN128C 8
#define BARCODETYPE_EAN13   9
#define BARCODETYPE_EAN8    10
#define BARCODETYPE_UPCA    11
#define BARCODETYPE_UPCE    12
#define BARCODETYPE_25    13
#define BARCODETYPE_INTER25 14
#define BARCODETYPE_CODABAR 15
#define BARCODETYPE_PDF417  16
#define BARCODETYPE_DATAMTX 17
#define BARCODETYPE_USERDEF  18
#define BARCODEATTRIB_REVERSE         0x0008 //ÌÕÂË·´×ª
#define BARCODEATTRIB_HUMANREAD     0x1000 //ÏÔʾèËʶ±Ð×ö·û
#define BARCODEATTRIB_CHECKNUM       0x0004 //ÐèҪУñÉÂË
#define BARCODEATTRIB_PDF417_SHORTMODE 0x0040 //PDF417ΪËÕ¶Ìģʽ
#define BARCODEATTRIB_DATAMTX_DOTMODE  0x0080 //DataMtrixΪµÃģʽ
#define BARCODEATTRIB_CIRCLEMODE       0x0100 //×Ô¶¨ÒŶþάÂËΪԲģʽ

#define DATAMTX_SIZEMODE_SMALLEST  0
#define DATAMTX_SIZEMODE_10X10   1
#define DATAMTX_SIZEMODE_12X12   2
#define DATAMTX_SIZEMODE_14X14   3
#define DATAMTX_SIZEMODE_16X16   4
#define DATAMTX_SIZEMODE_18X18   5
#define DATAMTX_SIZEMODE_20X20   6
#define DATAMTX_SIZEMODE_22X22   7
#define DATAMTX_SIZEMODE_24X24   8
#define DATAMTX_SIZEMODE_26X26   9
#define DATAMTX_SIZEMODE_32X32   10
#define DATAMTX_SIZEMODE_36X36   11
#define DATAMTX_SIZEMODE_40X40   12
#define DATAMTX_SIZEMODE_44X44   13
#define DATAMTX_SIZEMODE_48X48   14
#define DATAMTX_SIZEMODE_52X52   15
#define DATAMTX_SIZEMODE_64X64   16
#define DATAMTX_SIZEMODE_72X72   17
#define DATAMTX_SIZEMODE_80X80   18
#define DATAMTX_SIZEMODE_88X88   19
#define DATAMTX_SIZEMODE_96X96   20
#define DATAMTX_SIZEMODE_104X104   21
#define DATAMTX_SIZEMODE_120X120   22
#define DATAMTX_SIZEMODE_132X132   23
#define DATAMTX_SIZEMODE_144X144   24
#define DATAMTX_SIZEMODE_8X18    25
#define DATAMTX_SIZEMODE_8X32    26
#define DATAMTX_SIZEMODE_12X26   27
#define DATAMTX_SIZEMODE_12X36   28
#define DATAMTX_SIZEMODE_16X36   29
#define DATAMTX_SIZEMODE_16X48   30
//¼ÓèËÌÕÂ˵½Êý¾ý¿ÂöÐ
typedef int  (*LMC1_ADDBARCODETOLIB)(TCHAR* pStr, //×ö·û´®
           TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
       double dPosX, //×ö·û×ÓϽǻùµÃx×رÊ
       double dPosY, //×ö·û×ÓϽǻùµÃy×رÊ
       double dPosZ, //×ö·ûz×رÊ
       int    nAlign,//¶ÔæË·½Ê½0£­8
       int    nPenNo,
       int    bHatchText,
       int    nBarcodeType,//ÌÕÂËÀÀÐí
       WORD   wBarCodeAttrib,//ÌÕÂËÊÔÐÔ
       double dHeight,//Õû¸öÌÕÂ˵ĸß
       double dNarrowWidth,//×ÎÕ­Ä£¿É¿í
       double dBarWidthScale[4],//ÌÕ¿í±èÀý (ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dSpaceWidthScale[4],//¿Õ¿í±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dMidCharSpaceScale,//×ö·û¼Ä¸Ô±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dQuietLeftScale,//ÌÕÂË×ӿհ׿í¶è±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dQuietMidScale,//ÌÕÂËöпհ׿í¶è±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dQuietRightScale,//ÌÕÂËÓҿհ׿í¶è±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dQuietTopScale,//ÌÕÂËÉϿհ׿í¶è±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)
       double dQuietBottomScale,//ÌÕÂËÏ¿հ׿í¶è±èÀý(ÓË×ÎÕ­Ä£¿É¿íÏÀ±è)      
       int    nRow,//¶þάÂËÐÐÊý
       int    nCol,//¶þάÂËÁÐÊý
       int    nCheckLevel,//pdf417´íÎÓ¾ÀÕý¼¶±Ð0-8
       int    nSizeMode,//DataMatrix³ß´Çģʽ0-30
       double dTextHeight,//èËʶ±Ð×ö·û×öÌŸ߶è
       double dTextWidth,//èËʶ±Ð×ö·û×öÌÅ¿í¶è
       double dTextOffsetX,//èËʶ±Ð×ö·ûX·½ÏÒæ«Òæ
       double dTextOffsetY,//èËʶ±Ð×ö·ûY·½ÏÒæ«Òæ
       double dTextSpace,//èËʶ±Ð×ö·û¼Ä¾À
       double dDiameter,
       TCHAR* pTextFontName);//Îı¾×öÌÅÃû³æ
//¸Ü¸Äµ±Ç°Êý¾ý¿ÂÀϵÄö¸¶¨Îı¾¶ÔÏÓµÄÎı¾
//ÊÄè˲ÎÊý: strTextName  Òª¸Ü¸ÄÄÚèýµÄÎı¾¶ÔÏÓµÄÃû³æ
//        strTextNew      еÄÎı¾ÄÚèý
typedef int (*LMC1_CHANGETEXTBYNAME)(TCHAR* strTextName, TCHAR* strTextNew);

//ÉèöÃÐýת±Ä»»²ÎÊý
//ÊÄè˲ÎÊý: dCenterX ÐýתöÐÐÄx×رÊ
//        dCenterY ÐýתöÐÐÄy×رÊ
//        dRotateAng Ðýת½Ç¶è(»¡¶èöµ)
typedef void (*LMC1_SETROTATEPARAM)(double dCenterX,double dCenterY,double dRotateAng);

//////////////////////////////////////////////////////////////////
//À©Õ¹öÁº¯Êý
//À©Õ¹öÁÒ涯µ½ö¸¶¨×رÊλöÃ
//ÊÄè˲ÎÊý: axis     À©Õ¹öÁ  0 = öÁ0  1 = öÁ1
//        GoalPos  ×رÊλöÃ
typedef int    (*LMC1_AXISMOVETO)(int axis,double GoalPos);
//À©Õ¹öÁУÕýÔ­µÃ
//ÊÄè˲ÎÊý: axis     À©Õ¹öÁ  0 = öÁ0  1 = öÁ1
typedef int    (*LMC1_AXISCORRECTORIGIN)(int axis);
//µÃµ½À©Õ¹öÁµÄµ±Ç°×رÊ
//ÊÄè˲ÎÊý: axisÀ©Õ¹öÁ  0 = öÁ0  1 = öÁ1
typedef double (*LMC1_GETAXISCOOR)(int axis);
//À©Õ¹öÁÒ涯µ½ö¸¶¨Âö³Å×رÊλöÃ
//ÊÄè˲ÎÊý: axis     À©Õ¹öÁ  0 = öÁ0  1 = öÁ1
//        nGoalPos  Âö³Å×رÊλöÃ
typedef int   (*LMC1_AXISMOVETOPULSE)(int axis,int nGoalPos);
//µÃµ½À©Õ¹öÁµÄµ±Ç°Âö³Å×رÊ
//ÊÄè˲ÎÊý: axisÀ©Õ¹öÁ  0 = öÁ0  1 = öÁ1
typedef int (*LMC1_GETAXISCOORPULSE)(int axis);

//¸´Î»À©Õ¹öÁ×رÊ
//ÊÄè˲ÎÊý:  bEnAxis0 = ʹÄÜöÁ0  bEnAxis1 = ʹÄÜöÁ1
typedef double (*LMC1_RESET)(BOOL bEnAxis0 , BOOL bEnAxis1);

//×öÌÅÀÀÐíÊÔÐÔ¶¨ÒÅ
#define FONTATB_JSF     0x0001      //JczSingle×öÐí
#define FONTATB_TTF     0x0002      //TrueType×öÐí  
#define FONTATB_DMF     0x0004      //DotMatrix×öÐí  
#define FONTATB_BCF     0x0008      //BarCode×öÐí 
//×öÐí¼Ç¼
struct lmc1_FontRecord
{  
    TCHAR   szFontName[256];     //×öÌÅÃû×ö 
    DWORD   dwFontAttrib;      //×öÌÅÊÔÐÔ
};
//µÃµ½µ±Ç°Ïµí³ö§³öµÄËùÓÐ×öÌŲÎÊý
//ÊÄè˲ÎÊý: Îþ
//Êijö²ÎÊý: nFontNum ×öÌÅÊýÄ¿
//·µ»Ø²ÎÊý: lmc1_FontRecord* ×öÌżÇ¼Êý×É
typedef lmc1_FontRecord* (*LMC1_GETALLFONTRECORD)(int& nFontNum);
//±£´æµ±Ç°Êý¾ý¿ÂÀÏËùÓжÔÏÓµ½ö¸¶¨ezdÎļþÀÏ
//ÊÄè˲ÎÊý: strFileName ezdÎļþÃû³æ
typedef int (*LMC1_SAVEENTLIBTOFILE)(TCHAR* strFileName);
//µÃµ½ö¸¶¨¶ÔÏÓµÄ×δÓ×ÎС×رÊ,èǹûpEntName==NULL±íʾ¶Áè¡Êý¾ý¿ÂËùÓжÔÏÓµÄ×δÓ×ÎС×رÊ
typedef int  (*LMC1_GETENTSIZE)(TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
          double& dMinx,
          double& dMiny,
          double& dMaxx,
          double& dMaxy,
                                                                         double& dZ);
//Ò涯ö¸¶¨¶ÔÏÓÏÀ¶Ô×رÊ
typedef int  (*LMC1_MOVEENT)(TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
        double dMovex,
        double dMovey);

//ËÕ·Åö¸¶¨¶ÔÏÓ£¬ËÕ·ÅöÐÐÄ×رÊ(dCenx£¬dCeny)  dScaleX=X·½ÏÒËշűèÀý  dScaleY=Y·½ÏÒËշűèÀý
typedef int  (*LMC1_SCALEENT)(TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
       double dCenx,
       double dCeny,
       double dScaleX,
       double dScaleY);
//¾µÏñö¸¶¨¶ÔÏÓ£¬¾µÏñöÐÐÄ×رÊ(dCenx£¬dCeny)  bMirrorX=TRUE X·½ÏÒ¾µÏñ  bMirrorY=TRUE Y·½ÏÒ¾µÏñ
typedef  int  (*LMC1_MIRRORENT)(TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
       double dCenx,
       double dCeny,
       BOOL   bMirrorX,
       BOOL   bMirrorY);
//Ðýתö¸¶¨¶ÔÏÓ£¬ÐýתöÐÐÄ×رÊ(dCenx£¬dCeny)  dAngle=Ðýת½Ç¶è(ÄæʱÕËΪÕý£¬µ¥Î»Îª¶è)
typedef  int  (*LMC1_ROTATEENT)(TCHAR* pEntName,//×ö·û´®¶ÔÏÓÃû³æ
       double dCenx,
       double dCeny,
       double dAngle);
typedef int  (*LMC1_REDLIGHTMARK)();//±Ê¿ÌÒ»´ÎºÌ¹ÂÏÔʾ¿Ò
//µÃµ½¶ÔÏÓ×ÜÊý
//Êijö²ÎÊý:  ¶ÔÏÓ×ÜÊý
typedef  int (*LMC1_GETENTITYCOUNT)();
//µÃµ½ö¸¶¨ÐҺŵĶÔÏÓÃû³æ
//ÊÄè˲ÎÊý: nEntityIndex ö¸¶¨¶ÔÏÓµÄÐÒºÅ(Χ: 0 £­ (lmc1_GetEntityCount()-1))
//Êijö²ÎÊý: szEntName ¶ÔÏÓµÄÃû³æ
typedef int (*LMC1_GETENTITYNAME)(int nEntityIndex,TCHAR  szEntName[256]);
//µÃµ½¹·µÄ¿í»§IDºÅ
typedef WORD (*LMC1_GETCLIENTID)();
//µÃµ½ö¸¶¨¶ÔÏÓµÄÎı¾
typedef int (*LMC1_GETTEXTBYNAME)(TCHAR* strTextName, TCHAR strText[256]);

//ɾ³ýö¸¶¨¶ÔÏÓ
typedef int  (*LMC1_DELETEENT)(TCHAR* pEntName);
//¿½±´ö¸¶¨¶ÔÏÓΪжÔÏÓ
typedef int (*LMC1_COPYENT)(TCHAR* strEntName,TCHAR* strNewEntName);
//¸Ä±Äö¸¶¨¶ÔÏÓµÄÃû×öΪstrNewName
typedef int (*LMC1_CHANGEENTNAME)(TCHAR* strEntName,TCHAR* strNewName);
//ö±½Ó¿ª¹Ø¼¤¹Â
typedef int (*LMC1_LASERON)(BOOL bOpen);
//µÃµ½µ±Ç°Õñ¾µ×رÊ
typedef int (*LMC1_GETCURCOOR)(double& x,double& y);
//µÃµ½Õñ¾µö±½ÓÌØתµ½ö¸¶¨×رÊ
typedef int (*LMC1_GOTOPOS)(double x,double y);
//ÉèöÃPWMÊijöµÄÂö³ÅöÜæÚºíÂö³Å¿í¶è
//wPulseHalfPeriod = Âö³ÅöÜæÚµÄÒ»°Ë £¬µ¥Î»US
//wPulseWidth = Âö³ÅµÄ¸ßµÇ潿í¶è £¬µ¥Î»US
typedef int (*LMC1_SETPWM)(WORD wPulseHalfPeriod,WORD wPulseWidth);
//ÉèöÃIPG¼¤¹Âæ÷µÄÊijö¹¦ÂÊ0-100%
typedef int (*LMC1_SETIPGPOWER)(double dRatio);

//ÔÚö¸¶¨Î»öñʿÌÒ»ÌÕÏß
typedef int (*LMC1_MARKLINE)(double x1,double y1,double x2,double y2,int pen);
typedef int (*LMC1_MARKLINE2)(double x1,double y1,double x2,double y2,double dSpeed,double dPowerRatio,int nFreq);
//ÔÚö¸¶¨Î»öñʿÌÒ»¸öµÃ
typedef int (*LMC1_MARKPOINT)(double x,double y,double delay,int pen);
#endif

Does anyone have the knownledge to get me started?

Thank you very much!

Share this post


Link to post
Share on other sites



Here i attached the *.h file, it seems it didnt accept the characters in my first post.

Does anyone have the knownledge to get me started?

Thank you very much!

dllFile.h

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0