|
typedef struct <- type
{ <- AType = Record
String a0; <- a0:String;
Byte a1,a2; <- a1,a2:Byte;
String a3; <- a3:String;
} AType <- end;
typedef struct <- type
{ <- CType = Record
String c0[10]; <- c0[10]:String;
Word c1[50]; <- c1[50]:Word;
Integer c2[10]; <- c2[10]:Integer;
Double c3[20]; <- c3[20]:Double;
} CType <- end;
Integer icnt; <- icnt:Integer;
Cardinal cm; <- cm:Cardinal;
AType *A,*B; <- A,B:^AType;
CType C; <- C:CType;
->(1) 아래의 (1)이 부분부터는 대충 바꿔봤는데 cm과 GlobalAlloc함수사이에서 다음과 같은
에러메시지가 나옵니다.
cannot convert 'void*' to 'unsigned int
->(2)에서는 3가지로 에러가 나옵니다.
cannot convert 'unsigned int to 'void*'
type mismatch in parameter 'hMem'(wanted 'void*', got 'unsigned int')
cannot convert 'void*' to 'AType'
icntItem=0; <- icntItem:=0;
icnt:=100; <- icnt:=100;
->(1) cm=GlobalAlloc(GHND,icnt*sizeof(AType));
<- cm:=GlobalAlloc(GHND,icnt*sizeof(AType));
->(2) A=GlobalLock(cm); <- A:=GlobalLock(cm);
B=A; <- B:=A;
<- while not ... do
? begin
<- A^.a0:=C.c0[0];
<- A^.a1:=C.c1[0];
<- A^.a2:=C.c2[1];
<- A^.a3:=C.c3[1];
<- Inc(A);
<- Inc(icntItem);
<- end;
<- A:=B;
<- end;
|