home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-15 | 1.3 KB | 45 lines | [TEXT/MPS ] |
- {---------------------------------------------------------------}
- { ReplyResultHandler. Used for SlaveTaskHandler }
- { so far, we are using the default buffer strategy.
- To improve: should use a latched version.}
- { © 1991 G. Sawitzki, Heidelberg}
- type
- tReplyResultHandler=object(tMessageHandler)
- function tReplyResultHandler.DoReply(msg:msgPtr;h:handle):OsErr;
- end;
-
- function tReplyResultHandler.DoReply(msg:msgPtr;h:handle):OsErr;
- var myMsg:MsgRec;
- begin
- myMsg:=msg^; {take a local copy}
- with myMsg do begin
- MsgUserRefCon:=0;
- Stamp(@myMsg);
- MsgCoreSize:=GetHandleSize(h);
- if (theConfiguration.UseMessageSizes) & (MsgCoreSize<= theConfiguration.MinCoreSize) then
- MsgCoreSize:=theConfiguration.MinCoreSize;
-
- MsgCorePtr:=NewCorePtr(MsgCoreSize);
-
- if MsgCorePtr<>nil then begin
- BlockMove(h^,MsgCorePtr,GetHandleSize(h));
- hunlock(h);
-
- MsgPrioSize:=sizeof(tMsgHeader);
-
- if (theConfiguration.UseMessageSizes) & (MsgPrioSize<= theConfiguration.MinPrioSize) then
- MsgPrioSize:=theConfiguration.MinPrioSize;
-
- MsgPrioPtr:=NewPrioPtr(MsgPrioSize);
- tMsgHeaderPtr(MsgPrioPtr)^:=tMsgHeaderPtr(msg^.MsgPrioPtr)^;
- tMsgHeaderPtr(MsgPrioPtr)^.ContentsToken:=longint('PICT'); {so far, PICT only}
-
- NetWorkScheduler.ReplyMessage(@MyMsg,cMustBeLaunched);
-
- end;
- DoReply:=NoErr;
- end;{with}
- end;
-
-
-