Hi,

We are using a COTS (Commercial Off the shelf software). This software package has a database and an front-end application. They have provided an API for external applications to access the data from database.This API comes as Windows service.


When i want to programmatically make a connection via API. I create an instance of API and just say connect
Code:
    IAPIPtr m_APIObject;
    m_APIObject.CreateInstance(__uuidof(APIName));
    m_APIObject->Connect("test","test12");
There are 4 external programs we have written to inegrate with the third-party application . Each of these application are self-contained and each of them make their own instance of the API and connect to it. Since we have only API connection license, when one application is running, the remain 3 shut-down.

We want to share the API connection across the programs. Can this be done ? If yes, how can this can be done ?.
Code:
  -----------                       -------------
  |  Prog1 |                     |   Prog2   | 
  |            |                     |               |
   ----------                        -------------
       |                                     |
       |                                     |
      V                                    V
------------------------------------------
|  Common API Connection         |
|                                                  |
-----------------------------------------

Thanks in advance