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

📄 dsmpcsrv.h

📁 Simple Module Procedure Call for windows & QNx
💻 H
字号:
////	(S)imple (M)odule (P)rocedure (C)all////  Version 1.1.3////	SIC Dynamics	Copyright(C) - 1999////  SMPC server declarations//#ifndef __DSMPCSRV_H#define __DSMPCSRV_H#include <smpc/dsmpc.h>// SMPC-Server implementationclass DSmpcServer : public DElement{ protected:  dword sid;  int Cb_About(void*, dword, void*, dword&); public:  DSmpcServer(dword _sid) { sid = _sid; }  virtual ~DSmpcServer() { unlink(); }  DSmpc* Smpc(void) const { return (DSmpc*)list(); }  dword Sid(void) const { return sid; }  dword Sid(dword);  // Server's callback declaration macros#define DEF_SMPC_SRV \  virtual int Call(dword, void*, dword, void*, dword&)  virtual int Call(dword proc, void* sd, dword snd, void* rd, dword& rcv)  { return proc == Smpc_Proc_About ? Cb_About(sd,snd,rd,rcv) : Smpc_Err_Proc; }  // After Call Callback  virtual void PostCall(dword, int) {}  // Overwrite this for your service type  virtual dword Type(void) const { return 0; }  // Overwrite this for your about  virtual char* About(void) const { return 0; }};// Server's callback definition macroses#define BEGIN_SMPC_SRV(T) \int T :: Call(dword proc, void* sd, dword snd, void* rd, dword& rcv) \{ \ switch(proc) { \  case Smpc_Proc_About: return Cb_About(sd,snd,rd,rcv);#define SMPC_PROC(PROC_ID,PROC_NAME) \  case PROC_ID: return PROC_NAME(sd,snd,rd,rcv);#define END_SMPC_SRV(BASE_T) \ } \ return BASE_T::Call(proc,sd,snd,rd,rcv); \} #endif

⌨️ 快捷键说明

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