Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[8345] comdrv32 을 컴파일 하였는데
델초보 [] 1187 읽음    2002-10-08 11:38
WriteFile( FComPortHandle, DataPtr^, nToSend, nSent, nil );

여기서 nil에 Types of actual and formal var parameters must be identical 이라고 나오는데

델파이 6 쓰고 있거든요..

알려주시면 감사하겠습니다.





function TCommPortDriver.SendDataEx( DataPtr: pchar; DataSize, Timeout: UINT ): UINT;
var nToSend, nSent: integer;
   t1: longint;
begin
{ Do nothing if port has not been opened }
Result := 0;
if not Connected then
   exit;
{ Current time }
t1 := GetTickCount;
{ Loop until all data sent or timeout occurred }
while DataSize > 0 do
begin
   { Get TX buffer free space }
   nToSend := OutFreeSpace;
   { If output buffer has some free space... }
   if nToSend > 0 then
   begin
     { Check signals }
     if FCkLineStatus and (GetLineStatus = []) then
       exit;
     { Don't send more bytes than we actually have to send }
     if nToSend > DataSize then
       nToSend := DataSize;
     { Send }
     WriteFile( FComPortHandle, DataPtr^, nToSend, nSent, nil );
     nSent := abs( nSent );
     if nSent > 0 then
     begin
       { Update number of bytes sent }
       Result := Result + nSent;
       { Decrease the count of bytes to send }
       DataSize := DataSize - nSent;
       { Inc. data pointer }
       DataPtr := DataPtr + nSent;
       { Get current time }
       t1 := GetTickCount;
       { Continue. This skips the time check below (don't stop
         trasmitting if the Timeout is set too low) }
       continue;
     end;
   end;
   { Buffer is full. If we are waiting too long then exit }
   if (GetTickCount-t1) > Timeout then
     exit;
end;
end;


파일은 여기에 있습니다..

http://www.kosma.co.kr/~domine/down/vcl/cd320108.zip

+ -

관련 글 리스트
8345 comdrv32 을 컴파일 하였는데 델초보 1187 2002/10/08
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.