From the developer's perspective, a server application registers itself using the parameter SINGLE_INSTANCE or MULTI_INSTANCE. If the server application is a single-instance application and the client application asks to edit an object, the server DLL opens a document. However, if the application is a multi-instance application, a new instance of the server application will be started by the DLL.
A server application that can only be started from within a client application will normally look for command line switches. A client application DLL will always start with the -Embedding flag; if it is missing, the servers may automatically close. These types of servers are only available for OLE-related operations and they are started using the Insert New command.
11.6.17.1 Saving Clipboard Formats When Closing the Server Application Test Case Svr-30
Precondition
A server application is open.
Procedure
1.Select the object and choose Edit Copy.
2.The object should be in the clipboard. Open the clipboard and check its format.
3.Close the server application
Postcondition
The formats should still be available in the clipboard. If the clipboard does contain formats, they should be in a consistent state with the same order and nature of selection preserved.
11.6.17.2 Starting a Single-Instance Server Application from the File Manager Test Case Svr-31
Precondition
A single-instance server application can be started by double clicking on its icon.
Procedure
Start the server application using various methods such as double-clicking the icon, using File Run in the Program Manager, and using File Manager.
Postcondition
The server application registers itself and any document that it opens.
It should be possible to create a linked object and link to the appropriate item in the server application document.
If an embedded object is created and activated from the client application, the server application should open a new document for editing in the same instance of the server application.
Similar Test Case
Start the server application and give the document name on the command line. If the server application opens the document, verify that the server application registers the open document. A good way to test the registration is as follows:
1.Open the document's linked object in a client application.
2.Establish a link from the client application by double-clicking the object in the client application.
If the document is not registered, OLE will try to open the document.