delphi 转换为 BCB 的问题
各位大侠,下面的几句delphi 代码怎么改为BCB的。
(1)
type
IXMLDOMImplementation = interface;
IXMLDOMImplementationDisp = dispinterface;
(2)
IXMLDOMNamedNodeMapDisp = dispinterface
['{2933BF83-7B36-11D2-B20E-00C04F983E60}']
function removeNamedItem(const name: WideString): IXMLDOMNode; dispid 85;
property item[index: Integer]: IXMLDOMNode readonly dispid 0; default;
property Value:Integer WriteOnly Write fValue Stored True nodefault;
property MyImplClass: TMyImplClass read FMyImplClass implements IMyInterface;
//其中 typeIMyInterface = interface
end;
(3)
IXMLDOMNode = interface(IDispatch)
['{2933BF80-7B36-11D2-B20E-00C04F983E60}']
//....
end;
IID_IXMLDOMImplementation: TGUID = '{2933BF8F-7B36-11D2-B20E-00C04F983E60}';
(4)
function MessageBox(HWnd: Integer; Text, Caption: PChar; Flags: Integer): Integer; external 'user32.dll'; name 'MessageBoxA'; message ID_REFRESH ;abstract; Assembler; cdecl;Dynamic;Export; Far;Forward; Near; overload; override; Pascal; Register; Reintroduce; Safecall; stdcall; varargs; virtual;
//functiong后面是没有这么多修饰词的,还有一些修饰词是不相容的,都是我加上去的.
(5)
package DATAX;
requires rtl, clx;
contains Db, DBLocal, DBXpress;
end.
(6)
Initialization
ActiveX.OleInitialize(nil);
Finalization
ActiveX.OleUninitialize;
(7)
var
PFile:File Of TPerson; // 其中type TPerson=record
(8)
threadvar S: AnsiString;
S := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
(9)
Type
TCol=(cA,cB,cC);
TCols=set of TCol;
??? 这TCols能不能增加、减少元素,如果能对应C++它应该是什么?
[解决办法]
IXMLDOMImplementation 和 IXMLDOMNamedNodeMapDisp 这些在Windows SDK中已经定义,在C++Builder相应的头文件后就可以直接使用.