⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 -

📁 一个多线程
💻
📖 第 1 页 / 共 2 页
字号:
endproc

 
 
busdrv.cmd:
 
//these command and variant declared for bus driving
version 'busworker flow'   //FILE VERSION
parentstyle 'basedrv.cmd'
////////////////////////////////////////////////
//define some variant
variant ThisWorker     0x00f10001
variant registerCallFunction  0x00f10002
variant StationModId    0x00f10003
variant PDUHeadFlag     0x00f10004
variant StationName     0x00f10005
////////////////////////////////////////////
//DFINE SOME flow MESSAGE
const ID_CMD_INIT  0x00001001//flow init
const ID_CMD_CLOSE  0x00001002//flow close
const ID_CMD_TIME  0x000000c8//time message
const CMD_APPLY_RES  0x40005002//distributor message
///////////////////////////////////////////////////
//
const ID_SendToBus   0x00001003//bus message
const ID_DealCommStatus  0x40000008//comm dll status changed
const ID_DealCommData  0x40000009//comm dll data arrived
const ID_SendRemoteData  0x4000000a//data for send
const ID_SetLinkReport  0x4000000c//need report
const ID_SetOnLineReport 0x4000000e//need OnLine report
//default odbc handle name
const nDefaultArray     0xffffffff
const nDefaultOdbc     0xffffffff
//excute sql flags
const nWantResult     0x10000
const nNoResult      0x00000
//excute sql flags
const nPamTypePointed    0x20000
const nPamTypeNopointed    0x00000
//excute sql flags
const nPmPointedSet     0x40000//define flow the parameter
const nPmDefaultSet     0x00000//default: int,dword-->nsqllong,flag->nsqldouble,string->slqvarchar,datablock->sqlbinary
//excute sql flags
const nNoReturn      0x80000
const nNeedReturn     0x00000
//excute sql flags
const nProcedureName    0x0000
const nTableName     0x1000
const nSqlClause     0x2000
//table move flags
const nMoveFirst     0
const nMoveLast      1
const nMoveNext      2
const nMovePrev      3
//param datatype
const nSqlChar      0
const nSqlDecimal     0
const nSqlMoney      0
const nSqlNChar      0
const nSqlNText      0
const nSqlNumeric     0
const nSqlNVarChar     0
const nSqlText      0
const nSqlUniqueIdentifier   0
const nSqlVarChar     0
const nSqlTinyInt     1
const nSqlSmallInt     2
const nSqlReal      3
const nSqlFloat      4
const nSqlDateTime     5
const nSqlSmallDateTime    5
const nSqlBinary     6
const nSqlTimeStamp     6
const nSqlVarBinary     6
const nSqlImage      7
const nSqlBit      8
const nSqlInt      9
//param input/output type
const nSqlInputParam    0x000
const nSqlParam      0x000
const nSqlOutputParam    0x100
const nSqlInoutParam    0x200
//output columns type
const nSqlInputColumn    0x400
defcommand SendCommandEx   0x00f10007 MACH dword mach=0,dword dwSenderObject,dword dwCommand,ROAD int irode=0xffffffff,HKEY int hkey=0,TIMER int itime=0xffffffff,...
defcommand SendEventEx    0x00f10008 MACH dword mach=0,dword dwSenderObject,dword dwCommand,RMACH dword rmach=0,WAITOBJ dword wobj=0,WAITCMD dword wcmd=0,WAITTYPE dword wtype=0,ROAD int irode=0xffffffff,HKEY int hkey=0,...
defcommand SendRespEx    0x00f10009 MACH dword mach=0,dword dwSenderObject,dword dwCommand,RMACH dword rmach=0,WAITOBJ dword wobj=0,WAITCMD dword wcmd=0,WAITTYPE dword wtype=0,ROAD int irode=0xffffffff,...
defcommand SetTimeOut    0x00f1000a int iSec
defcommand CancelTimeOut   0x00f1000b int iSec
defcommand LockOwn     0x00f10017 int & key,ASYN int asyn=1
defcommand UnLockOwn    0x00f1001e int key
defcommand GetCurrentCommandParam 0x00f10004 int idx,datablock 0 & param
defcommand GetCommandParamNum  0x00f10005 int & num
defcommand GetCommand    0x00f10006 dword & CommandHandle, dword & ApplyObject,dword & CommandType, WAIT int wait=0
defcommand AddTimeOutMessage  0x00f1000f int timeout ,int timeid,CFLAG int callflag=0,TFlag int tflag=1
defcommand CancelTimeOutMessage  0x00f10010 int timeid
defcommand FlowSleep    0x00f10011 int iSec,FLAG int iflag=0
defcommand FlowEdau     0x00f10020 ALIS string szAlis='dacs',string szFunction,FLAG int flag=0,RET int & isqlret=0,SPYY string & spyy='',ROW int IROW=0,COL int icol=0,...
defcommand AsynDllCall    0x00f10021 dword lhandle,dword thandle,string name,CALLRET int cret,FUNCRET int fret...
///////////////////////////////////////////////////////////////////////
//all new command ,id must big than 0x00f20000
defcommand CreateNewFlow   0x00f20000 int & flagandret,int id,MOD int modid=0,SCMD int scmd=0,ECMD int ecmd=0,string flown,...
defcommand GetCommandMsgInfo  0x00f20001 SENDMOD int & sendmod=0,SENDOBJ int & sendobj=0,SENDCMD int & command=0,CMDTYPE int & itype=0,MSGIDENT int & ident=0,RECVTIME int & iteme=0,PARMNUM int & pnum=0
defcommand ReleaseFlow    0x00f20002 FLOWID int id=0,MOD int modid=0,FLAG int flag=0
defcommand GetAllCommandParam  0x00f20003 ...
defcommand SetFlowEvent    0x00f20004 int obj,MOD int modid=0,FLAG int flag=0,int iEventId, datablock 0 v1,datablock 0 v2
defcommand ExcuteOver    0x00f20005 int obj,MOD int modid=0,dword dwCommand,...
defcommand StartTransAction   0x00f20006 
defcommand EndTransAction   0x00f20007 
defcommand StartAtomAction   0x00f20008 
defcommand EndAtomAction   0x00f20009 
defcommand ApplyExprFunctin   0x00f2000a int obj,MOD int modid=0,int startcmd,int endcmd,DIR int dir=0
defcommand OpenDistrabutor   0x00f2000b int & obj,string szAlis,int GroupNum,string szFeatureList,int timeout,int length
defcommand GetDistrabutor   0x00f2000c int & obj,string szAlis
defcommand CloseDistrabutor   0x00f2000d int obj
defcommand AddRes     0x00f2000e int & suc,int obj,int dwGroupId,SKIL string szSkillFeature='',int dwResKey,BRDOBJ int dwCatchObj=0,BRDMOD int dwCatchMod=0
defcommand FreeRes     0x00f2000f int & suc,int obj,int dwResKey
defcommand LockRes     0x00f20010 int & suc,int obj,int dwResKey
defcommand ApplyResbySkill   0x00f20011 int & dwResKey,int obj,KEY1 int dwNeedKey1=0,KEY2 int dwNeedKey2=0,RTYPE int dwType=0,string szFeature,RGT int dwRight=0,MOD int dwMod=0
defcommand ApplyResbyGroup   0x00f20012 int & dwResKey,int obj,KEY1 int dwNeedKey1=0,KEY2 int dwNeedKey2=0,RTYPE int dwType=0x010,int igroupid,RGT int dwRight=0,MOD int dwMod=0
defcommand EnableGetIn    0x00f2001a FLAG int iflag=0,HANDLE dword dwNotifyhandle=0,string szIdentString,int port,int & iactid,SUCC int & suc=0
defcommand StartConnect    0x00f2001b FLAG int iflag=0,HANDLE dword dwNotifyhandle=0,string szIdentString,int port,int & iactid,SUCC int & suc=0
defcommand Disconnected    0x00f2001c FLAG int iflag=0,dword connecthandle
defcommand DisableGetIn    0x00f2001d FLAG int iflag=0,int actid
defcommand WriteCommData   0x00f2001f FLAG int iflag=0,dword connecthandle,datablock 0 dt,int iLen
defcommand ChangModName    0x00f20020 dword connecthandle,int & modid,string Name
defcommand GetLinkBuffer   0x00f20021 dword & bhandle,dword connecthandle
defcommand CheckBusLink    0x00f20022 
defcommand CheckClientModId   0x00f20023 dword & modid
defcommand WriteRemoteData   0x00f20024 dword modid,datablock 0 dt,int len,TYPE int type=1,CONNECT int hconnect=0,ZAP int iszap=0,CODE int iscode=0,TIM int times=0
defcommand GetPDUData    0x00f20025 dword bufferid,int & modid,datablock 0 & remotedata,int & len,int & type,int & iszap,int & iscode
defcommand GetModIdByName   0x00f20026 string strName,dword & stationid
defcommand GetRegistedWorker  0x00f20027 int & worker,int registerid,MOD int modid=0
defcommand SetReportOver   0x00f20028 dword dwConnectHandle
defcommand OpenArray    0x00f20029 int & arrayhandle
defcommand CloseArray    0x00f2002a int arrayhandle
defcommand CopyArray    0x00f2002b int arrayhandle1,int arrayhandle2
defcommand GetArrayMenber   0x00f2002c ARRAY int arrayhandle=0xffffffff,LINE int ilne=0,COL int icol=0,datablock 0 & uv
defcommand SetArrayMenber   0x00f2002d ARRAY int arrayhandle=0xffffffff,LINE int ilne=0,COL int icol=0,datablock 0 uv
defcommand GetArrayLine    0x00f2002e ARRAY int arrayhandle=0xffffffff,LINE int ilne=0,...
defcommand SetArrayLine    0x00f2002f ARRAY int arrayhandle=0xffffffff,LINE int ilne=0,...
defcommand GetArrayParam   0x00f20030 ARRAY int arrayhandle=0xffffffff,LINE int & ilne=0,COL int & col=0,RET int & ret=0
defcommand OpenOdbc     0x00f20031 int & odbchandle,string szAlis,string szConnect,PRDS string prds='select isoutparam,type,length from syscolumns where id in (select id from sysobjects where name=?)',TABS string tabs='select name,type,length from syscolumns where id in (select id from sysobjects where name=?)' 
defcommand GetOdbc     0x00f20032 int & odbchandle,string szAlis
defcommand CloseOdbc    0x00f20033 int odbchandle
defcommand ExcuteOdbc    0x00f20034 ODBC int odbc=0xffffffff,string szExcuteSql,FLAG int flag=0,RET int & isqlret=0,SPYY string & spyy='',ROW int IROW=0,COL int icol=0,...
defcommand OpenTable    0x00f20035 ODBC int odbc=0xffffffff,int & handle,string szTableName
defcommand CloseTable    0x00f20036 ODBC int odbc=0xffffffff,int handle
defcommand MoveToLine    0x00f20037 ODBC int odbc=0xffffffff,int handle,int flag
defcommand AddNewLine    0x00f20038 ODBC int odbc=0xffffffff,int handle
defcommand UpdateLine    0x00f20039 ODBC int odbc=0xffffffff,int handle
defcommand apicalldllA    0x00f2003a dword lhandle,dword thandle,string name,CALLRET int cret,FUNCRET int fret...
//////////////////////////////////////////////////////////////////////
defevent OwnorRelease    0x00f00000

