P
pascal
Unregistered / Unconfirmed
GUEST, unregistred user!
delphi中:
type
IPorte = interface
['{24F71F58-B71A-4430-86E6-6A4A183D7579}']
function Start(Device:byte) : boolean ;
procedure Shutdown();
function OpenDoor(Addr:byte) : boolean ;
function CloseDoor(Addr:byte) : boolean ;
function GetStatus(Addr:byte;var Status:word) : boolean ;
function GetCount(Addr:byte;
var Count:word) : boolean ;
function Reset(Addr:byte) : boolean ;
end;
翻译成c++:
typedef
__interface INTERFACE_UUID
["{3F969F98-1CC6-443F-9E1D-62AD08933925}"]
IPorte : public IInterface
{
virtual BOOL Start(unsigned char Device);
virtual void Shutdown();
virtual BOOL OpenDoor(unsigned char Addr);
virtual BOOL CloseDoor(unsigned char Addr);
virtual BOOL GetStatusGetStatus(unsigned char Addr,unsigned int *Status);
virtual BOOL GetCount(unsigned char Addr,unsigned int *Count);
virtual BOOL Reset(unsigned char Addr);
}
不对,该怎么写?
type
IPorte = interface
['{24F71F58-B71A-4430-86E6-6A4A183D7579}']
function Start(Device:byte) : boolean ;
procedure Shutdown();
function OpenDoor(Addr:byte) : boolean ;
function CloseDoor(Addr:byte) : boolean ;
function GetStatus(Addr:byte;var Status:word) : boolean ;
function GetCount(Addr:byte;
var Count:word) : boolean ;
function Reset(Addr:byte) : boolean ;
end;
翻译成c++:
typedef
__interface INTERFACE_UUID
["{3F969F98-1CC6-443F-9E1D-62AD08933925}"]
IPorte : public IInterface
{
virtual BOOL Start(unsigned char Device);
virtual void Shutdown();
virtual BOOL OpenDoor(unsigned char Addr);
virtual BOOL CloseDoor(unsigned char Addr);
virtual BOOL GetStatusGetStatus(unsigned char Addr,unsigned int *Status);
virtual BOOL GetCount(unsigned char Addr,unsigned int *Count);
virtual BOOL Reset(unsigned char Addr);
}
不对,该怎么写?