G
gywlily
Unregistered / Unconfirmed
GUEST, unregistred user!
[h2][/h2]COM API[red][/red]
HRESULT Next(
ULONG cConnections, //[in]Number of CONNECTDATA structures
// returned in rgpcd
CONNECTDATA **rgpcd, //[out]Array to receive enumerated
// CONNECTDATA structures
ULONG *pcFetched //[out]Pointer to actual number of
// CONNECTDATA structures
);
其中第三个参数*pcFetched是unsigned long型的,
我在delphi中用时:Next(1, ConnectionData, Fetch),我定义Fetch
是cardinal类型,编译时不能通过,错误提示:Incompatible types: 'Cardinal' and 'PLongint'
请问为什么?
delphi6开发人员指南(p32表)中明明指出C++中的unsigned long和delphi中的cardinal
是类型兼容的。
IEnumConnections的Next方法在msdn中的定义如下:HRESULT Next(
ULONG cConnections, //[in]Number of CONNECTDATA structures
// returned in rgpcd
CONNECTDATA **rgpcd, //[out]Array to receive enumerated
// CONNECTDATA structures
ULONG *pcFetched //[out]Pointer to actual number of
// CONNECTDATA structures
);
其中第三个参数*pcFetched是unsigned long型的,
我在delphi中用时:Next(1, ConnectionData, Fetch),我定义Fetch
是cardinal类型,编译时不能通过,错误提示:Incompatible types: 'Cardinal' and 'PLongint'
请问为什么?
delphi6开发人员指南(p32表)中明明指出C++中的unsigned long和delphi中的cardinal
是类型兼容的。