The DLL interface

A Media Plugin DLL is a plain windows 32 bit DLL. It has to export the one single function “GSCMediaPluginRequest”.

 

PluginRequestResult __stdcallGSCMediaPluginRequest(IGSCMediaPlugin* pluginHandler,

PluginRequest request)

{

}

 

During startup the GeViScope server searches for all DLLs in the sub folder “MediaPlugins” relative to “GSCServer.EXE”. All DLLs that export the GSCMediaPluginRequest function are accepted as a plugin.

The server calls the function three times: First time for initialization, second time for registering devices. After devices had been registered, they run autonomic in a thread. Each device has its own thread in the server process. During the shutdown of the server the function is called the third time. Here deinitialization takes place.

 

The following example (in pseudo code)should demonstrate this:

 

switch (request)

{

case prPluginInitialize:

 // initialize all devices

 case prPluginRegisterDevices:

 // register and start devices

 case prPluginDeinitialize:

 // deinitialize all devices

 

}