ipmsg.h
class tmainwin : public twin packetlog[max_packetlog];
int packetlogcnt;
bool islastpacket(msgbuf *msg);
void seticon(hicon hseticon);
void reverseicon(bool start***);
void entryhost(void);
void exithost(void);
void popup(uint resid);
bool popupcheck(void);
bool addabsencemenu(hmenu hmenu, int insertindex);
void activechildwindow(bool hide=false);
bool taskbar(int nimmode, hicon hseticon = null, lpcstr tip = null);
bool udpevent(lparam lparam);
bool tcpevent(int sd, lparam lparam);
bool checkconnectinfo(connectinfo *coninfo);
inline sendfileobj *findsendfileobj(int sd);
bool startsendfile(int sd);
bool opensendfile(const
char *fname, sendfileobj *obj);
static
dword winapi sendfilethread(void *_sendfileobj);
bool sendfile(sendfileobj *obj);
bool senddirfile(sendfileobj *obj);
bool closesendfile(sendfileobj *obj);
bool endsendfile(sendfileobj *obj);
void broadcastentry(ulong mode);
void broadcastentrysub(ulong addr, int portno, ulong mode);
void broadcastentrysub(hostsub *hostsub, ulong mode);
void terminate(void);
bool senddlgopen(hwnd hrecvwnd = null, msgbuf *msg = null);
void senddlghide(tsenddlg *senddlg);
void senddlgexit(tsenddlg *senddlg);
bool recvdlgopen(msgbuf *msg);
void recvdlgexit(trecvdlg *recvdlg);
void msgdlgexit(tmsgdlg *msgdlg);
void miscdlgopen(tdlg *dlg);
void logopen(void);
void addhost(hostsub *hostsub, ulong command, char *nickname="", char *groupname="");
inline
void sethostdata(host *desthost, hostsub *hostsub, ulong command, time_t now_time, char *nickname="", char *groupname="", int priority=default_priority);
void delallhost(void);
void delhost(hostsub *hostsub);
void delhostsub(host *host);
void refreshhost(bool unremove);
void setcaption(void);
void sendhostlist(msgbuf *msg);
void addhostlist(msgbuf *msg);
ulong hoststatus(void);
void activelistdlg(tlist *dlglist, bool active = true);
void deletelistdlg(tlist *dlglist);
void activedlg(tdlg *dlg, bool active = true);
char *getnicknameex(void);
void initicon(void);
void controlime(twin *win, bool on);
bool setanswerqueue(addrobj *obj);
void executeansqueue(void);
#define key_rebuild 0x0001
#define key_diag 0x0002
bool setupcryptapi(void);
bool setupcryptapicore(int ctl_*** = 0);
void msgbrentry(msgbuf *msg);
void msgbrexit(msgbuf *msg);
void msgansentry(msgbuf *msg);
void msgbrabsence(msgbuf *msg);
void msgsendmsg(msgbuf *msg);
void msgrecvmsg(msgbuf *msg);
void msgreadmsg(msgbuf *msg);
void msgbrisgetlist(msgbuf *msg);
void msgokgetlist(msgbuf *msg);
void msggetlist(msgbuf *msg);
void msganslist(msgbuf *msg);
void msggetinfo(msgbuf *msg);
void msgsendinfo(msgbuf *msg);
void msggetpubkey(msgbuf *msg);
void msganspubkey(msgbuf *msg);
void msggetabsenceinfo(msgbuf *msg);
void msgsendabsenceinfo(msgbuf *msg);
void msgreleasefiles(msgbuf *msg);
void msginfosub(msgbuf *msg);
public:
tmainwin(ulong _nicaddr=inaddr_any, int _portno=ipmsg_default_port, twin *_parent = null);
virtual ~tmainwin();
virtual
bool evcreate(lparam lparam);
virtual
bool evclose(void);
virtual
bool evcommand(word wnotifycode, word wid, lparam hwndctl);
virtual
bool evsyscommand(wparam ucmdtype, word xpos, word ypos);
virtual
bool evtimer(wparam timerid, timerproc proc);
virtual
bool evendsession(bool nsession, bool nlogout);
virtual
bool evqueryopen(void);
virtual
bool evhotkey(int hotkey);
virtual
bool eventbutton(uint umsg, int nhittest, points pos);
virtual
bool eventinitmenu(uint umsg, hmenu hmenu, uint upos, bool fsystemmenu);
virtual
bool eventuser(uint umsg, wparam wparam, lparam lparam);
static
hicon getipmsgicon(void);
};
核心程式設計的資料結構
一 資料型別 1.字串 typedef struct unicode string ushort length 字串的長度 所佔的位元組數 ushort maxinumlength 字串緩衝區的長度 所能佔的最大位元組數 pwstr buffer 字串緩衝區 字串的位址,也即指標 unicode s...
核心資料結構
關於開發驅動重要的核心資料結構,方便自己理解 driver object typedef struct driver object cshort type cshort size 乙個鍊錶,記錄了該驅動建立的所有裝置物件 pdevice object deiceobject ulong flags ...
核心資料結構
核心需要儲存i o元件使用的狀態資訊,可以通過若干核心資料結構比如說檔案開啟表等來完成 unix系統中在讀取乙個使用者檔案的時候,核心需要去檢查下快取,然後再去決定是否執行磁碟i o,在讀乙個程序映象時候,核心只需要從記憶體當中讀取資料,也就是說這些操作都可以呼叫read 函式來完成,但是語義不同 ...