Interstage Application Server アプリケーション作成ガイド (CORBAサービス編)
目次 索引 前ページ次ページ

第4章 アプリケーションの開発(C言語)> 4.1 クライアントアプリケーションのプログラミング(静的起動インタフェース)

4.1.3 サーバアプリケーションのオブジェクトリファレンスの獲得

 ネーミングサービスのメソッドCosNaming_NamingContext_resolve()により、呼び出すサーバアプリケーションのオブジェクトリファレンスを取り出します。検索したいオブジェクト名を当メソッドのパラメタとして指定します。

  CORBA_Object        obj;     /* サーバアプリケーションのオブジェクトリファレンス */

  name._length = name._maximum = 1;              /* オブジェクト名の数 */
  name._buffer = &name_component;                /* オブジェクト名格納域 */
  name_component.id = "ODdemo::calculator";      /* オブジェクト名 */
  name_component.kind = "";                      /* オブジェクトのタイプ */

  /* サーバアプリケーションのオブジェクトリファレンスを獲得 */
  obj = CosNaming_NamingContext_resolve( cos_naming, &name, &env );

目次 索引 前ページ次ページ

All Rights Reserved, Copyright(C) 富士通株式会社 2005