xenic wrote:
Assuming that dvp = IDOS->GetDeviceProc("Ram:", NULL) worked as it should and that dvp->dvp_Port
is the ram-handler port, then the DOS packet was sent directly to ram-handler. I only saw the result so I have no way
of knowing if it was emulated or not.
There are also other inconsistancies between filesystems.
There are always inconsistencies between filesystems, that's what the dos.library layer tries very hard to
abstract from applications. And now, there are two completely different styles of handlers that can co-exist too.
As far as telling what type of handler you have, that's easy....
if( IDOS->GetFileSystemVectorPort(port,53) ) then it's a vector-port style filesystem handler,
else, it's a dospacket based handler.
If it's a vector-port based filesystem, chucking dospackets down its throat, is not likely to have the expected
response if you do "funny stuff", because it will just say, "what the heck is this thing at my message port ?".
The filesystem will then call dos.library via the fsvp->FSV.DOSEmulatePacket() to try and make sence of what
it found and turn the old dospacket action into an equivalent vector-port function call using the action type
number and parameters supplied in the dospacket. It will then place the result of the function call back into
the result1 and result2 of the same dospacket and return, the filesystem will then ReplyMsg() and you get your
dospacket back, with the two result values. That's the limit of what it does.
Also, it only does it for the standard dospacket action types it expects, if you give an action that is unsupported,
you are likely to get ERROR_ACTION_NOT_KNOWN and a notification requester in your face.
So, the basic moral to this story is, don't do dospacket operations to filesystems from applications anymore.
You will not only slow the calls way way down for VectorPort filesystems, but your application will be limited
to just the packets supported by the dos.library packet emulator and some things like DOS notifications,
DOS record locks and maybe some other features, won't be available to you.
Always call the dos.library API functions when possible, because thats where the compatibility layer and
extended functions and features are located.