I've recently added support for DirectInput force feedback effects to my input framework (yeah, very 1998, but still cool to support). Everything works great, but the one annoyance is that there is no provision for loading an effects file (.ffe) from memory, which means that if you want to use the old SDK effects editor (I knew hoarding those old DXSDK CDs would pay off!), you will have to accept having loose .ffe files in your asset tree instead of tucked away in a pack file.
Now, obviously one could just do their own serialization and manually create the effects; the data structures involved are not complex. However, there is one other desirable behavior of EnumEffectsInFile that is specified via the DIFEF_MODIFYIFNEEDED flag, which "Instructs DirectInput to modify the authored effect, if necessary, so that it plays on the current device.". I'm interested to know what exactly it's doing under-the-covers, so that I might replicate that behavior if I go about doing my own serialization. There are somewhat obvious things, such as discarding invalid axes and what have you, but I'm interested to know if it's doing anything more advanced (modifications aside from discard). Anyone have any experience/knowledge of the inner workings?
The other tack I took on this was to see if there are any (win32) OS mechanisms to make a section of memory available as a "file" openable via normal file routines (sort of the inverse of a memory-mapped file), but I did not come across such a thing. Any thoughts on that idea? Obviously I could do a temp extraction, load, and deletion, but that is rather inelegant and inefficient.