Open Source Laser Marking Software EZCAD2 SDK

EZCAD2 Software Library

Item No.: EZCAD2 SDK
Description
Explain for SDK
1. Summarize ............................................................................................................ 1
2. Description............................................................................................................ 2
3. Device................................................................................................................... 2
4. Mark...................................................................................................................... 4
5. File........................................................................................................................ 7
6. Port ..................................................................................................................... 14
7. Text ..................................................................................................................... 15
8. Pen ...................................................................................................................... 19
9. Hatch................................................................................................................... 25
10. External axis...................................................................................................... 39
11. DEVELOPMENT STEPS.................................................................................. 41
12. Appendix: Set project to Unicode type in VC++ ................................................ 43
1. Summarize
MarkEzd.dll file is Dynamic Link Library provided by Beijing JCZ Technology CO.
LTD for developing software based on ezcad2 and lmc board
MarkEzdDll.h is header file of the exports function in MarkEzd.dll
We can develop the software using VC6.0.
The calling way of MarkEzd.dll is explicitly link. Developer needs to load and free
MarkEzd.dll by calling Windows API function.
The steps are as follows.
1. Call Windows’API function LoadLibrary() to load DLL dynamically;
2. Call Windows’API function GetProcAddrress() to get the pointer of the functions
in the DLL and use the function pointer to finish the work;
3. Call Windows’API function FreeLibrary() to release library when you do not use
DLL or the program ends.
Note: the program that calls MarkEzd.dll must be located at the same folder
with ezcad2.exe. Or else the program would not work. And ezcad2.exe and
markEzd.dll cannot work as usually at the same time, so you must close
ezcad2.exe when MarkEzd.dll is used.
2. Description
Return value of most functions in MarkEzd.dll is a common error code of integer type.
Its definitions are as follow:
#define LMC1_ERR_SUCCESS
#define LMC1_ERR_EZCADRUN
0
1
// Success
// Find EZCAD running
#define LMC1_ERR_NOFINDCFGFILE 2 // Can not find EZCAD.CFG
#define LMC1_ERR_FAILEDOPEN
#define LMC1_ERR_NODEVICE
#define LMC1_ERR_HARDVER
#define LMC1_ERR_DEVCFG
#define LMC1_ERR_STOPSIGNAL
#define LMC1_ERR_USERSTOP
#define LMC1_ERR_UNKNOW
#define LMC1_ERR_OUTTIME
#define LMC1_ERR_NOINITIAL
#define LMC1_ERR_READFILE
3
4
5
6
7
8
9
10
11
12
// Open LMC1 board failed
// Can not find valid lmc1 device
// Lmc1’s version is error.
// Can not find configuration files
// Alarm signal
// User stops
// Unknown error
// Overtime
// Un-initialized
// Read file error
#define LMC1_ERR_OWENWNDNULL 13 // Window handle is NULL
#define LMC1_ERR_NOFINDFONT
#define LMC1_ERR_PENNO
#define LMC1_ERR_NOTTEXT
#define LMC1_ERR_SAVEFILE
#define LMC1_ERR_NOFINDENT
#define LMC1_ERR_STATUE
current state
14
15
16
17
18
19
// Can not find designated font
// Wrong pen number
// Object is not text
// Save file failed
// Can not find designated object
// Can not run the operation in
Note: The entire TCHAR object in MarkEzd.dll must be UNICODE.