文章作者:asm
信息来源:邪恶八进制
最近整理硬盘,把我心爱的200G日本A片del的同时,翻出这个玩意来,估计是好久以前就写了的,编程环境:masm32+视频捕捉截图+acc数据库操作。给masm32刚入门的朋友玩玩,不会的大家可以下载吧,欢迎大家拍砖。转载请保留权利 by asm
http://www.asm32.cn/
;******************************************************************
转载请保留权利 by asm
http://www.asm32.cn/
;******************************************************************
.386
.model flat, stdcall
option casemap :none
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include 文件定义
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
include advapi32.inc
includelib advapi32.lib
include vfw32.inc
includelib vfw32.lib
include Comctl32.inc
includelib Comctl32.lib
include shell32.inc
includelib shell32.lib
include odbc32.inc
includelib odbc32.lib
include Shlwapi.inc
includelib Shlwapi.lib
include wininet.inc
includelib wininet.lib
include gdi32.inc
includelib gdi32.lib
includelib mylib.lib
include macros.inc
include Objects.inc
include CFButton.asm
include wsock32.inc
includelib wsock32.lib
ConntDriver proto c :DWORD ,:DWORD ,:DWORD
EnumCapDrv proto c :DWORD
Disconnect proto c :DWORD
GetCapFileToSave proto c :DWORD ,:DWORD
_CenterWindow proto :DWORD
atoi_asm proto c :DWORD ,:DWORD ,:DWORD ,:DWORD
SaveAviFile proto c :DWORD ,:DWORD
;UninstallHook PROTO
;InstallHook PROTO
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Equ 等值定义
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ICO_MAIN equ 1000h ;图标
DLG_MAIN equ 1
IDC_OK equ 1001
IDC_Time equ 1002
IDD_DIALOG1 equ 1003
IDC_DriverList equ 1004
IDC_Chenck equ 1005
IDR_MENU equ 1006
IDM_ZuiXiao equ 1007
IDM_EXIT equ 1008
IDM_ShangWu equ 1009
IDM_XiaWu equ 1010
IDM_ShuoMing equ 1011
IDM_ZhuYi equ 1012
IDM_About equ 1013
IDM_Bbs equ 1014
IDM_Chenk equ 1015
IDC_LocalTime equ 1016
;IDD_DIALOG2 equ 1017
;IDC_Name equ 1018
;IDC_Bumen equ 1019
;IDC_add equ 1020
;IDC_Seccuse equ 1021
IDD_DIALOG3 equ 1026
IDC_LIST1 equ 1027
IDC_Excel equ 1028
IDC_Del equ 1029
IDC_Look equ 1030
IDC_NameToLook equ 1031
IDC_LIST2 equ 1032
IDM_SHIP equ 1033
IDC_DATETIMEPICKER1 equ 1034
IDC_COMBOBOXEX2 equ 1035
IDC_COMBOBOXEX1 equ 1036
IDC_GetExcel equ 1037
IDC_OutExcel equ 1038
;IDB_1 equ 1039
;IDC_Recv equ 1040
;IDC_BUTTONBuMen equ 1041
;IDC_EDIT3 equ 1042
IDD_DIALOG4 equ 1043
IDC_LookList equ 1044
IDM_YueJie equ 1045
IDC_COMBOBOXEX3 equ 1046
IDC_TongJi equ 1047
IDC_EDIT3 equ 1048
IDC_BUTTONBuMen equ 1049
IDC_Name equ 1050
IDC_Bumen equ 1051
IDC_add equ 1052
IDC_Shangban equ 1053
IDC_Xiaban equ 1054
IDC_YouPass equ 1055
IDC_SetPass equ 1056
IDC_OldPass equ 1057
IDC_NewPass equ 1058
IDC_OkNewPass equ 1059
IDC_IWillSetPass equ 1060
IDC_SetNewPassOK equ 1061
IDC_Seccuse equ 1062
IDD_DIALOG2 equ 1063
IDC_OkToSave equ 1064
IDD_DIALOG5 equ 1065
IDC_EndterPass equ 1066
IDC_Lookit equ 1067
IDC_1 equ 1068
IDC_2 equ 1069
IDI_1 equ 1068
IDI_2 equ 1069
IDC_3 equ 1070
IDI_3 equ 1070
IDB_1 equ 1071
IDB_2 equ 1072
IDB_3 equ 1073
IDB_4 equ 1074
IDB_5 equ 1075
IDC_Recv1 equ 1076
IDC_Recv2 equ 1077
IDC_Recv3 equ 1078
IDC_Recv4 equ 1079
IDC_Recv5 equ 1080
IDC_DelYuangong equ 1081
IDM_Open equ 1082
IDD_DIALOG6 equ 1083
IDC_StartVideo1 equ 1084
IDC_StopVideo1 equ 1085
IDC_StopVideo2 equ 1086
IDC_StartVideo2 equ 1087
IDC_StopVideo3 equ 1088
IDC_StartVideo3 equ 1089
IDC_StopVideo4 equ 1090
IDC_StartVideo4 equ 1091
IDC_YueFen equ 1092
IDC_BUTTONDel equ 1093
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WM_TASKBAR equ WM_USER+100 ;自定义系统托盘消息
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 数据段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.data?
hInstance dd ?
hwndSelCapDrvDlg_LBox dd ?
hwndVideo dd ?
szRiQi db 50 dup(?)
szFileDirectory db 256 dup(?)
szDirectory db 150 dup(?)
szTime db 150 dup(?)
szSaveFile db 1024 dup(?)
szSaveFile1 db 1024 dup(?)
szTime1 db 150 dup(?)
szFileDirectory1 db 256 dup(?)
szFileDirectory2 db 256 dup(?)
szFileDirectory3 db 256 dup(?)
szFileDirectory4 db 256 dup(?)
szFileDirectory5 db 256 dup(?)
szFileDirectory6 db 256 dup(?)
szTime2 db 150 dup(?)
ShangShang db 150 dup(?)
ShangXia db 150 dup(?)
XiaShang db 150 dup(?)
XiaXia db 150 dup(?)
szTheTime db 150 dup(?)
szBuMen db 50 dup(?)
szName db 50 dup(?)
szTest1 db 150 dup(?)
hList dd ?
hFindFile dd ?
hCount dd ?
szListFile db 150 dup(?)
y dd ?
x dd ?
a dd ?
hWndFileList dd ?
hEnv dd ? ; environment handle
hConn dd ? ; connection handle
hStmt dd ?
Conn db 256 dup(?)
StrLen dd ?
TheName db 26 dup(?)
TheSurname db 26 dup(?)
NameLength dd ?
SurnameLength dd ?
SearchName db 26 dup(?)
ProgPath db 256 dup(?)
ConnectString db 1024 dup(?)
hWndList dd ?
szTheTime1 db 256 dup(?)
hList1 dd ?
Name1 db 256 dup(?)
Name2 db 256 dup(?)
Name3 db 256 dup(?)
Name4 db 256 dup(?)
Name1Length dd ?
Name2Length dd ?
Name3Length dd ?
Name4Length dd ?
Name5 db 256 dup(?)
Name5Length dd ?
Name6 db 256 dup(?)
Name6Length dd ?
Dakaleibie db 256 dup(?)
DakaleibieLength dd ?
szBuffer db 256 dup(?)
szBuMenBuff db 20 dup(?)
ThreadId DWORD ?
namedel db 256 dup(?)
hList2 dd ?
hLookList dd ?
hCountList dd ?
szTheTime2 db 10 dup(?)
szLeiXing db 10 dup(?)
hFindSize dd ?
szMyName db 50 dup(?)
RiQi db 50 dup(?)
RiQiLength dd ?
LeiBie db 50 dup(?)
LeiBieLength dd ?
@hFile dd ?
hFindFile1 dd ?
RowFile dd ?
dwListviewiTem11 dd ?
@RowFile dd ?
hLookTongJi dd ?
dwListviewiTem12 dd ?
x1 dd ? ;上班
y1 dd ?
z1 dd ? ;外出
q1 dd ? ;请假
a1 dd ? ;迟到
j1 dd ? ;加班
h1 dd ? ;会议
c1 dd ? ;出差
u1 dd ? ;休假
i1 dd ? ;请假
n1 dd ? ;婚假
g1 dd ? ;病假
m1 dd ? ;产假
hInt db 20 dup(?)
Pass db 20 dup(?)
szPass db 50 dup(?)
OldPass db 20 dup(?)
szGetPassFormKey db 50 dup(?)
@szGetPassFormKey db 50 dup(?)
szNewPass db 20 dup(?)
szChenkNewPass db 20 dup(?)
szOKPass db 50 dup(?)
szShangban db 256 dup(?)
szXiaban db 256 dup(?)
ChiDao db 50 dup(?)
hInt1 dd ?
hClose dd ?
hEn dd ?
@szGuangBo db 100 dup(?)
@BBut dd ?
@BBut1 dd ?
@BBut2 dd ?
ThreadId1 DWORD ?
szIP db 50 dup(?)
hCap dd ?
ThreadId2 DWORD ?
hwndVideo1 dd ?
hwndVideo2 dd ?
hwndVideo3 dd ?
hwndVideo4 dd ?
hVideo dd ?
szMounth db 10 dup(?)
hYuefen dd ?
hFindSize1 dd ?
.data
SQLStatement db "select * from main",0
SQLStatement1 db "select * from bumen",0
WhereStatement db " where name=?",0
strConnect db "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=",0
ConnectCaption db "Complete Connection String",0
AllocEnvFail db "环境配置失败,请结束一切和数据库相关的操作再运行本程序!",0
AllocConnFail db "连接配置失败,请结束一切和数据库相关的操作再运行本程序!",0
SetAttrFail db "不能设定数据库连接版本",0
NoData db "要查找的客户姓名不能为空!",0
ExecuteFail db "执行语句失败!",0
ConnFail db "数据库连接失败,找不到数据库!",0
AllocStmtFail db "执行环境配置失败,请结束一切和数据库相关的操作再运行本程序!",0
szSql db "insert into main(部门,姓名) values ('%s','%s')",0
szSqlDate db "insert into main(部门,姓名,时间,日期,打卡类别) values ('%s','%s','%s','%s','%s')",0
szSqlBuMen db "insert into bumen(name) values ('%s')",0
szSqlBuMenDel db "delete from bumen where name='%s'",0
szTest2 db "950",0
szTest3 db "1222",0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 代码段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
include _ListView.asm
include Funtion.asm
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_SaveAvi proc _file
invoke SaveAviFile,hwndVideo,_file
_SaveAvi endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgLookList proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local szCount[10]:byte
local szChenk[20]:byte
local File[256]:byte
local szOnLine[256]:byte
local szOnLine1[256]:byte
local szFindDate:WIN32_FIND_DATA
local szMonth[20]:byte
mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_INITDIALOG
invoke EndDialog,hClose,0
invoke _GetMonthTime,addr szMonth
invoke SetWindowText,hWnd,addr szMonth
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke GetDlgItem,hWnd,IDC_LookList
mov hLookList,eax
invoke GetDlgItem,hWnd,IDC_TongJi
mov hLookTongJi,eax
invoke GetDlgItem,hWnd,IDC_YueFen
mov hYuefen,eax
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke _ListViewAddColumn1,hLookList,0,85,CTXT("姓名")
invoke _ListViewAddColumn1,hYuefen,0,385,CTXT("月份")
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke _ListViewAddColumn1,hLookTongJi,0,125,CTXT("姓名")
invoke _ListViewAddColumn1,hLookTongJi,1,65,CTXT("出勤(次)")
invoke _ListViewAddColumn1,hLookTongJi,2,65,CTXT("加班(次)")
invoke _ListViewAddColumn1,hLookTongJi,3,65,CTXT("外出(次)")
invoke _ListViewAddColumn1,hLookTongJi,4,65,CTXT("请假(次)")
invoke _ListViewAddColumn1,hLookTongJi,5,65,CTXT("迟到(次)")
invoke _ListViewAddColumn1,hLookTongJi,6,65,CTXT("会议(次)")
invoke _ListViewAddColumn1,hLookTongJi,7,65,CTXT("出差(次)")
invoke _ListViewAddColumn1,hLookTongJi,8,65,CTXT("休假(次)")
invoke _ListViewAddColumn1,hLookTongJi,9,65,CTXT("请假(次)")
invoke _ListViewAddColumn1,hLookTongJi,10,65,CTXT("婚假(次)")
invoke _ListViewAddColumn1,hLookTongJi,11,65,CTXT("病假(次)")
invoke _ListViewAddColumn1,hLookTongJi,12,65,CTXT("产假(次)")
mov hCountList,0
.while TRUE
inc hCountList
invoke RtlZeroMemory,addr szCount,sizeof szCount
invoke wsprintf,addr szCount,CTXT("%d"),hCountList
invoke _ListViewAddColumn1,hLookList,hCountList,30,addr szCount
.break .if hCountList==31
.endw
invoke RtlZeroMemory,addr szChenk,20
invoke RtlZeroMemory,addr File,256
invoke RtlZeroMemory,addr szOnLine,256
invoke RtlZeroMemory,addr szOnLine1,256
invoke GetCurrentDirectory,200,addr File
invoke lstrcat,addr szOnLine,addr File
invoke lstrcat,addr szOnLine,CTXT("\NameDate\")
invoke lstrlen,addr szOnLine
mov hFindSize1,eax ;计算根目录的长度
invoke YueFen,addr szOnLine
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDC_Look
;
.endif
.elseif eax == WM_NOTIFY
mov eax,wParam
.if eax == IDC_LookList
push edi
mov edi, lParam
.if [edi.NMHDR].code == NM_DBLCLK
;invoke _ListViewSelect,hLookList,1,addr szListFile,sizeof szListFile
;invoke ShellExecute,0,0,addr szListFile,0,0,SW_SHOW
.endif
.elseif eax == IDC_YueFen
push edi
mov edi, lParam
.if [edi.NMHDR].code == NM_DBLCLK
invoke SendMessage,hLookList,LVM_DELETEALLITEMS,0,0
invoke SendMessage,hLookTongJi,LVM_DELETEALLITEMS,0,0
invoke RtlZeroMemory,addr szListFile,sizeof szListFile
invoke _ListViewSelect,hYuefen,0,addr szListFile,sizeof szListFile
invoke RtlZeroMemory,addr szChenk,20
invoke RtlZeroMemory,addr File,256
invoke RtlZeroMemory,addr szOnLine,256
invoke RtlZeroMemory,addr szOnLine1,256
invoke GetCurrentDirectory,200,addr File
invoke lstrcat,addr szOnLine,addr File
invoke lstrcat,addr szOnLine,CTXT("\NameDate\")
invoke lstrcat,addr szOnLine,addr szListFile
invoke lstrcat,addr szOnLine,CTXT("\")
invoke lstrlen,addr szOnLine
mov hFindSize,eax ;计算根目录的长度
invoke TongJi,addr szOnLine
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.endif
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgLookList endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgLook proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local szChenk[20]:byte
local File[256]:byte
local szOnLine[256]:byte
local szOnLine1[256]:byte
local szFindDate:WIN32_FIND_DATA
mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_INITDIALOG
invoke EndDialog,hClose,0
push hWnd
pop hWndFileList
mov y,1
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke GetDlgItem,hWnd,IDC_LIST1
mov hList,eax
invoke GetDlgItem,hWnd,IDC_LIST2
mov hList1,eax
invoke _ListViewAddColumn1,hList,0,190,CTXT("考勤记录")
invoke _ListViewAddColumn1,hList,1,230,CTXT("文件路径")
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke _ListViewAddColumn1,hList1,0,80,CTXT("部门")
invoke _ListViewAddColumn1,hList1,1,100,CTXT("姓名")
invoke _ListViewAddColumn1,hList1,2,150,CTXT("上班时间")
invoke _ListViewAddColumn1,hList1,3,60,CTXT("日期")
invoke _ListViewAddColumn1,hList1,4,100,CTXT("打卡类别")
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke ODBCConnect,hWnd,CTXT("Date.mdb")
invoke RunQuery,hWnd
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDC_Look
invoke SendMessage,hList,LVM_DELETEALLITEMS,0,0
invoke SendMessage,hList1,LVM_DELETEALLITEMS,0,0
invoke RtlZeroMemory,addr szMounth,10
invoke _GetMonthTime1,addr szMounth
invoke RtlZeroMemory,addr szChenk,20
invoke RtlZeroMemory,addr File,256
invoke RtlZeroMemory,addr szOnLine,256
invoke RtlZeroMemory,addr szOnLine1,256
invoke GetCurrentDirectory,200,addr File
invoke lstrcat,addr szOnLine,addr File
invoke lstrcat,addr szOnLine,CTXT("\NameDate\")
invoke lstrcat,addr szOnLine,addr szMounth
invoke lstrcat,addr szOnLine,CTXT("\")
invoke GetDlgItemText,hWnd,IDC_NameToLook,addr szChenk,20
invoke lstrcat,addr szOnLine,addr szChenk ;要查看的路径,不包括文件名
invoke lstrcat,addr szOnLine1,addr szOnLine
invoke FindFileToList,addr szOnLine
invoke lstrcat,addr szOnLine1,CTXT("\YourDate.mdb")
invoke FindFirstFile,addr szOnLine1,addr szFindDate
.if eax==-1
invoke MessageBox,0,CTXT("这位同事没有打过卡,数据库不存在"),0,MB_ICONSTOP
ret
.endif
invoke ODBCConnect,hWnd,addr szOnLine1
invoke RunQuery1,hWnd
.elseif ax == IDC_Excel
invoke ShellExecute,0,0,CTXT("导为Excel格式说明.doc"),0,0,SW_SHOW
.elseif ax == IDC_Del
invoke MessageBox,0,CTXT("真的要清空所有考勤记录吗?"),CTXT("程序提示"),MB_YESNO or MB_ICONINFORMATION
.if eax==IDYES
invoke RtlZeroMemory,addr File,256
invoke RtlZeroMemory,addr szOnLine,256
invoke RtlZeroMemory,addr szOnLine1,256
invoke GetCurrentDirectory,200,addr File
invoke lstrcat,addr szOnLine,addr File
invoke lstrcat,addr szOnLine,CTXT("\NameDate\")
invoke FindFileToDel,addr szOnLine
invoke FindDirectoryToDel,addr szOnLine
invoke MessageBox,0,CTXT("所有考勤记录已经清除!"),CTXT("程序提示"),MB_ICONINFORMATION
.endif
.elseif ax == IDC_GetExcel
invoke ShellExecute,0,0,addr szOnLine1,0,0,SW_SHOW
.elseif ax == IDC_OutExcel
invoke EndDialog,hWnd,0
.endif
.elseif eax == WM_NOTIFY
mov eax,wParam
.if eax == IDC_LIST1
push edi
mov edi, lParam
.if [edi.NMHDR].code == NM_DBLCLK
invoke _ListViewSelect,hList,1,addr szListFile,sizeof szListFile
invoke ShellExecute,0,0,addr szListFile,0,0,SW_SHOW
.endif
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgLook endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgChenck proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local szFile[256]:byte
local szFile1[256]:byte
local szFile2[256]:byte
mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,0
.elseif eax == WM_INITDIALOG
invoke EndDialog,hClose,0
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke GetDlgItem,hWnd,IDC_DriverList
mov hwndSelCapDrvDlg_LBox,eax
invoke EnumCapDrv,hwndSelCapDrvDlg_LBox
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDC_Chenck
comment *
invoke RtlZeroMemory,addr szFile,sizeof szFile
invoke RtlZeroMemory,addr szFile1,sizeof szFile1
invoke RtlZeroMemory,addr szFile2,sizeof szFile2
invoke GetCurrentDirectory,200,addr szFile1
invoke lstrcat,addr szFile2,addr szFile1
invoke lstrcat,addr szFile2,CTXT("\NameDate\")
invoke _GetSystemTime,addr szFile
invoke lstrcat,addr szFile2,addr szFile
invoke CreateDirectory,addr szFile2,0
invoke lstrcat,addr szFile2,CTXT("\video.avi")
mov hCap,1
*
.if hVideo==1
invoke ConntDriver,hwndSelCapDrvDlg_LBox,hwndVideo1,hWnd
.endif
.if hVideo==2
invoke ConntDriver,hwndSelCapDrvDlg_LBox,hwndVideo2,hWnd
.endif
.if hVideo==3
invoke ConntDriver,hwndSelCapDrvDlg_LBox,hwndVideo3,hWnd
.endif
.if hVideo==4
invoke ConntDriver,hwndSelCapDrvDlg_LBox,hwndVideo4,hWnd
.endif
invoke ConntDriver,hwndSelCapDrvDlg_LBox,hwndVideo,hWnd
.elseif ax == IDC_DriverList
shr eax,16
.if ax == LBN_DBLCLK
invoke ConntDriver,hwndSelCapDrvDlg_LBox,hwndVideo,hWnd
.endif
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgChenck endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgVideo proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local szFile[256]:byte
local szFile1[256]:byte
local szFile2[256]:byte
mov eax,wMsg
.if eax == WM_CLOSE
invoke Disconnect,hwndVideo1
invoke Disconnect,hwndVideo2
invoke Disconnect,hwndVideo3
invoke Disconnect,hwndVideo4
invoke EndDialog,hWnd,0
.elseif eax == WM_INITDIALOG
invoke EndDialog,hClose,0
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke capCreateCaptureWindow,CTXT("My Next1 Capture Window"),WS_CHILD or WS_VISIBLE,3,6,264,223,hWnd,1
mov hwndVideo1,eax
invoke capCreateCaptureWindow,CTXT("My Next2 Capture Window"),WS_CHILD or WS_VISIBLE,270,6,264,223,hWnd,1
mov hwndVideo2,eax
invoke capCreateCaptureWindow,CTXT("My Next3 Capture Window"),WS_CHILD or WS_VISIBLE,3,300,264,223,hWnd,1
mov hwndVideo3,eax
invoke capCreateCaptureWindow,CTXT("My Next4 Capture Window"),WS_CHILD or WS_VISIBLE,270,300,264,223,hWnd,1
mov hwndVideo4,eax
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDC_StartVideo1
mov hVideo,1
invoke Disconnect,hwndVideo
invoke DialogBoxParam,hInstance,IDD_DIALOG1,hWnd,offset _ProcDlgChenck,NULL
.elseif ax == IDC_StopVideo1
invoke Disconnect,hwndVideo1
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.elseif ax == IDC_StartVideo2
mov hVideo,2
invoke Disconnect,hwndVideo
invoke DialogBoxParam,hInstance,IDD_DIALOG1,hWnd,offset _ProcDlgChenck,NULL
.elseif ax == IDC_StopVideo2
invoke Disconnect,hwndVideo2
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.elseif ax == IDC_StartVideo3
mov hVideo,3
invoke Disconnect,hwndVideo
invoke DialogBoxParam,hInstance,IDD_DIALOG1,hWnd,offset _ProcDlgChenck,NULL
.elseif ax == IDC_StopVideo3
invoke Disconnect,hwndVideo3
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.elseif ax == IDC_StartVideo4
mov hVideo,4
invoke Disconnect,hwndVideo
invoke DialogBoxParam,hInstance,IDD_DIALOG1,hWnd,offset _ProcDlgChenck,NULL
.elseif ax == IDC_StopVideo4
invoke Disconnect,hwndVideo4
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgVideo endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgPass proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local File[256]:byte
local szOnLine[256]:byte
local szOnLine1[256]:byte
local szFindDate:WIN32_FIND_DATA
local szMonth[20]:byte
mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_INITDIALOG
push hWnd
pop hClose
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
.if hEn==2
invoke SetDlgItemText,hWnd,IDC_Lookit,CTXT("选择")
.endif
.if hEn==0
invoke SetDlgItemText,hWnd,IDC_Lookit,CTXT("统计")
.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDC_Lookit
.if hEn==1
invoke GetDlgItemText,hWnd,IDC_EndterPass,addr File,256
invoke _EnumKeyToBuff,CTXT("pass"),addr szOnLine
lea eax,szOnLine
add eax,34
invoke wsprintf,addr szOnLine1,CTXT("%s"),eax
invoke lstrcmp,addr File,addr szOnLine1
.if eax==NULL
invoke DialogBoxParam,hInstance,IDD_DIALOG3,NULL,offset _ProcDlgLook,NULL
.elseif
invoke MessageBox,0,CTXT("密码错误"),0,MB_ICONSTOP
.endif
.endif
.if hEn==0
invoke GetDlgItemText,hWnd,IDC_EndterPass,addr File,256
invoke _EnumKeyToBuff,CTXT("pass"),addr szOnLine
lea eax,szOnLine
add eax,34
invoke wsprintf,addr szOnLine1,CTXT("%s"),eax
invoke lstrcmp,addr File,addr szOnLine1
.if eax==NULL
invoke DialogBoxParam,hInstance,IDD_DIALOG4,NULL,offset _ProcDlgLookList,NULL
.elseif
invoke MessageBox,0,CTXT("密码错误"),0,MB_ICONSTOP
.endif
.endif
.if hEn==2
invoke GetDlgItemText,hWnd,IDC_EndterPass,addr File,256
invoke _EnumKeyToBuff,CTXT("pass"),addr szOnLine
lea eax,szOnLine
add eax,34
invoke wsprintf,addr szOnLine1,CTXT("%s"),eax
invoke lstrcmp,addr File,addr szOnLine1
.if eax==NULL
invoke DialogBoxParam,hInstance,IDD_DIALOG1,NULL,offset _ProcDlgChenck,NULL
.elseif
invoke MessageBox,0,CTXT("密码错误"),0,MB_ICONSTOP
.endif
.endif
.if hEn==3
invoke GetDlgItemText,hWnd,IDC_EndterPass,addr File,256
invoke _EnumKeyToBuff,CTXT("pass"),addr szOnLine
lea eax,szOnLine
add eax,34
invoke wsprintf,addr szOnLine1,CTXT("%s"),eax
invoke lstrcmp,addr File,addr szOnLine1
.if eax==NULL
invoke DialogBoxParam,hInstance,IDD_DIALOG6,NULL,offset _ProcDlgVideo,NULL
.elseif
invoke MessageBox,0,CTXT("密码错误"),0,MB_ICONSTOP
.endif
.endif
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgPass endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgSetTime proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local szDate[256]:BYTE
local szTest[50]:BYTE
mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_INITDIALOG
mov y,2
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke ODBCConnect,hWnd,CTXT("Date.mdb")
;invoke RunQuery,hWnd
invoke _EnumKeyToBuff,CTXT("pass"),addr szGetPassFormKey
invoke lstrlen,addr szGetPassFormKey
.if eax!=NULL
invoke GetDlgItem,hWnd,IDC_YouPass
invoke EnableWindow,eax,FALSE
invoke GetDlgItem,hWnd,IDC_SetPass
invoke EnableWindow,eax,FALSE
.endif
invoke GetDlgItem,hWnd,IDC_OldPass
invoke EnableWindow,eax,FALSE
invoke GetDlgItem,hWnd,IDC_NewPass
invoke EnableWindow,eax,FALSE
invoke GetDlgItem,hWnd,IDC_OkNewPass
invoke EnableWindow,eax,FALSE
invoke GetDlgItem,hWnd,IDC_SetNewPassOK
invoke EnableWindow,eax,FALSE
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == IDC_add
invoke RtlZeroMemory,addr ShangShang,100
invoke RtlZeroMemory,addr ShangXia,100
invoke RtlZeroMemory,addr szDate,256
invoke RtlZeroMemory,addr szTest,50
invoke RtlZeroMemory,addr szFileDirectory1,256
invoke RtlZeroMemory,addr szFileDirectory2,256
invoke RtlZeroMemory,addr szBuffer,256
invoke GetCurrentDirectory,200,addr szFileDirectory1
invoke lstrcat,addr szFileDirectory2,addr szFileDirectory1
invoke lstrcat,addr szFileDirectory2,CTXT("\") ;获取当前目录名称
invoke lstrcpy,addr szFileDirectory3,addr szFileDirectory2
invoke GetDlgItemText,hWnd,IDC_Name,addr ShangShang,100
invoke lstrlen,addr ShangShang
.if eax==NULL
invoke MessageBox,0,CTXT("员工姓名不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke GetDlgItemText,hWnd,IDC_Bumen,addr ShangXia,100
invoke lstrlen,addr ShangXia
.if eax==NULL
invoke MessageBox,0,CTXT("员工所在部门不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke wsprintf,addr szBuffer,CTXT("%s(%s)"),addr ShangShang,addr ShangXia
invoke wsprintf,addr szDate,addr szSql,addr ShangXia,addr szBuffer
invoke SQLAllocHandle, SQL_HANDLE_STMT, hConn, addr hStmt
.if ax==SQL_SUCCESS || ax==SQL_SUCCESS_WITH_INFO
invoke SQLPrepare, hStmt,addr szDate, sizeof szDate
invoke SQLExecute, hStmt
invoke wsprintf,addr szTest,CTXT("%s 添加到数据库成功!"),addr ShangShang
invoke SetDlgItemText,hWnd,IDC_Seccuse,addr szTest
invoke RunQuery,hWnd
.elseif
invoke wsprintf,addr szTest,CTXT("%s 添加到数据库失败!"),addr ShangShang
invoke SetDlgItemText,hWnd,IDC_Seccuse,addr szTest
.endif
.elseif ax == IDC_BUTTONBuMen
invoke RtlZeroMemory,addr ShangShang,100
invoke RtlZeroMemory,addr szDate,256
invoke GetDlgItemText,hWnd,IDC_EDIT3,addr ShangShang,100
invoke lstrlen,addr ShangShang
.if eax==NULL
invoke MessageBox,0,CTXT("部门不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke wsprintf,addr szDate,addr szSqlBuMen,addr ShangShang
invoke SQLAllocHandle, SQL_HANDLE_STMT, hConn, addr hStmt
.if ax==SQL_SUCCESS || ax==SQL_SUCCESS_WITH_INFO
invoke SQLPrepare, hStmt,addr szDate, sizeof szDate
invoke SQLExecute, hStmt
invoke wsprintf,addr szTest,CTXT("%s 添加到数据库成功!"),addr ShangShang
invoke SetDlgItemText,hWnd,IDC_Seccuse,addr szTest
invoke RunQueryBuMen,hWnd
.endif
.elseif ax == IDC_BUTTONDel
invoke RtlZeroMemory,addr ShangShang,100
invoke RtlZeroMemory,addr szDate,256
invoke GetDlgItemText,hWnd,IDC_EDIT3,addr ShangShang,100
invoke lstrlen,addr ShangShang
.if eax==NULL
invoke MessageBox,0,CTXT("部门不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke wsprintf,addr szDate,addr szSqlBuMenDel,addr ShangShang
invoke SQLAllocHandle, SQL_HANDLE_STMT, hConn, addr hStmt
.if ax==SQL_SUCCESS || ax==SQL_SUCCESS_WITH_INFO
invoke SQLPrepare, hStmt,addr szDate, sizeof szDate
invoke SQLExecute, hStmt
invoke wsprintf,addr szTest,CTXT("%s 删除成功!"),addr ShangShang
invoke SetDlgItemText,hWnd,IDC_Seccuse,addr szTest
invoke RunQueryBuMen,hWnd
.endif
.elseif ax == IDC_SetPass
invoke RtlZeroMemory,addr Pass,sizeof Pass
invoke RtlZeroMemory,addr szPass,sizeof szPass
invoke GetDlgItemText,hWnd,IDC_YouPass,addr Pass,sizeof Pass
invoke lstrcat,addr szPass,CTXT("0000000001111111112222245555555777")
invoke lstrcat,addr szPass,addr Pass
invoke lstrlen,addr szPass
invoke _ReadKey,CTXT("pass"),addr szPass
invoke MessageBox,0,CTXT("密码设置成功!"),CTXT("友情提示"),MB_ICONINFORMATION
.elseif ax == IDC_IWillSetPass
invoke RtlZeroMemory,addr OldPass,sizeof OldPass
invoke RtlZeroMemory,addr szGetPassFormKey,sizeof szGetPassFormKey
invoke GetDlgItem,hWnd,IDC_OldPass
invoke EnableWindow,eax,TRUE
invoke GetDlgItem,hWnd,IDC_NewPass
invoke EnableWindow,eax,TRUE
invoke GetDlgItem,hWnd,IDC_OkNewPass
invoke EnableWindow,eax,TRUE
invoke GetDlgItem,hWnd,IDC_SetNewPassOK
invoke EnableWindow,eax,TRUE
.elseif ax == IDC_SetNewPassOK
invoke _EnumKeyToBuff,CTXT("pass"),addr szGetPassFormKey
lea eax,szGetPassFormKey
add eax,34
invoke wsprintf,addr @szGetPassFormKey,CTXT("%s"),eax
invoke GetDlgItemText,hWnd,IDC_OldPass,addr OldPass,sizeof OldPass
invoke lstrcmp,addr @szGetPassFormKey,addr OldPass
.if eax!=NULL
invoke MessageBox,0,CTXT("您的旧密码错误,程序无法修改密码"),0,MB_ICONSTOP
ret
.elseif
invoke GetDlgItemText,hWnd,IDC_NewPass,addr szNewPass,sizeof szNewPass
invoke GetDlgItemText,hWnd,IDC_OkNewPass,addr szChenkNewPass,sizeof szChenkNewPass
invoke lstrcmp,addr szNewPass,addr szChenkNewPass
.if eax!=NULL
invoke MessageBox,0,CTXT("您输入的密码不一致"),0,MB_ICONSTOP
ret
.elseif
invoke lstrcat,addr szOKPass,CTXT("0000000001111111112222245555555777")
invoke lstrcat,addr szOKPass,addr szNewPass
invoke lstrlen,addr szOKPass
invoke _ReadKey,CTXT("pass"),addr szOKPass
invoke MessageBox,0,CTXT("密码修改成功!"),CTXT("友情提示"),MB_ICONINFORMATION
.endif
.endif
.elseif ax == IDC_OkToSave
invoke RtlZeroMemory,addr szXiaban,256
invoke RtlZeroMemory,addr szShangban,256
invoke GetDlgItemText,hWnd,IDC_Shangban,addr szShangban,256
invoke lstrlen,addr szShangban
.if eax==NULL
invoke MessageBox,0,CTXT("上班时间不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke GetDlgItemText,hWnd,IDC_Xiaban,addr szXiaban,256
invoke lstrlen,addr szXiaban
.if eax==NULL
invoke MessageBox,0,CTXT("下班时间不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke StrStr,addr szShangban,CTXT("-")
.if eax!=NULL
invoke MessageBox,0,CTXT("格式不正确,时间不能有 - "),0,MB_ICONSTOP
ret
.endif
invoke StrStr,addr szShangban,CTXT(":")
.if eax!=NULL
invoke MessageBox,0,CTXT("格式不正确,时间不能有 : "),0,MB_ICONSTOP
ret
.endif
invoke StrStr,addr szXiaban,CTXT("-")
.if eax!=NULL
invoke MessageBox,0,CTXT("格式不正确,时间不能有 - "),0,MB_ICONSTOP
ret
.endif
invoke StrStr,addr szXiaban,CTXT(":")
.if eax!=NULL
invoke MessageBox,0,CTXT("格式不正确,时间不能有 : "),0,MB_ICONSTOP
ret
.endif
invoke _ReadKey,CTXT("ShangBan"),addr szShangban
invoke _ReadKey,CTXT("XiaBan"),addr szXiaban
invoke MessageBox,0,CTXT("设置成功"),CTXT("友情提示"),MB_ICONINFORMATION
invoke EndDialog,hWnd,0
.elseif ax == IDC_DelYuangong
invoke RtlZeroMemory,addr ShangShang,100
invoke RtlZeroMemory,addr ShangXia,100
invoke RtlZeroMemory,addr szDate,256
invoke RtlZeroMemory,addr szTest,50
invoke RtlZeroMemory,addr szFileDirectory1,256
invoke RtlZeroMemory,addr szFileDirectory2,256
invoke RtlZeroMemory,addr szBuffer,256
invoke GetCurrentDirectory,200,addr szFileDirectory1
invoke lstrcat,addr szFileDirectory2,addr szFileDirectory1
invoke lstrcat,addr szFileDirectory2,CTXT("\") ;获取当前目录名称
invoke lstrcpy,addr szFileDirectory3,addr szFileDirectory2
invoke GetDlgItemText,hWnd,IDC_Name,addr ShangShang,100
invoke lstrlen,addr ShangShang
.if eax==NULL
invoke MessageBox,0,CTXT("员工姓名不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke GetDlgItemText,hWnd,IDC_Bumen,addr ShangXia,100
invoke lstrlen,addr ShangXia
.if eax==NULL
invoke MessageBox,0,CTXT("员工所在部门不能为空!"),0,MB_ICONSTOP
ret
.endif
invoke wsprintf,addr szBuffer,CTXT("%s(%s)"),addr ShangShang,addr ShangXia
invoke wsprintf,addr szDate,CTXT("delete from main where 姓名='%s'"),addr szBuffer
invoke SQLAllocHandle, SQL_HANDLE_STMT, hConn, addr hStmt
.if ax==SQL_SUCCESS || ax==SQL_SUCCESS_WITH_INFO
invoke SQLPrepare, hStmt,addr szDate, sizeof szDate
invoke SQLExecute, hStmt
invoke wsprintf,addr szTest,CTXT("%s 删除成功!"),addr ShangShang
invoke SetDlgItemText,hWnd,IDC_Seccuse,addr szTest
invoke RunQuery,hWnd
.elseif
invoke wsprintf,addr szTest,CTXT("%s 删除失败!"),addr ShangShang
invoke SetDlgItemText,hWnd,IDC_Seccuse,addr szTest
.endif
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgSetTime endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ProcDlgMain proc uses ebx edi esi hWnd,wMsg,wParam,lParam
local @stST:SYSTEMTIME
local szDate1[256]:BYTE
local szFileData:WIN32_FIND_DATA
local szKey1[50]:byte
local szFile[256]:byte
local szFile1[256]:byte
local szFile2[256]:byte
mov eax,wMsg
.if eax == WM_CLOSE
invoke Disconnect,hwndVideo
invoke ODBCDisconnect,hWnd
DESTROY @BBut
DESTROY @BBut1
DESTROY @BBut2
invoke ExitProcess,0
.elseif eax == WM_SIZE ;隐藏成托盘
mov eax,wParam
.if eax == SIZE_MINIMIZED
invoke ShowWindow,hWnd,SW_HIDE
invoke LoadIcon,hInstance,ICO_MAIN
invoke _ProcTaskWrite,hWnd,ICO_MAIN,WM_TASKBAR,eax,CTXT("鱿鱼视频打卡系统 [VIP] 00001版")
.endif
.elseif eax == WM_TASKBAR ;撤消托盘显示窗口
mov eax,lParam
.if eax == WM_LBUTTONDBLCLK
invoke ShowWindow,hWnd,SW_SHOWNORMAL
invoke _ProcTaskRemove,hWnd,ICO_MAIN
.endif
.if eax ==WM_LBUTTONDOWN
invoke ShowWindow,hWnd,SW_SHOWNORMAL
invoke _ProcTaskRemove,hWnd,ICO_MAIN
.endif
.elseif eax == WM_INITDIALOG
mov y,0
push hWnd
pop hWndList
invoke _CenterWindow,hWnd
invoke LoadIcon,hInstance,ICO_MAIN
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,eax
invoke GetDlgItem,hWnd,IDC_DATETIMEPICKER1
invoke EnableWindow,eax,FALSE
invoke SetTimer,hWnd,1,1000,NULL
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke capCreateCaptureWindow,CTXT("My Capture Window"),WS_CHILD or WS_VISIBLE,3,41,291,258,hWnd,1
mov hwndVideo,eax
invoke ODBCConnect,hWnd,CTXT("Date.mdb")
invoke RunQueryBuMen,hWnd
invoke GetDlgItem,hWnd,IDC_COMBOBOXEX2
mov hList2,eax
invoke _ListViewAddColumn1,hList2,0,100,CTXT("部门")
invoke _ListViewAddColumn1,hList2,1,159,CTXT("姓名")
invoke _EnumKeyToBuff,CTXT("user"),addr szKey1
invoke lstrlen,addr szKey1
.if eax<5
invoke MessageBox,0,CTXT("软件注册表注册值被破坏,无法启动,请联系官方站!地址:
http://www.daka168.com/bbs/"),0,MB_ICONSTOP
invoke ExitProcess,0
.endif
;invoke CreateThread,NULL,0,addr _ChenkInternet,addr szKey1,0,addr ThreadId;试用期
invoke _ChenkInternet,addr szKey1
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("请假")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("外出")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("上班")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("下班")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("加班")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("出差")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("休假")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("事假")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("婚假")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("病假")
invoke SendDlgItemMessage,hWnd,IDC_COMBOBOXEX3,CB_ADDSTRING,0,CTXT("产假")
invoke SetDlgItemText,hWnd,IDC_COMBOBOXEX3,CTXT("上班")
NEWOBJECT CFButton,hInstance,hWnd,IDI_1,IDC_1
mov @BBut,eax
method @BBut,CFButton,SetFlat,TRUE; TRUE;平坦的按扭
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
NEWOBJECT CFButton,hInstance,hWnd,IDI_2,IDC_2
mov @BBut1,eax
method @BBut1,CFButton,SetFlat,TRUE; TRUE;平坦的按扭
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
NEWOBJECT CFButton,hInstance,hWnd,IDI_3,IDC_3
mov @BBut2,eax
method @BBut2,CFButton,SetFlat,TRUE; TRUE;平坦的按扭
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke CreateThread,NULL,0,addr _InstallHook,0,0,addr ThreadId1 ;//限制使用在多太电脑
.elseif eax == WM_DRAWITEM
method @BBut,CFButton,DrawItem,lParam
method @BBut1,CFButton,DrawItem,lParam
method @BBut2,CFButton,DrawItem,lParam
.elseif eax == WM_COMMAND
mov eax,wParam
; .if lParam!=0
mov edx,eax
shr edx,16
.if dx==BN_CLICKED ;按钮消息处理
.if ax == IDC_OK
invoke _GetSystemTime1,addr szTheTime1 ;上班时间,这个是写进数据库里
invoke _GetSystemTime,addr szTheTime ;文件命名
invoke _GetDayTime,addr szTheTime2 ;取天数,用来检测月结考勤统计
invoke RtlZeroMemory,addr szTime,sizeof szTime
invoke RtlZeroMemory,addr szBuMen,sizeof szBuMen
;invoke RtlZeroMemory,addr szName,sizeof szName
invoke RtlZeroMemory,addr szFileDirectory,sizeof szFileDirectory
invoke RtlZeroMemory,addr szFileDirectory2,sizeof szFileDirectory2
invoke RtlZeroMemory,addr szSaveFile,sizeof szSaveFile
invoke RtlZeroMemory,addr szDate1,sizeof szDate1
invoke RtlZeroMemory,addr szBuffer,sizeof szBuffer
invoke RtlZeroMemory,addr szLeiXing,sizeof szLeiXing
invoke GetDlgItemText,hWnd,IDC_DATETIMEPICKER1,addr szTime,sizeof szTime ;日期
invoke GetDlgItemText,hWnd,IDC_COMBOBOXEX1,addr szBuMen,sizeof szBuMen ;部门
invoke lstrlen,addr szBuMen
.if eax==NULL
invoke MessageBox,0,CTXT("部门不能为空"),0,MB_ICONSTOP
ret
.endif
invoke GetDlgItemText,hWnd,IDC_COMBOBOXEX3,addr szLeiXing,sizeof szLeiXing ;部门
invoke lstrlen,addr szLeiXing
.if eax==NULL
invoke MessageBox,0,CTXT("打卡类型不能为空"),0,MB_ICONSTOP
ret
.endif
;invoke GetDlgItemText,hWnd,IDC_COMBOBOXEX2,addr szName,sizeof szName ;姓名
;invoke lstrlen,addr szName
;.if eax==NULL
; invoke MessageBox,0,CTXT("姓名不能为空"),0,MB_ICONSTOP
; ret
;.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;为每一个打卡的人创建一个目录
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke RtlZeroMemory,addr szDirectory,sizeof szDirectory
invoke GetCurrentDirectory,200,addr szDirectory
invoke lstrcat,addr szFileDirectory2,addr szDirectory
invoke lstrcpy,addr szFileDirectory3,addr szFileDirectory2
invoke lstrcat,addr szFileDirectory2,CTXT("\NameDate\")
invoke lstrcat,addr szFileDirectory2,addr szName
invoke CreateDirectory,addr szFileDirectory2,0
;invoke MessageBox,0,addr szName,0,0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke lstrcat,addr szFileDirectory2,CTXT("\YourDate.mdb") ;新路径
invoke lstrcat,addr szFileDirectory3,CTXT("\YourDate.mdb") ;旧路径
invoke FindFirstFile,addr szFileDirectory2,addr szFileData
.if eax == INVALID_HANDLE_VALUE
invoke CopyFile,addr szFileDirectory3,addr szFileDirectory2,TRUE
.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke RtlZeroMemory,addr szDirectory,sizeof szDirectory
invoke GetCurrentDirectory,200,addr szDirectory
invoke lstrcat,addr szFileDirectory,addr szDirectory
invoke lstrcat,addr szFileDirectory,CTXT("\NameDate\")
invoke lstrcat,addr szFileDirectory,addr szName
invoke lstrcpy,addr szSaveFile,addr szFileDirectory
invoke lstrcat,addr szFileDirectory,CTXT("\YourDate.mdb")
invoke ODBCConnect,hWnd,addr szFileDirectory
invoke wsprintf,addr szDate1,addr szSqlDate,addr szBuMen,addr szName,addr szTheTime1,addr szTime
invoke SQLAllocHandle, SQL_HANDLE_STMT, hConn, addr hStmt
.if ax==SQL_SUCCESS || ax==SQL_SUCCESS_WITH_INFO
invoke SQLPrepare, hStmt,addr szDate1, sizeof szDate1
invoke SQLExecute, hStmt
invoke lstrcat,addr szSaveFile,CTXT("\")
invoke lstrcat,addr szSaveFile,addr szTheTime
invoke lstrcat,addr szSaveFile,CTXT(".bmp")
invoke GetCapFileToSave,hwndVideo,addr szSaveFile
invoke MessageBox,0,CTXT("打卡成功!"),CTXT("友情提示"),MB_ICONINFORMATION
.elseif
invoke MessageBox,0,CTXT("打卡失败!"),0,MB_ICONSTOP
.endif
.elseif ax == IDM_Chenk
mov hEn,1
invoke DialogBoxParam,hInstance,IDD_DIALOG5,hWnd,offset _ProcDlgPass,NULL
.elseif ax == IDM_SHIP
mov hEn,2
invoke DialogBoxParam,hInstance,IDD_DIALOG5,hWnd,offset _ProcDlgPass,NULL
.elseif ax == IDM_ShangWu
invoke DialogBoxParam,hInstance,IDD_DIALOG2,hWnd,offset _ProcDlgSetTime,NULL
.elseif ax == IDM_ZuiXiao
invoke CloseWindow,hWnd
.elseif ax == IDM_EXIT
invoke Disconnect,hwndVideo
invoke ExitProcess,0
.elseif ax == IDM_ShuoMing
invoke ShellExecute,0,0,CTXT("说明文档.doc"),0,0,SW_SHOW
.elseif ax == IDM_ZhuYi
invoke ShellExecute,0,0,CTXT("http://www.daka168.com/"),0,0,SW_SHOW
.elseif ax == IDM_About
invoke MessageBox,0,CTXT("鱿鱼视频打卡系统 [VIP] 00001版"),CTXT("[VIP]"),MB_ICONINFORMATION
.elseif ax == IDM_Bbs
invoke ShellExecute,0,0,CTXT("http://www.daka168.com/bbs"),0,0,SW_SHOW
.elseif ax == IDM_YueJie
mov hEn,0
invoke DialogBoxParam,hInstance,IDD_DIALOG5,hWnd,offset _ProcDlgPass,NULL
.elseif ax == IDC_3
invoke ShellExecute,0,0,CTXT("说明文档.doc"),0,0,SW_SHOW
.elseif ax == IDC_2
invoke ShellExecute,0,0,CTXT("http://www.daka168.com/bbs"),0,0,SW_SHOW
.elseif ax == IDC_1
invoke ShellExecute,0,0,CTXT("http://www.daka168.com/"),0,0,SW_SHOW
.elseif ax == IDM_Open
mov hEn,3
invoke DialogBoxParam,hInstance,IDD_DIALOG5,hWnd,offset _ProcDlgPass,NULL
.endif
.elseif dx == CBN_SELCHANGE
invoke RtlZeroMemory,addr szBuMenBuff,sizeof szBuMenBuff
invoke _OnCBSelChange,addr szBuMenBuff
invoke SendMessage,hList2,LVM_DELETEALLITEMS,0,0
invoke ODBCConnect,hWnd,CTXT("Date.mdb")
invoke RunQuery2,hWnd
.endif
; .endif
.elseif eax == WM_NOTIFY
mov eax,wParam
.if eax == IDC_COMBOBOXEX2
push edi
mov edi, lParam
.if [edi.NMHDR].code == NM_DBLCLK
invoke RtlZeroMemory,addr szName,sizeof szName
invoke _ListViewSelect,hList2,1,addr szName,sizeof szName
invoke _GetSystemTime1,addr szTheTime1 ;上班时间,这个是写进数据库里
invoke _GetSystemTime,addr szTheTime ;文件命名
invoke _GetDayTime,addr szTheTime2 ;取天数,用来检测月结考勤统计
invoke RtlZeroMemory,addr szTime,sizeof szTime
invoke RtlZeroMemory,addr szBuMen,sizeof szBuMen
;invoke RtlZeroMemory,addr szName,sizeof szName
invoke RtlZeroMemory,addr szFileDirectory,sizeof szFileDirectory
invoke RtlZeroMemory,addr szFileDirectory2,sizeof szFileDirectory2
invoke RtlZeroMemory,addr szSaveFile,sizeof szSaveFile
invoke RtlZeroMemory,addr szSaveFile1,sizeof szSaveFile1
invoke RtlZeroMemory,addr szDate1,sizeof szDate1
invoke RtlZeroMemory,addr szBuffer,sizeof szBuffer
invoke RtlZeroMemory,addr szLeiXing,sizeof szLeiXing
;invoke GetDlgItemText,hWnd,IDC_DATETIMEPICKER1,addr szTime,sizeof szTime ;日期
invoke GetDlgItemText,hWnd,IDC_COMBOBOXEX1,addr szBuMen,sizeof szBuMen ;部门
invoke lstrlen,addr szBuMen
.if eax==NULL
invoke MessageBox,0,CTXT("部门不能为空"),0,MB_ICONSTOP
ret
.endif
invoke GetDlgItemText,hWnd,IDC_COMBOBOXEX3,addr szLeiXing,sizeof szLeiXing ;类型
invoke lstrlen,addr szLeiXing
.if eax==NULL
invoke MessageBox,0,CTXT("打卡类型不能为空"),0,MB_ICONSTOP
ret
.endif
;invoke GetDlgItemText,hWnd,IDC_COMBOBOXEX2,addr szName,sizeof szName ;姓名
;invoke lstrlen,addr szName
;.if eax==NULL
; invoke MessageBox,0,CTXT("姓名不能为空"),0,MB_ICONSTOP
; ret
;.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;为每一个打卡的人创建一个目录
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke RtlZeroMemory,addr szMounth,10
invoke _GetMonthTime1,addr szMounth
invoke RtlZeroMemory,addr szDirectory,sizeof szDirectory
invoke GetCurrentDirectory,200,addr szDirectory
invoke lstrcat,addr szFileDirectory2,addr szDirectory
invoke lstrcpy,addr szFileDirectory3,addr szFileDirectory2
invoke lstrcat,addr szFileDirectory2,CTXT("\NameDate\")
invoke lstrcat,addr szFileDirectory2,addr szMounth
invoke lstrcat,addr szFileDirectory2,CTXT("\")
invoke CreateDirectory,addr szFileDirectory2,0
invoke lstrcat,addr szFileDirectory2,addr szName
;invoke lstrcat,addr szFileDirectory2,addr szLeiXing
invoke CreateDirectory,addr szFileDirectory2,0
;invoke MessageBox,0,addr szFileDirectory2,0,0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke lstrcat,addr szFileDirectory2,CTXT("\YourDate.mdb") ;新路径
invoke lstrcat,addr szFileDirectory3,CTXT("\YourDate.mdb") ;旧路径
invoke FindFirstFile,addr szFileDirectory2,addr szFileData
.if eax == INVALID_HANDLE_VALUE
invoke CopyFile,addr szFileDirectory3,addr szFileDirectory2,TRUE
.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke RtlZeroMemory,addr szDirectory,sizeof szDirectory
invoke GetCurrentDirectory,200,addr szDirectory
invoke lstrcat,addr szFileDirectory,addr szDirectory
invoke lstrcat,addr szFileDirectory,CTXT("\NameDate\")
invoke lstrcat,addr szFileDirectory,addr szMounth
invoke lstrcat,addr szFileDirectory,CTXT("\")
invoke lstrcat,addr szFileDirectory,addr szName
invoke lstrcpy,addr szSaveFile,addr szFileDirectory
invoke lstrcpy,addr szSaveFile1,addr szFileDirectory
invoke lstrcat,addr szFileDirectory,CTXT("\YourDate.mdb")
;invoke MessageBox,0,addr szFileDirectory,0,0
invoke ODBCConnect,hWnd,addr szFileDirectory
invoke wsprintf,addr szDate1,addr szSqlDate,addr szBuMen,addr szName,addr szTheTime1,addr szTheTime2,addr szLeiXing
invoke SQLAllocHandle, SQL_HANDLE_STMT, hConn, addr hStmt
.if ax==SQL_SUCCESS || ax==SQL_SUCCESS_WITH_INFO
invoke SQLPrepare, hStmt,addr szDate1, sizeof szDate1
invoke SQLExecute, hStmt
invoke lstrcat,addr szSaveFile,CTXT("\")
invoke lstrcat,addr szSaveFile,addr szTheTime
invoke lstrcat,addr szSaveFile,CTXT(".bmp")
invoke GetCapFileToSave,hwndVideo,addr szSaveFile
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke RtlZeroMemory,addr szGetPassFormKey,sizeof szGetPassFormKey
invoke _EnumKeyToBuff,CTXT("ShangBan"),addr szGetPassFormKey
invoke _GetChiDaoTime,addr ChiDao ;获取当前时间值
invoke atoi_asm,hWnd,addr ChiDao,addr szGetPassFormKey,addr hInt
invoke lstrcmp,addr hInt,CTXT("shangwuchidao") ;如果hInt等于1,说明上午上班迟到
.if eax==NULL
invoke SetWindowText,hWnd,CTXT("您上午上班迟到了噢,赶紧....")
invoke lstrcmp,addr szLeiXing,CTXT("上班") ;只有上班才存在迟到
.if eax==NULL
invoke lstrcat,addr szSaveFile1,CTXT("\")
invoke lstrcat,addr szSaveFile1,addr szTheTime2
invoke lstrcat,addr szSaveFile1,CTXT("-")
invoke lstrcat,addr szSaveFile1,CTXT("迟到")
invoke lstrcat,addr szSaveFile1,CTXT(".bmp")
jmp _Go
.elseif
jmp _GOTO
.endif
.endif
invoke RtlZeroMemory,addr szGetPassFormKey,sizeof szGetPassFormKey
invoke RtlZeroMemory,addr hInt,sizeof hInt
invoke _EnumKeyToBuff,CTXT("XiaBan"),addr szGetPassFormKey
invoke _GetChiDaoTime,addr ChiDao ;获取当前时间值
invoke atoi_asm,hWnd,addr ChiDao,addr szGetPassFormKey,addr hInt
invoke lstrcmp,addr hInt,CTXT("xiawuchidao") ;如果hInt等于2,说明下午上班迟到了
.if eax==NULL
invoke lstrcmp,addr szLeiXing,CTXT("上班") ;只有上班才存在迟到
.if eax==NULL
invoke SetWindowText,hWnd,CTXT("您下午上班迟到了噢,赶紧....")
invoke lstrcat,addr szSaveFile1,CTXT("\")
invoke lstrcat,addr szSaveFile1,addr szTheTime2
invoke lstrcat,addr szSaveFile1,CTXT("-")
invoke lstrcat,addr szSaveFile1,CTXT("迟到")
invoke lstrcat,addr szSaveFile1,CTXT(".bmp")
jmp _Go
.elseif
jmp _GOTO
.endif
.endif
_GOTO:
invoke lstrcat,addr szSaveFile1,CTXT("\")
invoke lstrcat,addr szSaveFile1,addr szTheTime2
invoke lstrcat,addr szSaveFile1,CTXT("-")
invoke lstrcat,addr szSaveFile1,addr szLeiXing
invoke lstrcat,addr szSaveFile1,CTXT(".bmp")
_Go:
invoke FindFirstFile,addr szSaveFile1,addr szFileData
.if eax == INVALID_HANDLE_VALUE
invoke GetCapFileToSave,hwndVideo,addr szSaveFile1
.endif
invoke MessageBox,0,CTXT("打卡成功!"),CTXT("友情提示"),MB_ICONINFORMATION
.elseif
invoke MessageBox,0,CTXT("打卡失败!"),0,MB_ICONSTOP ;添加到数据库是否成功
.endif
.endif
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_ProcDlgMain endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
invoke DialogBoxParam,hInstance,DLG_MAIN,NULL,offset _ProcDlgMain,NULL
invoke ExitProcess,NULL
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end start
