home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------------------------------------
- --
- -- COPYRIGHT:
- -- IBM WorkFrame - Project Smarts
- -- (C) Copyright International Business Machines Corporation 1996
- -- Licensed Material - Program-Property of IBM - All Rights Reserved.
- -- US Government Users Restricted Rights - Use, duplication, or disclosure
- -- restricted by GSA ADP Schedule Contract with IBM Corp.
- --
- --------------------------------------------------------------------------------
- <include prologcp.tde>
-
- #include <stdio.h>
- <if ($DSOM$)>
-
- #include <somd.hh>
- </if>
-
- <if ($DSOM$)>
- #pragma SOMNoDataDirect(on)
- </if>
- <repeat HEADER_NAME>
- #include "$HEADER_NAME$.hh"
- </repeat>
- <if ($DSOM$)>
- #pragma SOMNoDataDirect(pop)
- </if>
-
- int main(int argc, char *argv[])
- {
- <if ($DSOM$)>
- SOMDServer *server;
- </if>
- Environment *__SOMEnv; // This is a special name, don't change it.
-
- //
- // Create SOM environment
- //
- __SOMEnv = SOM_CreateLocalEnvironment();
-
- <if ($DSOM$)>
- //
- // Initialize DSOM run-time environment.
- //
- SOMD_Init(__SOMEnv);
-
- //
- // Get a handle on a proxy to the server named '$SOM_SERVER$'
- //
- server = SOMD_ObjectMgr->somdFindServerByName("$SOM_SERVER$");
-
- if (server)
- {
-
- //======================================================
- // Code to create and manipulate remote client object.
- //======================================================
-
- }
-
- //
- // Resources should be relinquished when finished dealing with remote object.
- // If you wish to destroy both the local proxy and remote object uncomment
- // the two source lines below.
- //
- // if ( NameOfRemoteObject )
- // SOMD_ObjectMgr->somdDestroyObject( NameofRemoteObject );
- //
- // or, if you wish to do not want to destroy the remote object, but only
- // wish to delete the local proxy, uncomment the two source lines below.
- //
- // if ( NameOfRemoteObject )
- // SOMD_ObjectMgr->somdReleaseObject( NameOfRemoteObject );
- //
-
- //
- // Free up resources used by DSOM run-time environment
- //
-
- SOMD_Uninit(__SOMEnv);
- </if>
-
- SOM_DestroyLocalEnvironment(__SOMEnv);
-
- return(0);
- }