basedrv.cmd:
 
//these command and variant declared for bus driving
version 'baseworker flow'   //FILE VERSION
const TRUE    1
const FALSE    0
/////////////////////////////////////////////////
//define a static variant for test
static AuthorName
//////////////////////////////////////////////////////
//define const for dll
const apiint   0
const apilpint   1
const apiuseint   2
const apilong   3
const apilplong   4
const apiuselong  5
const apifloat   6
const apilpfloat  7
const apiusefloat  8
const apidword   9
const apilpdword  10
const apiusedword  11
const apilpstr   12
const apilpctstr  13
const apiuselpstr  14
const apilpvoid   15
const apivoid   16
const apiusestruct  17
const apiusecstring  18
const apiusecbyteary 19
const apiusechar  20
const apiuseshort  21
const apiusedouble  22
const apilpdouble  23
const apilpbtary  24
const apilpcstr   25
const apichar   26
const apishort   27
const apidouble   28
const apiblock   100
defcommand trimleft     0x00f00001 string & s
defcommand trimright    0x00f00002 string & s
defcommand substr     0x00f00003 string & s, int is,   int il
defcommand subinsert    0x00f00004 string & s, int i,string  subs
defcommand replace     0x00f00005 string & s, string  subs, string subt, int & il
defcommand findstr     0x00f00006 string   s, string  subs, int & is
defcommand isempty     0x00f00007 string   s, int & bempty
defcommand leftstr     0x00f00008 string & s, int   i
defcommand rightstr     0x00f00009 string & s, int   i
defcommand atoi      0x00f0000a string   s, int & i
defcommand itoa      0x00f0000b string & s, int   i
defcommand atof      0x00f0000c string   s, float & f
defcommand ftoa      0x00f0000d string & s, float   f
defcommand copyfile     0x00f0000e string   s, string t,  int & i
defcommand movefile     0x00f0000f string   s, string t,  int & i
defcommand removefile    0x00f00010 string   s, int & i
//defcommand loaddll    0x00f00011 string dllname, string & dllalis
//defcommand dllcall    0x00f00012 string dllalis, string strFunctionName,int & iResult,...
defcommand blockopr     0x00f00013 datablock 0 & uv1,datablock 0 & uv2,int iflag,int ifirst,LEN int ilen=0,RESET int ireset=15
//iflag 0: insert,1:delete,2:subst,3:copy //ireset resetflag,used by iflag==3//ifirst operate firsrpos//iLen operate len
defcommand byteget     0x00f00014 datablock 0   uv,int & iv,int idx,ULEN int ilen=1//getbyte from uv on index iv
defcommand datalen     0x00f00015 datablock 0   uv,int & idx
defcommand isfileexist    0x00f00016 string strName ,int & bSuc
defcommand byteset     0x00f00017 datablock 0   uv,int iv,int idx,ULEN int ilen=1
defcommand tostring     0x00f00018 datablock 0   uv
defcommand apidefinetype   0x00f00019 dword & thandle,...
defcommand apiloaddll    0x00f0001a dword & lhandle,string name
defcommand apicalldll    0x00f0001b dword lhandle,dword thandle,string name,CALLRET int cret=0,FUNCRET int fret=0,...
defcommand GetLastError    0x00f10002  int & errorcode
defcommand SetLastError    0x00f10003 int & errorcode
defcommand GetErrMsg    0x00f10001 int errorcode, ERRMSG string & errormsg
defcommand GetDate     0x00f10012 int & year,int & month,int & day,int & dayofweek,TNHND int tm=0
defcommand GetTime     0x00f10013 int & hour,int & minute,int & second,TNHND int tm=0
defcommand SetFlowParam    0x00f1000c datablock 0 param,INDEX int idx=0xffffffff
defcommand GetFlowParam    0x00f10018 datablock 0 & param,int idx
defcommand GetFlowParamNum   0x00f10019 int & idx
defcommand ClearFlowParam   0x00f10025 
defcommand FlowLog     0x00f1001d int iType,int iCommand,int iLevel,string strLogInfo,string strLogFile
defcommand GetTimeHandle   0x00f1000d int & time
defcommand SetTimeString   0x00f1000e int time,string & tmstr
defcommand OpenMonitorObjector  0x00f10014 int & iHandle,SFLAG int iflag=0,string strGroupName,string strObjectName,...
defcommand SetMonitorObValue  0x00f10015 int iHandle,SFLAG int iflag=0,int idx,datablock 0 uvValue
defcommand GetMonitorObValue  0x00f10016 int iHandle,SFLAG int iflag=0,int idx,datablock 0 & uvValue
defcommand ErrorMsgBox    0x00f1001a string strMsg
defcommand AddMessageInfo   0x00f1001b int id,string strinfo
defcommand GetMessageInfo   0x00f1001c int id,string & strinfo
defcommand FlowTrace    0x00f1001f string strInfo
//defcommand FlowSmardLog    0x00f10022 CHAN int iChannel=0,string szFunction,int & iRetCode,...
defcommand GetRTStructInfo   0x00f10023 datablock 0 rstruct,RET int & ret=0,LINE int & line=0,COLUM int & icol=0,NEXT int & bHasNext=0,HANDLE int & handle=0,SID int & isid=0,CRET int & bHasRet=0,KEY string & szkey='',ERRMSG string & szErrMsg ='',UTYPE int & uType=0
defcommand GetRTStructUnit   0x00f10024 datablock 0 rstruct,int lin,int col,string & unit,...
///////////////////////////////////////////////////////////////////////
//all new command ,id must big than 0x00f10025 
defcommand RegeisterWorker   0x00f10026 int iregisterid,int & suc
defcommand SetBusLogLevel   0x00f10028 int ilevel
defcommand GetAllFlowParam   0x00f10029 ...
defcommand GetBlockUnit    0x00f1002a datablock 0 uv,int first,dword dwtyp,...
defcommand SetBlockUnit    0x00f1002b datablock 0 & uv,int first,dword dwtyp,...
defcommand FindData     0x00f1002c datablock 0 uv,datablock 0 uv1,int first,int & pos
defcommand SetTimeHandle   0x00f1002d int & time,int year,int month,int day,int hour,int minute,int second
defcommand GetTimeDiff    0x00f1002e int tm1,int tm2,DAYS int & day=0,HOURS int & hour=0,MINUTES int & minute=0,SECONDS int & second=0,ALLHOURS int allhours=0,ALLMINUTES int & allminutes=0,ALLSECONDS int & allseconds=0
defcommand InitSmard    0x00f1002f int & suc,string szlib,TIMEOUT int timeout=60,THREADNUM int tnum=1
defcommand InitEdau     0x00f10030 int & suc,TIMEOUT int timeout=60,THREADNUM int tnum=5
defcommand OpenEdauLib    0x00f10031 int & suc,string szLib,string szAlis
defcommand CreateBuffer    0x00f10032 int & obj,MAXL int maxlen=0xffffff,GOODL int goodl=0x2fff,DELTA int delta=0x2fff
defcommand DeleteBuffer    0x00f10033 int obj
defcommand FindInBuffer    0x00f10034 int obj,int len,datablock 0 data,int & pos
defcommand GetFromData    0x00f10035 int obj,int & len,datablock 0 & data 
defcommand PutToData    0x00f10036 int obj,int len,datablock 0 data 
defcommand RemoveData    0x00f10037 int obj,int len
defcommand TextToFax    0x00f10039 int iret,string TxtFileName, string FaxFileName,datablock 0 Style
defcommand BmpToFax     0x00f10038 int iret,string BmpFileName, string FaxFileName,LEFTM int leftm=12
defcommand FaxToBmp     0x00f1003a int iret,string FaxFileName, string BMPFileName
defcommand SetFaxStyle    0x00f1003b datablock 0 & sty,FNAME string fname='宋体',SIZE int size=9,ITALIC int italic=0,UNDERL int iund=0,BOLD int bold=1,CHARSET int cset=0,LEFTM int leftm=12,RIGHTM int rightm=0,ROWSP int rowsp=2
defcommand SetValueData    0x00f1003c string & s1,string s2,int mode
defcommand SetTimeData    0x00f1003d string & s1,string s2,int mode
defcommand SGetDateData    0x00f1003e string & s1,string s2,int mode
defcommand SetWeekData    0x00f1003f string & s1,string s2,int mode

 
洪家明,szhjm@163.net

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -