 Autodocs Libraries:
dos.library AbortPkt AddBuffers AddDosEntry AddPart AddSegment AllocDosObject AssignAdd AssignLate AssignLock AssignPath AttemptLockDosList ChangeMode CheckSignal Cli CliInitNewcli CliInitRun Close CompareDates CreateDir CreateNewProc CreateProc CurrentDir DateStamp DateToStr Delay DeleteFile DeleteVar DeviceProc DoPkt DupLock DupLockFromFH EndNotify ErrorReport ExAll ExAllEnd ExNext Examine ExamineFH Execute Exit FGetC FGets FPutC FPuts FRead FWrite Fault FilePart FindArg FindCliProc FindDosEntry FindSegment FindVar Flush Format FreeArgs FreeDeviceProc FreeDosEntry FreeDosObject GetArgStr GetConsoleTask GetCurrentDirName GetDeviceProc GetFileSysTask GetProgramDir GetProgramName GetPrompt GetVar Info Inhibit Input InternalLoadSeg InternalUnLoadSeg IoErr IsFileSystem IsInteractive LoadSeg Lock LockDosList LockRecord LockRecords MakeDosEntry MakeLink MatchEnd MatchFirst MatchNext MatchPattern MatchPatternNoCase MaxCli NameFromFH NameFromLock NewLoadSeg NextDosEntry Open OpenFromLock Output ParentDir ParentOfFH ParsePattern ParsePatternNoCase PathPart PrintFault PutStr Read ReadArgs ReadItem ReadLink Relabel RemAssignList RemDosEntry RemSegment Rename ReplyPkt RunCommand SameDevice SameLock Seek SelectInput SelectOutput SendPkt SetArgStr SetComment SetConsoleTask SetCurrentDirName SetFileDate SetFileSize SetFileSysTask SetIoErr SetMode SetOwner SetProgramDir SetProgramName SetPrompt SetProtection SetVBuf SetVar SplitName StartNotify StrToDate StrToLong SystemTagList UnGetC UnLoadSeg UnLock UnLockDosList UnLockRecord UnLockRecords VFPrintf VFWritef VPrintf WaitForChar WaitPkt Write WriteChars Include GuruMeditation
|
Docs » Autodocs » dos.library » DoPkt
DoPkt -- Send a dos packet and wait for reply (V36)
result1 = DoPkt(port,action,arg1,arg2,arg3,arg4,arg5) D0 D1 D2 D3 D4 D5 D6 D7 LONG DoPkt(struct MsgPort *,LONG,LONG,LONG,LONG,LONG,LONG)
Sends a packet to a handler and waits for it to return. Any secondary return will be available in D1 AND from IoErr(). DoPkt() will work even if the caller is an exec task and not a process; however it will be slower, and may fail for some additional reasons, such as being unable to allocate a signal. DoPkt() uses your pr_MsgPort for the reply, and will call pr_PktWait. (See BUGS regarding tasks, though). Only allows 5 arguments to be specified. For more arguments (packets support a maximum of 7) create a packet and use SendPkt()/WaitPkt().
port - pr_MsgPort of the handler process to send to. action - the action requested of the filesystem/handler arg1, arg2, arg3, arg4,arg5 - arguments, depend on the action, may not be required.
result1 - the value returned in dp_Res1, or FALSE if there was some problem in sending the packet or recieving it. result2 - Available from IoErr() AND in register D1.
Using DoPkt() from tasks doesn't work in V36. Use AllocDosObject(), PutMsg(), and WaitPort()/GetMsg() for a workaround, or you can call CreateNewProc() to start a process to do Dos I/O for you. In V37, DoPkt() will allocate, use, and free the MsgPort required.
Callable from a task (under V37 and above).
AllocDosObject(), FreeDosObject(), SendPkt(), WaitPkt(), CreateNewProc(), AbortPkt()
|