Skip to main content
Participating Frequently
March 24, 2009
Question

Using 2 FileIO Plug-In

  • March 24, 2009
  • 1 reply
  • 957 views
Hi everyone,

I want to know if there is a way to use two differents implementations of a File IO Plug-In.
I am pretty sure that it is impossible to switch between two FileModule.dll, because they are loaded at server's start.
But, is there a way to have two implementations of the IFmsFileAdaptor interface in the same dll, and to switch dynamically from one to the other ?

Thanks for help !
    This topic has been closed for replies.

    1 reply

    Participating Frequently
    March 24, 2009
    Well, FMS does not support File Plug-in chaining and only one plug-in could be loaded. But You have a complete freedom implementing API, for instance returned handle could be an opaque pointer rather than a file handle. We could suggest you more knowing better your specific task.
    G-Rem44Author
    Participating Frequently
    March 25, 2009
    Actually, I've developed a Plug-In based on the IFmsFileAdaptor interface who allows to stream a file from another application, but for my final application, I want to keep the original way of reading from a local file. So, I want to have to implementations of IFmsFileAdaptor, but sometimes I need to choose between them.
    Participating Frequently
    March 25, 2009
    Yes that is correct way to use it. For instance File plug-in allows you to fetch streaming content from remote HTTP server location. To optimize that you do not need fetch full content every time. You just fetch it once and store locally returning back handle to local file. Next time before that you could send a HEAD request to find out if content was changed and re fetch only changed or new part. Same way you could switch your handle from one content to another if needed you only need to keep state from open to close.