I have been playing around with datatypes.library's DTM_WRITE method, and it seems to me to have two main flaws:
1. When calling DTM_WRITE (or via SaveDTObject) the only option is to save to a file on disk.
It would be useful to be able to save to a memory location, maybe one automatically allocated by datatypes.library (as the size of the resulting file will be unknown). This could be handled perhaps the same as reading from memory, where the subclasses believe they have a BPTR to an open file on disk.
2. There appears to be no way to determine whether a subclass supports DTM_WRITE in RAW format.
Something like GetDTMethods which can find out whether a DTObject supports this would be very useful (getting this information from ObtainDataType would be even more useful). At the moment the only way to find out appears to be to try it, and then look at the resulting file and see if it is in the expected format. Not very user-friendly!
The second is probably more important than the first, the lack of any way to find out if a subclass supports writing in their native format might explain why nobody ever uses it.