📄 dsmpccli.h
字号:
//
// (S)imple (M)odule (P)rocedure (C)all
//
// Version 1.1.3
//
// SIC Dynamics Copyright(C) - 1999
//
// SMPC client declarations
//
#ifndef __DSMPCCLI_H
#define __DSMPCCLI_H
#include <smpc/dsmpc.h>
// SMPC-Client implementation
class DSmpcClient
{
protected:
DSmpc* smpc;
dword sid;
dword timeout;
int error;
dword type;
public:
DSmpcClient(DSmpc* _smpc, dword _sid = 0, dword _timeout = 0)
{ smpc = _smpc; sid = _sid; timeout = _timeout; error = Smpc_Success; type = 0; }
// Server control
dword Sid(void) const { return sid; }
dword Sid(dword _sid) { return sid = _sid; }
// Timeout control
dword Timeout(void) const { return timeout; }
dword Timeout(dword _timeout) { return timeout = _timeout; }
// SMPC-Call
int Call(dword proc, DSmpcParam* sp = 0, dword sn = 0, DSmpcParam* rp = 0, dword rn = 0)
{ return error = (smpc ? smpc->Call(sid,type = Type(),proc,sp,sn,rp,rn,timeout) : Smpc_Err_System); }
// Get last Call error
int Error(void) const { return error; }
// Get remote server type after Call
dword RemoteType(void) const { return type; }
// Overwrite server type definition
virtual dword Type(void) const { return 0; }
// About server
char* About(char*, unsigned);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -