답변 감사합니다.^^ 근데 동일한 에러가 나네요.
사탄 님이 쓰신 글 :
: PW: TPtrWrapper;
: Mar.Copy(Message.LParam, 0, PW, Length(readData));
: 이렇게 해보세요
:
: 황희성 님이 쓰신 글 :
: : protected override void WndProc(ref Message m)
: : {
: : base.WndProc(ref m);
: : int readLength = m.WParam.ToInt32();
: : byte[] readData = new byte[readLength];
: : Marshal.Copy(m.LParam, readData, 0, readLength);
: : }
: :
: : 위의 코드를 델파이로 컨버팅해야 하는데
: : Marshal.Copy(m.LParam, readData, 0, readLength) 이부분을 어떻게 해야할지 전혀 모르겠습니다.
: : 구글링해도 자료를 못찾겠고. 델파이에도 똑같은 함수가 있긴 하던데 자꾸
: : There is no overloaded version of 'Copy' that can be called with these arguments
: : 이런 에러가 나구요. 고수님들 도움 요청드립니다. 이것만 해결하면 되는데. 2주째 이부분 해결 못해서
: : 발만 동동 구르고 있습니다. 제가 컨버팅 한 소스는 아래와 같습니다.
: :
: : procedure TForm1.WndProc(var Message: TMessage);
: : var
: : readData: array of Byte;
: : readLength: Integer;
: : Mar: TMarshal;
: : begin
: : readLength := Message.WParam;
: : SetLength(readData, readLength);
: : Mar := TMarshal.Create;
: : Mar.Copy(Message.LParam, 0, readData, readLength); <-- 요기서 에러
: : end;
|