L
licse
Unregistered / Unconfirmed
GUEST, unregistred user!
本人做了一个API,除供VC自己调用外,还要提供给Delphi用户使用,诚心请教,在不用UNICODE情况下,怎样设计VC的类既可以供Vc使用也可以给Delphi使用,以及在Delphi下如何使用,先谢啦!
class __declspec (dllexport) CMessage
{
public:
CMessage();
CMessage(const CMessage &
Msg);
CMessage &
operator = (const CMessage &
Msg);
public:
inline void SetSequence(const USHORT Sequence);
inline void SetDestination(const BYTE Destination = CONSOLE_MODULE);
inline void SetSource(const BYTE Source = OPERATOR_INTERFACE);
inline void SetMsgType(const USHORT MsgType);
inline void SetMsgLen(const USHORT MsgLen);
inline void SetBuf(const PTSTR buf);
inline const USHORT GetSequence() const;
inline const BYTE GetDestination() const;
inline const BYTE GetSource() const;
inline const USHORT GetMsgType() const;
inline const USHORT GetMsgLen() const;
protected:
USHORT len;
USHORT type_id;
BYTE src;
BYTE dst;
USHORT seq;
char buf[100];
};
class __declspec (dllexport) CMessage
{
public:
CMessage();
CMessage(const CMessage &
Msg);
CMessage &
operator = (const CMessage &
Msg);
public:
inline void SetSequence(const USHORT Sequence);
inline void SetDestination(const BYTE Destination = CONSOLE_MODULE);
inline void SetSource(const BYTE Source = OPERATOR_INTERFACE);
inline void SetMsgType(const USHORT MsgType);
inline void SetMsgLen(const USHORT MsgLen);
inline void SetBuf(const PTSTR buf);
inline const USHORT GetSequence() const;
inline const BYTE GetDestination() const;
inline const BYTE GetSource() const;
inline const USHORT GetMsgType() const;
inline const USHORT GetMsgLen() const;
protected:
USHORT len;
USHORT type_id;
BYTE src;
BYTE dst;
USHORT seq;
char buf[100];
};