home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / makedce1.zip / MAKEDCE.INF (.txt) < prev    next >
OS/2 Help File  |  1995-04-20  |  258KB  |  5,007 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Version Notice ΓòÉΓòÉΓòÉ
  3.  
  4. First Edition (December 1993) 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions; therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication.  IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for copies of this publication and for technical information about IBM 
  27. products should be made to your IBM Authorized Dealer or your IBM Marketing 
  28. Representative. 
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ 2. Authors ΓòÉΓòÉΓòÉ
  32.  
  33.             Uri Shani and Israel Gold
  34.  
  35.     IBM Israel Haifa Research Laboratory
  36.     MATAM - Center for Advance Technology
  37.     Haifa, Israel 31905
  38.  
  39.     phone: (+972)4-296-282
  40.     VNET: SHANI at HAIFASC3
  41.     email: shani@vnet.ibm.com
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 3. Notices ΓòÉΓòÉΓòÉ
  45.  
  46. References in this publication to IBM products, programs, or services do not 
  47. imply that IBM intends to make these available in all countries in which IBM 
  48. operates. Any reference to an IBM licensed program in this publication is not 
  49. intended to state or imply that only IBM's licensed program may be used. Any 
  50. functionally equivalent product, program or service that does not infringe any 
  51. of IBM's intellectual property rights may be used instead of the IBM product, 
  52. program, or service. Evaluation and verification of operation in conjunction 
  53. with other products, except those expressly designated by IBM, is the user's 
  54. responsibility. 
  55.  
  56. IBM may have patents or pending patent applications covering subject matter in 
  57. this document. The furnishing of this document does not give you any license to 
  58. these patents. You can send license inquiries, in writing, to the IBM Director 
  59. of Commercial Relations, IBM Corporation, Purchase, NY 10577. 
  60.  
  61. This publication contains examples of data and reports used in daily business 
  62. operations. To illustrate them as completely as possible, the examples include 
  63. the names of individuals, companies, brands, and products. All of these names 
  64. are fictitious and any similarity to the names and addresses used by an actual 
  65. business enterprise is entirely coincidental. 
  66.  
  67. The following terms, denoted by an asterisk (*), used in this publication, are 
  68. trademarks or service marks of IBM Corporation in the United States or other 
  69. countries: 
  70.  
  71. ZDDDDDDDDDDDDBDDDDDDDDDDDDBDDDDDDDDDDDD?
  72. 3 AIX     3 IBM     3 OS/2    3
  73. @DDDDDDDDDDDDADDDDDDDDDDDDADDDDDDDDDDDDY
  74. The following terms, denoted by two asterisks (**), used in this publication, 
  75. are trademarks or service marks of other corporations: 
  76.  
  77. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDD?
  78. 3 Open Software Foundation  3 OSF     3
  79. @DDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDY
  80.  
  81.  
  82. ΓòÉΓòÉΓòÉ 4. Preface ΓòÉΓòÉΓòÉ
  83.  
  84. This book introduces you to two newly developed tools that are designed to 
  85. simplify the development of client-server applications for the Distributed 
  86. Computing Environment* (DCE). These tools are provided in MakeDCE. MakeDCE 
  87. tools complement the DCE basic toolset and are operational on both OS/2* and 
  88. AIX* platforms. 
  89.  
  90. This book describes the DCE MakeDCE tools, what they do and how to use them. 
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ 4.1. Audience ΓòÉΓòÉΓòÉ
  94.  
  95. This book is intended for DCE application developers or programmers needing to 
  96. convert existing applications for DCE. The book assumes you have a working 
  97. knowledge of DCE and its requirements. 
  98.  
  99.  
  100. ΓòÉΓòÉΓòÉ 4.2. Purpose ΓòÉΓòÉΓòÉ
  101.  
  102. After reading this manual, you will 
  103.  
  104. o Understand the relationship of MakeDCE tools to DCE. 
  105. o Understand how the MakeDCE tools do their job. 
  106. o Be able to use the MakeDCE tools effectively. 
  107.  
  108.  
  109. ΓòÉΓòÉΓòÉ 4.3. Organization of this Document ΓòÉΓòÉΓòÉ
  110.  
  111. The book is organized as follows: 
  112.  
  113. o MakeDCE - DCE Application Development Tools, gives you an overview of DCE and 
  114.   the roles played by MakeDCE tools.  It introduces the two MakeDCE tools: 
  115.   idlgen and gluegen. 
  116.  
  117. o idlgen - An IDL Extractor, describes the workings of idlgen and provides 
  118.   complete instructions (along with several examples) on how to use it. 
  119.  
  120. o gluegen - Glue-Code Generator, describes the workings of gluegen and provides 
  121.   complete instructions (along with several examples) on how to use it. 
  122.  
  123. o idlgen Messages, lists the messages produced by idlgen. 
  124.  
  125. o gluegen Messages, lists the messages produced by gluegen. 
  126.  
  127. o gluelib Messages, lists the gluelib messages. 
  128.  
  129. A glossary and index are also included. 
  130.  
  131. Note:  Examples in the book are shown for the AIX environment.  Remarks in 
  132.        parentheses explain the slight differences needed for the OS/2 
  133.        environment. 
  134.  
  135.  
  136. ΓòÉΓòÉΓòÉ 4.4. Related Documents ΓòÉΓòÉΓòÉ
  137.  
  138. For information about the DCE environment in general, and DCE application 
  139. development in particular, refer to the following documents: 
  140.  
  141. o OSF DCE Introduction to DCE 
  142.  
  143. o OSF DCE User's Guide and Reference 
  144.  
  145. o OSF DCE Application Development Guide 
  146.  
  147.  
  148. ΓòÉΓòÉΓòÉ 5. MakeDCE - DCE Application Development Tools ΓòÉΓòÉΓòÉ
  149.  
  150. MakeDCE is a set of productivity tools that speed up the development of DCE 
  151. client-server applications and relieve the developer from details. MakeDCE 
  152. tools complement the DCE basic toolset and are operational on OS/2* and AIX* 
  153. platforms. 
  154.  
  155. DCE applications can be developed by retrofitting existing (old) applications 
  156. to the client-server model or by writing new applications from scratch. In 
  157. either case, the developer has to write Interface Definition Language (IDL) 
  158. files for the server side of the application. It is beneficial, therefore, to 
  159. separate the application logic into DCE-independent and DCE-specific sections. 
  160. It is also useful to separate the algorithmic part of the application from its 
  161. DCE-administration aspects (where the server runs, how to advertise it, how to 
  162. bind a client to it, and so on). In all cases, a tool to help develop IDL files 
  163. and maintain them against their corresponding application sources is desirable. 
  164.  
  165. MakeDCE provides two tools: idlgen and gluegen. 
  166.  
  167. o idlgen is instrumental in developing IDL files from C files and in 
  168.   maintaining the affinity between these two types of separate, though 
  169.   parallel, sources. 
  170. o gluegen is instrumental in bringing the DCE services into the application 
  171.   using a small high-level specification language which frees the programmer 
  172.   from using DCE runtime support. 
  173.  
  174. idlgen is a compiler that reads IDL and C sources and produces a new, modified 
  175. IDL file. idlgen extracts the interface-relevant information from its input 
  176. files and checks that all relevant declarations are present and do not 
  177. introduce any conflicts. Wherever needed, idlgen generates IDL attributes and 
  178. declarations, and when needed it converts IDL-incompatible constructs in C into 
  179. equivalent IDL-compatible constructs. idlgen incorporates into IDL files the 
  180. changes made to their corresponding C sources, and vice versa.  It analyzes 
  181. implications of changes made to the IDL file by the user. 
  182.  
  183. To use idlgen to develop an IDL file from a collection of C sources, take the 
  184. following steps: 
  185.  
  186.  1. Decide the functions that will become IDL operations. 
  187.  2. Invoke idlgen to generate an IDL file. 
  188.  3. Verify that the generated file answers the requirements. 
  189.  
  190. An application developed with idlgen can be coupled with a non-DCE equivalent 
  191. that runs on a single processor, while a distributed DCE version is maintained 
  192. in parallel and shares many C sources. 
  193.  
  194. gluegen is a complementing tool that generates the glue or coupling device. 
  195. Together with the stubs generated by the idl compiler, gluegen can make up an 
  196. operational and meaningful DCE application.  This is depicted in MakeDCE flow 
  197. diagram. 
  198.  
  199. This chapter discusses DCE in general and its requirements.  Later chapters 
  200. will discuss MakeDCE and how it can help the application developer. 
  201.  
  202.  
  203. ΓòÉΓòÉΓòÉ 5.1. DCE Background ΓòÉΓòÉΓòÉ
  204.  
  205. The Open System Foundation** (OSF**) DCE manuals and development guides 
  206. describe DCE RPC programming. A central component of the DCE RPC mechanism is 
  207. the communication handle, which allows clients to invoke remote operations in 
  208. servers.  To establish a handle on the client side, the client has to bind 
  209. itself to a server somewhere on the communication network. The server must be 
  210. running on that network and has to be listening for incoming calls. The server 
  211. could also register itself on a DCE directory service of one kind or another. 
  212.  
  213. Both the client and server sides must perform numerous operations to obtain a 
  214. legal handle.  The approach presented here organizes the relevant information 
  215. in objects and defines a few high-level, generic operations (methods) on these 
  216. objects. If the communication handle is not needed explicitly, there is very 
  217. little DCE-oriented activity in the application code. Otherwise, a reference to 
  218. a DCE communication handle can be obtained from these objects. 
  219.  
  220.  
  221. ΓòÉΓòÉΓòÉ 5.2. DCE Application Models ΓòÉΓòÉΓòÉ
  222.  
  223. DCE building blocks for distributed applications allow the development of 
  224. rather complicated and intricate solutions. An operational DCE application is 
  225. best represented in the general case as a dynamic graph consisting of nodes and 
  226. links. Nodes are client and server programs, each running on some machine, and 
  227. links are bindings between clients and servers. A link can represent a 
  228. potential binding between two nodes, a connection, or an on-going remote 
  229. procedure call (RPC). It is essential to emphasize that in DCE, a link is 
  230. represented by means of an interface, as described in a particular IDL file. 
  231.  
  232. The topology of an application can change while it is running. Nodes can appear 
  233. and disappear, move (that is, be assigned to different hosts at different 
  234. times), connect and disconnect in various ways, have multiple connections at a 
  235. time, gain parallel access or be serialized, and so on. The most general 
  236. situation can only be implemented by coding a program in a general-purpose 
  237. language that uses the DCE RPC primitives. 
  238.  
  239. Although the general task of DCE programming is very broad, a formal 
  240. description of this task is needed so that generic templates can be prepared 
  241. ahead of time and can be used to easily build useful DCE applications in a 
  242. short time. 
  243.  
  244. Two domains are observed in DCE applications: 
  245.  
  246. Static node domain - Represents the static part of DCE applications where each 
  247.                     DCE node can be described by the potential connections it 
  248.                     can have with the rest of the world. 
  249. Dynamic node domain - Represents the dynamic behavior of DCE applications where 
  250.                     connections can be defined and formed dynamically. 
  251.  
  252. An Application level exists where both dynamic and static domains can coexist, 
  253. and an Interface level exists, which can be static, dynamic, or both (at 
  254. different times). 
  255.  
  256. The  static domain of DCE applications is demonstrated by Distributed 
  257. Application Graph. A distributed application can be viewed as a directed graph 
  258. of Application Nodes. An edge in the graph represents a collection of 
  259. operations that can use RPC.  It is named after the DCE interface describing 
  260. these operations. The edge arrowhead represents the direction of an RPC; an 
  261. edge directed from node B to node A specifies that interface is imported by 
  262. node B (source of edge) and exported by node A (target of edge). 
  263.  
  264. When an application node imports a given interface, it is said to be a client 
  265. of that interface.  When it exports a given interface, it is said to be a 
  266. server of that interface. An application node cannot import and export the same 
  267. interface. 
  268.  
  269. To summarize, there are two major goals: 
  270.  
  271. o To define the details of a single interface (link) between DCE nodes of which 
  272.   the IDL file is a major component. 
  273.  
  274. o To combine multiple interfaces into DCE applications. 
  275.  
  276. Given a distributed application graph, it can be described by an Interface 
  277. Mapping Table that lists for each application node the interface that is 
  278. exported or imported by it. For example, the following is the interface mapping 
  279. table of the Distributed Application Graph. 
  280.  
  281. ZDDDDDDDDDDDDDDBDDDDDDDDBDDDDDDDDBDDDDDDDDBDDDDDDDD?
  282. 3 Interface   3 Node A 3 Node B 3 Node C 3 Node D 3
  283. CDDDDDDDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDD4
  284. 3 I1      3 Im   3 Im   3     3 Ex   3
  285. CDDDDDDDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDD4
  286. 3 I2      3 Ex   3 Im   3 Ex   3 Im   3
  287. CDDDDDDDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDD4
  288. 3 I3      3 Ex   3     3     3 Im   3
  289. CDDDDDDDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDDEDDDDDDDD4
  290. 3 I4      3     3 Im   3 Ex   3     3
  291. @DDDDDDDDDDDDDDADDDDDDDDADDDDDDDDADDDDDDDDADDDDDDDDY
  292.  
  293.  
  294.           Legend:
  295.        Im - Imported interface
  296.        Ex - Exported interface
  297.  
  298. Interface mapping table. 
  299.  
  300. A single application node can be an importer, an exporter, or an 
  301. importer-exporter of multiple interfaces.  Moreover, a particular interface can 
  302. be exported by several application nodes. In the example, interface I2 is 
  303. exported by nodes A and C. 
  304.  
  305.  
  306. ΓòÉΓòÉΓòÉ 5.2.1. Application Node Types ΓòÉΓòÉΓòÉ
  307.  
  308. Application nodes are characterized by the combination of interfaces they 
  309. import, export, or both. The following node types are defined: 
  310.  
  311. ZDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDBDDDDDDDDDDDDDD?
  312. 3 Case Number  3 Node Type      3 Num of    3 Num of    3
  313. 3        3           3 Exports    3 Imports.   3
  314. CDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDEDDDDDDDDDDDDDD4
  315. 3 1       3 Server       3 1       3 0       3
  316. CDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDEDDDDDDDDDDDDDD4
  317. 3 2       3 Client       3 0       3 1       3
  318. CDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDEDDDDDDDDDDDDDD4
  319. 3 3       3 M-Server      3 Multiple   3 0       3
  320. CDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDEDDDDDDDDDDDDDD4
  321. 3 4       3 M-Client      3 0       3 Multiple   3
  322. CDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDEDDDDDDDDDDDDDD4
  323. 3 5       3 M-Client-Server   3 Multiple   3 Multiple   3
  324. @DDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDADDDDDDDDDDDDDDY
  325.  
  326. DCE Application Node Types. 
  327.  
  328. The node types are the following: 
  329.  
  330. Server node - An application node that exports a single interface. 
  331. Client node - An application node that imports a single interface. 
  332. M-server node - An application node that exports multiple interfaces. 
  333. M-client node - An application node that imports multiple interfaces. 
  334. M-client-server node - An application node that exports and imports multiple 
  335.           interfaces. MakeDCE supports only a specific M-client-server node 
  336.           type, which is termed a chaining-server.  See The Glue APIs for more 
  337.           information. 
  338.  
  339. For example, the following are displayed in Distributed Application Graph: 
  340.  
  341. o Node C is an M-server. 
  342.  
  343. o Node B is an M-client. 
  344.  
  345. o Nodes A and D are M-client-servers. 
  346. The general view of an M-client-server node is as follows: 
  347.  
  348. M-Client-Server Application Node 
  349.  
  350.  
  351. ΓòÉΓòÉΓòÉ 5.3. MakeDCE Operational Environment ΓòÉΓòÉΓòÉ
  352.  
  353. When introducing an application into the DCE environment, you, as a DCE 
  354. applications programmer, are responsible for writing the IDL file that enables 
  355. the server to export the appropriate operations in response to the client RPC. 
  356. You have to ensure that functions in the server correctly correspond to the 
  357. exported operations. 
  358.  
  359. Then you have to create the glue that binds the client and the server together. 
  360. This entails producing application interface code through which the client can 
  361. access the application by calling the server. 
  362.  
  363. MakeDCE provides you with two tools that simplify the work involved in creating 
  364. the IDL file and glue code: 
  365.  
  366. o idlgen 
  367.  
  368. o gluegen 
  369.  
  370.  
  371. ΓòÉΓòÉΓòÉ 5.3.1. idlgen ΓòÉΓòÉΓòÉ
  372.  
  373. MakeDCE idlgen is a powerful tool that aids you in developing an IDL file from 
  374. a set of C source files. 
  375.  
  376. In DCE terms, the set of C source files constitutes the front end of interface 
  377. implementation, which is also termed the manager of a server. The source files 
  378. can be a new application that you are developing.  It can also be an existing 
  379. application that needs to be retrofitted for a DCE client-server application 
  380. that also needs changes because of limitations in the DCE client-server runtime 
  381. conditions. 
  382.  
  383. MakeDCE supports this process with the idlgen tool, which scans C sources and 
  384. extracts declarations relevant to the IDL development from them. 
  385.  
  386. When you invoke idlgen, an iterative process evolves in which the IDL file is 
  387. refined. At various points in the process, idlgen offers you information about 
  388. the IDL syntax and legal possibilities. Whenever the C sources are modified or 
  389. the IDL file is edited, the files are matched against each other to recover and 
  390. report any conflicts. 
  391.  
  392. Conflicts can cause runtime errors when an implementation of an exported 
  393. operation and its definition in the IDL file do not agree. For instance, if the 
  394. application uses global variables, which are not supported in DCE, idlgen 
  395. issues a warning to draw your attention to this problem. 
  396.  
  397. idlgen does not introduce a new language to learn; rather, it aids you in 
  398. learning the IDL language.  In fact, you can learn what you need to know of IDL 
  399. while developing your first DCE Server using idlgen. 
  400.  
  401. Although there is no new language to learn, idlgen does introduce some meta 
  402. comments that help to maintain information in the IDL file relevant to the C 
  403. sources but which the idl compiler does not process. 
  404.  
  405.  
  406. ΓòÉΓòÉΓòÉ 5.3.2. gluegen ΓòÉΓòÉΓòÉ
  407.  
  408. The MakeDCE gluegen tool enables you to generate the glue code necessary to 
  409. make a complete client-server application.  For this you need to provide 
  410. gluegen with a description of the application topology.  You define the 
  411. application topology using a set of parameters.  Some of the parameters are 
  412. detailed in the DCE documentation; others are specific to gluegen. 
  413.  
  414. The parameters are organized in two levels: Interface Profile and Application 
  415. Profile. gluegen uses a simple formal language, Application Profile (APF), to 
  416. compound these parameters and use them to generate glue code, which performs 
  417. the desired job. 
  418.  
  419.  
  420. ΓòÉΓòÉΓòÉ 5.3.3. MakeDCE Process Flow ΓòÉΓòÉΓòÉ
  421.  
  422. The typical processing path of MakeDCE is depicted in MakeDCE flow diagram. A 
  423. simple C program such as 
  424.  
  425.      f(a,b){return a+b;}
  426. can provide an immediate demonstration of generating a legal IDL file by idlgen 
  427. as follows. 
  428.  
  429. User
  430.                     echo 'f(a,b){return a+b;}' | idlgen -id -o immediate.idl
  431.  
  432. System
  433.                     MakeDCE 1.0 - Enabling tool for DCE
  434.                     IBM Corporation (c) 1992
  435.  
  436.                     No input file - reading from standard input
  437.                     Processing file '-stdin'...... C source file.
  438.                     Output idl file is 'standard output (stdout)'.
  439.                     Successful completion
  440.  
  441. The following IDL file is produced. 
  442.  
  443. User
  444.                     type immediate .idl
  445.  
  446. System
  447.                     interface noname {
  448.                     /*@;****************************************************************
  449.                         * This file built with the MakeDCE facility for DCE ver 1.0    *
  450.                         *     - A DCE Application-Development Enabling Tool            *
  451.                         *                                                              *
  452.                         * Initially generated on Sun Jan 31 08:45:12 1993              *
  453.                         *         Last update on Sun Jan 31 08:45:12 1993              *
  454.                         *                                                              *
  455.                         * IBM Corporation 1992                                         *
  456.                         ****************************************************************/
  457.                     /*@[export] f ;     file -stdin */
  458.  
  459.                     long int f (
  460.                        [  in] long int a,
  461.                        [  in] long int b
  462.                     );
  463.  
  464.                     }
  465.  
  466.  
  467. ΓòÉΓòÉΓòÉ 6. idlgen - An IDL Extractor ΓòÉΓòÉΓòÉ
  468.  
  469. The idlgen tool enables you to update old IDL files to accommodate improved 
  470. existing applications or to generate IDL files for new applications. It is a 
  471. language translator that takes source files (C and IDL) as input and outputs a 
  472. new IDL source file - ready for the idl compiler. 
  473.  
  474. You invoke idlgen from the command line.  A number of command line options and 
  475. switches are available for tailoring idlgen operations. 
  476.  
  477. This chapter describes the idlgen tool in terms of what it does and how you use 
  478. it. 
  479.  
  480.  
  481. ΓòÉΓòÉΓòÉ 6.1. idlgen Operation ΓòÉΓòÉΓòÉ
  482.  
  483. The purpose of this section is to give you some background into the inner 
  484. workings of idlgen. This will enable you to make optimum use of the command and 
  485. its various switches.  Also, it will help you to understand the results that 
  486. you get from running idlgen. 
  487.  
  488. idlgen data and control flow is a schematic of idlgen operation. 
  489.  
  490.  
  491. ΓòÉΓòÉΓòÉ 6.1.1. Parse Command Line Parameters ΓòÉΓòÉΓòÉ
  492.  
  493. The general format of the idlgen command is idlgen input-files switches 
  494. (complete details of all switches are given in The idlgen Command Syntax).  You 
  495. can enter the command with only the input specified, with the input and one or 
  496. more switches, or with no parameters at all. 
  497.  
  498. The command you enter is scanned for: 
  499.  
  500. o Correct syntax 
  501. o Input source 
  502. o Output destination 
  503. o Command switches. 
  504.  
  505. If there is a syntax error, idlgen gives you an error message and exits without 
  506. incident. 
  507.  
  508. Input Source 
  509.  
  510. The input source can be either files or standard input. 
  511.  
  512. You can enter a list of file names.  idlgen determines that they are input file 
  513. names because they are not preceded by any switch triggering character.  The 
  514. input files can be either C source files, IDL files, or both. idlgen checks 
  515. that each file exists and builds a file name list, which it reads sequentially. 
  516.  
  517. If you invoke idlgen specifying -stdin, standard input is considered as the 
  518. input file (in fact, if you invoke idlgen without any parameters at all, idlgen 
  519. automatically assumes standard input as the input source). 
  520.  
  521. Using the standard input as the source enables you to pipe the output of 
  522. another command into idlgen. 
  523.  
  524. Output Destination 
  525.  
  526. The output of idlgen is always a single IDL file. If you do not specify 
  527. otherwise, idlgen writes its output to the standard output.  Using the -o 
  528. switch with a file name, you can designate a file name that idlgen writes the 
  529. data into.  Using -o by itself causes idlgen to overwrite the input IDL file 
  530. with the new data. 
  531.  
  532. Command Switches 
  533.  
  534. idlgen checks all the command switches that you included in the command line 
  535. and sets its actions accordingly. Complete details on all of the command 
  536. switches are found in The idlgen Command Syntax. 
  537.  
  538. Getting Help 
  539.  
  540. idlgen provides you with several aids: 
  541.  
  542. o Entering the command idlgen -help (or -h) displays an extended help providing 
  543.   short descriptions of all command line switches, their format, parameters, 
  544.   and use. 
  545.  
  546. o Entering the command idlgen -confirm displays the currently active switches 
  547.   and their values. 
  548.  
  549. o Including the switch -v in the command line puts idlgen in the verbose mode 
  550.   that prints informational messages while idlgen is running.  The verbose mode 
  551.   is the idlgen default mode, so you need to include -v only if you have 
  552.   previously turned the mode off (by means of +v). 
  553.  
  554.  
  555. ΓòÉΓòÉΓòÉ 6.1.2. Parse Source Files ΓòÉΓòÉΓòÉ
  556.  
  557. To prepare files for input, you need to know what idlgen expects. 
  558.  
  559. The idlgen source file parser consists of grammar rules, semantic actions, and 
  560. a symbol table manager.  However, the parser's grammar rules relate only to 
  561. certain elements of C and IDL syntax.  Consequently, you cannot depend on it to 
  562. detect all C or IDL syntax errors.  idlgen assumes the following about the 
  563. input files: 
  564.  
  565. o The C file is correct in the sense that a C compiler will not report any 
  566.   syntax or semantic errors. 
  567.  
  568. o The C file is preprocessed so that all macros and #include directives have 
  569.   been expanded (idlgen pre-activates the C preprocessor internally). 
  570.  
  571. o The IDL file is correct or is a product of idlgen. 
  572.  
  573. The parser parses declarations only at the file level.  This is the only level 
  574. in an IDL file.  In C files, the body of functions is ignored. Each declaration 
  575. is internally represented in a data structure that can accommodate the extended 
  576. information as defined for IDL. When a C declaration is parsed, the IDL-related 
  577. fields remain empty. 
  578.  
  579. Whenever an IDL file imports another IDL file, the name is searched through the 
  580. list of paths (if the -I switch is included) built in the first stage. Symbols 
  581. defined in import files are marked as such and do not become part of the 
  582. generated IDL file. These symbols are used, however, to resolve internal 
  583. declaration dependencies. 
  584.  
  585. Each declaration entered into the symbol table is attached to a name.  Symbols 
  586. in the symbol table are the following: 
  587.  
  588. o Names of variables and functions in C and operations in IDL 
  589.  
  590. o Typedefs in IDL and C 
  591.  
  592. o Tag names of aggregates (like struct, union, and enum) in C (see also 
  593.   Aggregate C Types) 
  594.  
  595. o enum fields 
  596.  
  597. o Names of constants in IDL 
  598.  
  599. o Interface names 
  600.  
  601. o Import file names. 
  602.  
  603. Each symbol is associated with two separately maintained structures: 
  604.  
  605. o Structures associated with the symbol, coming from C files 
  606. o Structures associated with the symbol, coming from the IDL file. 
  607.  
  608. If the same symbol is defined more than once in the C files, the latest version 
  609. takes precedence. A symbol can be defined more than once when you scan multiple 
  610. C files, all of which include the same header file. The old and new data are 
  611. compared, however, and a warning is reported if incompatibilities are found 
  612. (see also Type Matching). The file name and line number where the symbol is 
  613. defined are also recorded. 
  614.  
  615. Constants can have numeric values.  In this case, the values are computed and 
  616. stored both numerically and as a character-string representation of the value. 
  617.  
  618. For C, array sizes are also computed and stored in their numerical values, as 
  619. well as in their character-string representation. See also The Case of sizeof() 
  620. and enum-items for more information. 
  621.  
  622. For functions in C and operations in IDL having parameters, the parameters are 
  623. not stored in the symbol table but are link-listed to the data associated with 
  624. the function (or operation) name. 
  625.  
  626. For aggregate-type fields, the fields are not listed in the symbol table but, 
  627. like function parameters, are link-listed to the data associated with the tag 
  628. name of the type definition. 
  629.  
  630. For objects not directly stored as symbols in the symbol table (such as 
  631. function parameters and aggregate fields), file names and line numbers are 
  632. associated with them for error reporting, if needed. 
  633.  
  634. Comments in IDL files are stored for the main IDL file only so that they can be 
  635. reproduced when the output IDL file is generated. When comments are reproduced, 
  636. they always occupy their own line. However, changes to the IDL files can cause 
  637. misses and redundancies in the reproduction of comments. 
  638.  
  639.  
  640. ΓòÉΓòÉΓòÉ 6.1.3. Check and Modify ΓòÉΓòÉΓòÉ
  641.  
  642. idlgen performs the check and modify activity only if there is an input IDL 
  643. file that has at least one declaration in its interface body. Otherwise, it 
  644. skips this activity and begins generating a new IDL file (see Generate IDL 
  645. File). 
  646.  
  647. The first step for idlgen in this activity is to mark all symbol table entries 
  648. relevant to the IDL being generated. It does this by first scanning all symbols 
  649. of variables, functions, and operations that are declared in the input C 
  650. sources or in the IDL input file.  idlgen mards as relevant those it finds that 
  651. are marked export and not marked noexport in the meta comment of the IDL file. 
  652. idlgen warns you whenever it finds names of global variables not marked 
  653. noexport. 
  654.  
  655. idlgen goes over each marked name until all symbols needed by the interface are 
  656. marked. Each marked symbol (of function, operation, typedef, or aggregate type) 
  657. is checked by comparing the associated IDL data with the associated C data.  If 
  658. either of these structures is missing, idlgen takes one of the following 
  659. actions: 
  660.  
  661. o If the IDL part is missing, a default IDL definition is generated.  It 
  662.   consists of a basic template, the details of which you might need to fill in 
  663.   later. idlgen puts in special IDL keywords to prevent the IDL compiler from 
  664.   processing the file until you have corrected the missing definition.  See 
  665.   Special New IDL Keywords. 
  666.  
  667.   You can disable the insertion of the keywords by using the command line 
  668.   switch -d. 
  669.  
  670. o If the symbol is missing in the C data, idlgen assumes that the symbol is 
  671.   unique to the IDL file and is legal as is. 
  672.  
  673. If both C and IDL data are present, idlgen compares the definitions in both for 
  674. inconsistencies and reports any that it finds.  You can control the comparisons 
  675. and actions taken by including either the -conformC or the -conformIDL switch 
  676. on the command line. 
  677.  
  678.  
  679. ΓòÉΓòÉΓòÉ 6.1.4. Generate IDL File ΓòÉΓòÉΓòÉ
  680.  
  681. idlgen generates two types of IDL files, depending on the input it had to work 
  682. on.  The types are: 
  683.  
  684. o Initial IDL File 
  685. o Modified IDL File 
  686.  
  687.  
  688. ΓòÉΓòÉΓòÉ 6.1.4.1. Initial IDL File ΓòÉΓòÉΓòÉ
  689.  
  690. idlgen generates an initial IDL file if you have not entered an IDL file for 
  691. input or if the interface body of the input IDL file is empty. For initial 
  692. interface files, idlgen generates meta comments (see Meta Comments in IDL 
  693. Files) for all global symbols found in the input C source files. For function 
  694. symbols, an export line is generated, with a comment indicating the C input 
  695. file it came from. For global variables, a noexport line is generated, also 
  696. with a comment indicating the C input file it came from. 
  697.  
  698. You can have idlgen ignore all globals by using the -g switch. You can skip the 
  699. initial IDL file stage with the -i switch. 
  700.  
  701. The notion of an initial IDL file is encountered also when the file is modified 
  702. and new symbols are introduced. The later situation can occur, for instance, 
  703. when an IDL file is modified against a new C file, which is different from the 
  704. C file used originally to generate the IDL file. 
  705.  
  706.  
  707. ΓòÉΓòÉΓòÉ 6.1.4.2. Modified IDL File ΓòÉΓòÉΓòÉ
  708.  
  709. For an IDL file with an interface body that is not empty, idlgen generates a 
  710. modified IDL file.  idlgen scans the symbol table and outputs a legal IDL file 
  711. (unless the input IDL file has undergone the process described in Check and 
  712. Modify and has the special keywords embedded in it). 
  713.  
  714. idlgen re-generates all meta comments and re-enters all regular comments into 
  715. their proper places as much as possible. 
  716.  
  717. The IDL file that idlgen outputs has a pretty-print style that, in general, 
  718. offers a readable appearance. 
  719.  
  720.  
  721. ΓòÉΓòÉΓòÉ 6.2. Meta Comments in IDL Files ΓòÉΓòÉΓòÉ
  722.  
  723. C declarations and the IDL language do not fully overlap. Information generated 
  724. during idlgen processing needs to be maintained. This information relates to 
  725. differences between the two sources and to idlgen-specific needs. One solution 
  726. is to maintain a side-looking file and associate it with the IDL file (such as 
  727. .acf files in DCE). But to avoid all the bookeeping and busy work of dealing 
  728. with additional files, idlgen keeps this information in the IDL file itself as 
  729. meta comments. For the idl compiler, a meta comment is merely another comment 
  730. to be ignored. However, it provides information that makes the code in the IDL 
  731. file more comprehensible to users. 
  732.  
  733. Meta comment types are few in number and easy to master.  They are a very 
  734. small, transparent addition to the IDL language. 
  735.  
  736. Meta comments have the following general format: 
  737.  
  738.   /*@ [ meta-statement ] ; [ comment ] */
  739. During parsing, idlgen checks the meta-statement for correct syntax but ignores 
  740. the comment. 
  741.  
  742. Meta comments serve idlgen for three main purposes: 
  743.  
  744.  1. For a disclaimer header, which identifies idlgen as the generator of the 
  745.     file contents and provides its generation date 1 and last modification date 
  746.     2. 
  747.  
  748.          interface noname {
  749.         /*@;*********************************************************************
  750.             * This file built with the MakeDCE facility for DCE ver 1.0         *
  751.             *     - A DCE Application-Development Enabling Tool                 *
  752.             *                                                                   *
  753.             * Initially generated on Sun Jan 31 08:45:12 1993 1                             *
  754.             *         Last update on Sun Jan 31 08:45:12 1993 2                             *
  755.             *                                                                   *
  756.             * IBM Corporation 1992                                              *
  757.             *********************************************************************/
  758.  
  759.  2. For a list of export and noexport symbols. 
  760.  
  761.         /*@[export] f ; file -stdin */
  762.  
  763.  3. For retaining C-contextual information in the IDL file that would otherwise 
  764.     be rejected by the idl compiler.  At the present time, this feature is used 
  765.     for retaining enum tags which are not valid for IDL files (see enum Tags). 
  766.  
  767.  
  768. ΓòÉΓòÉΓòÉ 6.2.1. Export and Noexport Meta Comments ΓòÉΓòÉΓòÉ
  769.  
  770. idlgen matches the IDL input files with the C source files. However, not 
  771. everything exportable from C is exportable in an IDL file.  One such problem 
  772. area is symbols defined as global.  For instance, C keywords static and extern 
  773. in front of a function or variable declaration make the declarations 
  774. non-exportable. The only symbols that IDL can export are functions (or 
  775. operations in DCE terminology). Global variables cannot be passed automatically 
  776. between DCE clients and servers in an RPC. 
  777.  
  778. When idlgen scans a C souce file (that has been preprocessed, so that all 
  779. #include directives are expanded), it examines all the symbols and divides them 
  780. into exportable and non-exportable.  It flags them, as appropriate, and lists 
  781. them in a meta comment.  This meta comment provides information on what you 
  782. must alter in the C source code so that all globals are included as explicit 
  783. parameters in some (or all) of the operations. 
  784.  
  785. idlgen considers exportable symbols on the following basis: 
  786.  
  787. o For variables - all exportable symbols defined in the file and imported 
  788.   symbols defined elsewhere (that have the extern storage class). 
  789.  
  790. o For functions - only exportable symbols defined in the file. 
  791.  
  792. When an input IDL file exists, it may already define some exported operations. 
  793. When a new IDL file is being built, a list of the functions to be included as 
  794. export candidates must be generated. idlgen maintains this list in the IDL file 
  795. in meta comments. When a new IDL file is initially generated, all global names 
  796. in the C sources are entered into the generated IDL file. Function names are 
  797. marked as candidates for export, while global variables are marked for 
  798. no-export. 
  799.  
  800. You also can make use of the meta comment in the IDL file to control what 
  801. idlgen examines for export.  Using the noexport flag causes idlgen to skip the 
  802. symbol.  Flagging a symbol with export causes idlgen to export it. 
  803.  
  804. idlgen generates a warning message whenever a C source contains globals that 
  805. are not excluded by means of a meta comment unless you use the -g switch in the 
  806. command line. 
  807.  
  808. An export or noexport meta comment can be displayed anywhere in the file, but 
  809. it is always placed by idlgen at the beginning of the output IDL file. idlgen 
  810. produces one meta comment line for each name in meta comments of the input IDL 
  811. file. 
  812.  
  813. A idlgen meta comment has the following syntax. 
  814.  
  815. Export/noexport meta comments syntax diagram 
  816.  
  817.                  ZD,DDDD?
  818.                      3
  819. >>DD/*@DD[DDBDexportDDDDDDDDBDD]DDDDnameDADD;DDBDDDDDDBDD*/DDDDDDDDDDDDDDDDDDD><
  820.       CDnoexportDDDDDD4          @DtextDY
  821.       CDtbd(export)DDD4
  822.       @Dtbd(noexport)DY
  823.  
  824. /*@ ... */  Delimits the meta comment 
  825.  
  826.             */ should not be used anywhere inside a meta comment. 
  827. export      Designates that subsequent symbol names are to be exported. 
  828. noexport    Designates that subsequent symbol names are to be excluded from 
  829.             export in the IDL file. 
  830. tbd(...)    Designates that the symbol has been added to the meta comment list 
  831.             for an existing IDL input file and must be considered by the user, 
  832.             with the value in the parentheses as the recommended one. The 
  833.             possible values are export and noexport. 
  834. name        A symbol name.  All symbols in this list share the same designation 
  835.             as the one specified in the statement head. 
  836. text        Optional free text following the ending semicolon, a kind of 
  837.             internal comment.  idlgen initially places the name of the source 
  838.             file where the symbol has been declared here. If you change this 
  839.             text, idlgen retains your text. 
  840.  
  841. Following is an example. 
  842.  
  843. /*@ [ export ] Advance, GetRecord, PutRecord ;  from test. c */
  844.  
  845. /*@ [ noexport ] count, state ;  from tools.c */
  846. Here the functions Advance, GetRecord, and PutRecord are designated as export 
  847. candidates and have been declared in the C source file TEST.C. However, the 
  848. global variables count and state, which have been declared in tools.c, are 
  849. excluded from exportation. 
  850.  
  851.  
  852. ΓòÉΓòÉΓòÉ 6.2.2. Export Decision Making ΓòÉΓòÉΓòÉ
  853.  
  854. A symbol is considered for noexport under the following rules: 
  855.  
  856. o Symbols defined as static or extern are either local or import, respectively, 
  857.   and cannot be exported. 
  858.  
  859. o Global symbols that are not marked noexport cause an error message (unless -g 
  860.   is set) and are not exported. 
  861.  
  862.   On the other hand, operations defined in an IDL file and not marked noexport 
  863.   will be exported.  idlgen will generate a meta comment for them, marking them 
  864.   export in the output IDL file. 
  865.  
  866.   Also, functions in C sources marked export in a meta comment in an IDL file 
  867.   are exported. 
  868.  
  869. o Illegal functions in C, which cannot be used as remote operations - currently 
  870.   only those that use a variable number of arguments (for instance, void foo 
  871.   (int a,...)) are marked as noexport in new IDL files and tbd(noexport) in 
  872.   additions to old IDL files. If an IDL file marks such a function as export, 
  873.   an error message is issued. 
  874.  
  875. In the following example, idlgen extracts all global functions defined in the 
  876. source file and makes them exportable operations in the generated IDL file. 
  877.  
  878.    uuidgen -i > test.idl 1
  879.    idlgen test.idl test.c -o 2
  880.    idlgen test.idl test.c -o 3
  881.  
  882. Explanations: The first line generates a skeleton IDL file 1. The first time 
  883. idlgen runs 2, it generates an initial IDL file containing meta comments 
  884. excluding all global variables and including all global functions defined in 
  885. the file test.c as exportable. The second time that idlgen runs 3, it places in 
  886. test.idl all needed declarations for the exported operations, based on the 
  887. functions that implement them in the C source. 
  888.  
  889.  
  890. ΓòÉΓòÉΓòÉ 6.3. The idlgen Command Syntax ΓòÉΓòÉΓòÉ
  891.  
  892. The idlgen command has the following free-form syntax: 
  893.  
  894. idlgen command syntax 
  895.  
  896. >>DDidlgenDDBDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD><
  897.       3 ZDDDDDDDDDDDDDD? 3
  898.       3         3 3
  899.       @DDBDinput-fileDBADY
  900.         @DswitchDDDDDY
  901.  
  902. The general format of the command is: 
  903.  
  904.    idlgen [[file-name|-stdin]...] [-o [output-file]]
  905.           [-I path[;path...]] [-D name] [-U name]
  906.           [-no_cpp] [-cpp_cmd cmd] [-cpp_opt opt]
  907.           [-g] [-b] [-d] [-i] [-dceV10 | -dceV11]
  908.           [-conformC | -conformIdl] [-interface new-name]
  909.           [-h] [-help] [-no_warn] [-confirm] [-v]
  910.           [-errfmt { native | emacs } ]
  911.  
  912. An explanation of the elements follows. 
  913.  
  914.  
  915. ΓòÉΓòÉΓòÉ 6.3.1. file-name and -stdin ΓòÉΓòÉΓòÉ
  916.  
  917. file-name can be one or more names of the input files for idlgen.  These files 
  918. can be C source files, an IDL file, or both. You can list any number of C 
  919. source files as input but only one IDL file. 
  920.  
  921. Normally, if you are using idlgen to generate an initial IDL file, all of the 
  922. input files are C sources.  On subsequent iterations of the IDL file, you would 
  923. include it with the C source files. Usually, C sources have a .c extension, and 
  924. IDL files have an .idl extension.  idlgen determines the input file type from 
  925. its content. 
  926.  
  927. The order of input files on the command line is the order in which idlgen 
  928. processes them.  You should remember that although IDL and C sources can be 
  929. listed in any desired mix on the command line, using different ordering on 
  930. subsequent invocations of idlgen can result in different error and warning 
  931. messages. This difference is due to the change in the order of input 
  932. declarations. A good practice is to place the input IDL source before the C 
  933. sources on the command line. 
  934.  
  935. Using -stdin tells idlgen that standard input is an input file.  This enables 
  936. you to use the standard output of a previous command. -stdin can be used alone 
  937. or with a file list. For example, entering 
  938.  
  939.    uuidgen -i | idlgen -stdin test.c
  940. pipes the output of uuidgen into idlgen that, in turn, merges it with TEST.C to 
  941. produce a new IDL file. 
  942.  
  943. If no file name is present in the command line, idlgen assumes -stdin by 
  944. default. 
  945.  
  946.  
  947. ΓòÉΓòÉΓòÉ 6.3.2. idlgen Switches ΓòÉΓòÉΓòÉ
  948.  
  949. The idlgen switches enable you to tailor the operation of idlgen. You can enter 
  950. the switches in any order; however, they are case sensitive. 
  951.  
  952. There are four types of idlgen switches: 
  953.  
  954. o A single letter that takes no arguments 
  955. o A single letter that takes an argument 
  956. o A single word that takes no arguments 
  957. o A single word that takes an argument. 
  958.  
  959. An argument can be assigned to a single-letter switch in three different ways: 
  960.  
  961. o Attached (-sArg) 
  962. o Separated by white space (-s Arg) 
  963. o Separated by an equal sign with or without white space (-s=Arg, or -s= Arg). 
  964.  
  965. An argument can be assigned to a single-word switch in two possible ways: 
  966. separated by white space (-switch Arg) or by an equal sign with or without 
  967. white space (-switch=Arg, or -switch= Arg). 
  968.  
  969. A helpful feature is to place those switches you commonly use into the IDLGEN 
  970. environment variable.  See The IDLGEN Environment Variable. These switches are 
  971. then automatically invoked when you run idlgen. 
  972.  
  973. Note:  Switches are prefaced by a flag:  - (minus) or + (plus). You can 
  974.        override the environment variable setting by including the switch in the 
  975.        command line with an opposite flag. 
  976.  
  977. You can combine single-letter switches that take no arguments into a single 
  978. string with a single flag for the entire string, such as -ibdo or +ibd. 
  979.  
  980. The following switch descriptions are divided into four functional groups: 
  981. Output Selection, Generation Switches, Preprocessing Switches, and Help and 
  982. Information. 
  983.  
  984.  
  985. ΓòÉΓòÉΓòÉ 6.3.2.1. Output Selection ΓòÉΓòÉΓòÉ
  986.  
  987. -o [ output_file ] 
  988.  
  989. Omitting this switch causes idlgen to output to the standard output. 
  990.  
  991. -o 
  992.  
  993. Without an argument, this causes idlgen to overwrite the input IDL file (see 
  994. step Examples of idlgen Switches). With an argument, this causes idlgen to 
  995. overwrite output_file. 
  996.  
  997. +o 
  998.  
  999. Prevents idlgen from overwriting the IDL file (normally used to override -o in 
  1000. the environmental variable). 
  1001.  
  1002.  
  1003. ΓòÉΓòÉΓòÉ 6.3.2.2. Generation Switches ΓòÉΓòÉΓòÉ
  1004.  
  1005. The following switches affect the generation mode of IDL output: 
  1006.  
  1007. -b 
  1008.           Sets an IDL generation mode in which long indirections are broken 
  1009.           into more than one typedef so that appropriate IDL attributes can be 
  1010.           set. 
  1011.  
  1012. -d 
  1013.           Prevents idlgen from entering the MK_DEFAULT special attribute into 
  1014.           generated IDL files. The same effect can be achieved by running a 
  1015.           second pass of idlgen on the resulting IDL file. 
  1016.  
  1017. -i 
  1018.           Skips the intermediate phase of generating initial IDL file where 
  1019.           lists of candidate symbols are entered in meta comments marked as [ 
  1020.           export ] or [ noexport ]. An initial IDL file is generated when there 
  1021.           is no input IDL file to idlgen or when the input IDL file has no 
  1022.           operations declared in it.  When you merge an existing IDL file with 
  1023.           a new C file and find new functions in it, these functions are also 
  1024.           entered in meta comments. This switch affects them too. When initial 
  1025.           IDL phase is skipped, the definitions of new functions found are 
  1026.           expanded in the output IDL file. Otherwise, a second pass of idlgen 
  1027.           over the resulting IDL file and the C sources is required. 
  1028.  
  1029. -conformC and  -conformIdl 
  1030.           Are generation switches that control how idlgen modifies IDL 
  1031.           declarations according to the C declarations when they do not match. 
  1032.           For instance, for -conformC, when a new parameter is added to a 
  1033.           function, idlgen adds it in the IDL operation declaration too, 
  1034.           leaving the other parameters untouched, as found in the input file. 
  1035.           When a parameter is removed in the C source, it is also removed from 
  1036.           the resulting IDL file. The same is done with fields of union, 
  1037.           struct, and enum. However, if matching parameters or fields in IDL 
  1038.           and C have contradicting types, dimensions, and so on, idlgen issues 
  1039.           an error message. For -conformIdl, such updates are disallowed, and 
  1040.           warnings are issued for cases of mismatches. The variants +conformC 
  1041.           and +conformIdl are illegal. The default is -conformC. 
  1042.  
  1043. -dceV10 and -dceV11 
  1044.           Are generation switches that control the type of new constructs 
  1045.           generated for the output IDL file. -dceV10 limits it the type to 
  1046.           comply with IDL for DCE Ver 1.0. The only effect currently is to 
  1047.           generate encapsulating unions. This limitation of DCE Ver 1.0 
  1048.           requires you to write additional code to convert DCE transmission 
  1049.           types for unions to application types and also the reverse. -dceV11, 
  1050.           on the other hand, allows the generation of none-encapsulating unions 
  1051.           when idlgen takes advantage of the extended capability of DCE Ver 
  1052.           1.1. The variants +dceV10 and +dceV11 are illegal. The default is 
  1053.           -dceV10. 
  1054.  
  1055. -g 
  1056.           Causes idlgen to ignore all global variables in C sources being 
  1057.           scanned regardless of the contents of the input IDL file. When 
  1058.           scanning a C source with global variables, idlgen generates meta 
  1059.           comments to signal that these symbols are not to be considered for 
  1060.           export. -g prevents this. 
  1061.  
  1062. -interface new_name 
  1063.           Sets the interface name in the output IDL to new_name. This is useful 
  1064.           when the interface name in the IDL file input to idlgen has to be 
  1065.           changed. For example, the command uuidgen -i generates an IDL header 
  1066.           with an empty interface named INTERFACENAME. When this header is fed 
  1067.           into idlgen, -interface can be used to change INTERFACENAME to a more 
  1068.           meaningful name. 
  1069.  
  1070.  
  1071. ΓòÉΓòÉΓòÉ 6.3.2.3. Preprocessing Switches ΓòÉΓòÉΓòÉ
  1072.  
  1073. The -I, -D and -U switches play the same role for idlgen as for the C 
  1074. preprocessor and are passed as is to that preprocessor. 
  1075.  
  1076. -I dir[;dir...] 
  1077.           Specifies a directory path for import IDL files, as well as for 
  1078.           preprocessor include files. It is possible to specify more than one 
  1079.           path for the same -I switch separated with a semicolon (;), or by 
  1080.           additional -I dir switches on the command line. Note that for the 
  1081.           first choice, you may want to enclose the list of paths in quotes. 
  1082.           The directories are searched in the order listed. If a file is 
  1083.           present in more than one directory, the first occurrence of the file 
  1084.           is taken.  The default behavior of idlgen is first to search the 
  1085.           current directory and then to search all specified directories, in 
  1086.           order. Use -confirm to display the default search paths. 
  1087.  
  1088. -D name[=definition] 
  1089.           Defines a symbol name and an optional value to be passed to the C 
  1090.           preprocessor.  This method can be used for defining symbols instead 
  1091.           of using the #define directive in the source code.  You can use more 
  1092.           than one -D name argument on the command line.  This switch has no 
  1093.           effect if -no_cpp option is included. There are no defaults. 
  1094.  
  1095. -U name 
  1096.           Makes the symbol name undefined for the C preprocessor. This method 
  1097.           can be used for removing symbol definitions instead of using the 
  1098.           #undef directive in the source code.  You can use more than one -U 
  1099.           name argument on the command line.  This switch has no effect if 
  1100.           -no_cpp option is included. There are no defaults. 
  1101.  
  1102. -cpp_cmd 'cpp-command' 
  1103.           Invokes the C preprocessor you specify in 'cpp-command' rather than 
  1104.           the default, which can be viewed using -confirm. 
  1105.  
  1106. -cpp_opt 'cpp-options' 
  1107.           Specifies additional options to be passed to the C preprocessor. You 
  1108.           can add options to the command line used to invoke the C preprocessor 
  1109.           independent of the -cpp_cmd switch. idlgen concatenates the -cpp_cmd, 
  1110.           -cpp_opt, -D, -U, and -I arguments and the source C files into a 
  1111.           command that invokes the C preprocessor. Use -confirm to display the 
  1112.           default cpp options. 
  1113.  
  1114. -no_cpp 
  1115.           Prevents invoking the C preprocessor. Note that the C processor must 
  1116.           be run on input files (C and IDL) that contain preprocessor 
  1117.           directives (such as #define or #include). 
  1118.  
  1119.  
  1120. ΓòÉΓòÉΓòÉ 6.3.2.4. Help and Information ΓòÉΓòÉΓòÉ
  1121.  
  1122. -h 
  1123.           Displays a brief syntactic help on the command options, the same as 
  1124.           that shown in idlgen command syntax. 
  1125.  
  1126. -help 
  1127.           Displays an extended help containing a short description of the 
  1128.           command options. 
  1129.  
  1130. -v 
  1131.           Sets verbose mode, which prints informational messages while idlgen 
  1132.           is running.  To turn verbose mode off, use +v. The default is -v. 
  1133.  
  1134. -no_warn 
  1135.           Suppresses all warning messages. 
  1136.  
  1137. -confirm 
  1138.           Displays all active values of idlgen command options. It does not 
  1139.           process the input files. 
  1140.  
  1141. -errfmt errfmt-choice 
  1142.           Selects message format for errors and warnings where file locations 
  1143.           are present. The errfmt-choice is between emacs, and native. emacs 
  1144.           format can than be used to browse back into the source file using the 
  1145.           emacs editor when editing the stderr file. The native format is the 
  1146.           one presented here in the "messages" chapters at the end of this 
  1147.           book. 
  1148.  
  1149.  
  1150. ΓòÉΓòÉΓòÉ 6.3.3. Examples of idlgen Switches ΓòÉΓòÉΓòÉ
  1151.  
  1152.  1. Generate a simple, correct, and complete IDL file by typing: 
  1153.  
  1154.            echo "f(a){};" | idlgen -id
  1155.  
  1156.  2. Call idlgen to process the C file TEST.C and generate an initial IDL file 
  1157.     to the standard output. 
  1158.  
  1159.            idlgen test.c
  1160.  
  1161.  3. Call idlgen to process the C file TEST.C and generate an initial IDL file, 
  1162.     TEST.IDL. If TEST.IDL already exists, it will be overwritten. 
  1163.  
  1164.            idlgen test.c -o test.idl
  1165.  
  1166.  4. Call idlgen as in the previous example, except that an existing IDL 
  1167.     TEST.IDL is merged with the C source TEST.C; the resulting IDL file 
  1168.     overwrites TEST.IDL. 
  1169.  
  1170.            idlgen test.idl test.c -o
  1171.  
  1172.  5. Call idlgen to process three input C sources and one input IDL source.  The 
  1173.     result of this merge is written to the file NEWTEST.IDL. Note that the IDL 
  1174.     file precedes the C files on the command line. 
  1175.  
  1176.            idlgen test.idl util.c lib.c test.c -o newtest.idl
  1177.  
  1178.  6. Use standard input and output to combine several steps into one. The 
  1179.     skeleton IDL file generated by uuidgen is piped into idlgen where an 
  1180.     initial IDL file for the source S.C is generated and immediately piped into 
  1181.     a second idlgen stage where it is merged into the same source file to 
  1182.     produce an IDL file.  The final output is written to the standard output. 
  1183.  
  1184.            uuidgen -i | idlgen -stdin s.c | idlgen -stdin s.c
  1185.  
  1186.  7. Use in the same way as in Example 5 but with multiple phases: 
  1187.  
  1188.         idlgen test.idl util.c | idlgen -stdin lib.c |
  1189.              idlgen -stdin test.c -o newtest.idl
  1190.  
  1191.  8. Use in the same way as in Example 6 but omit the intermediate step of 
  1192.     generating an initial IDL file and write the final output to S.IDL using 
  1193.     the shell redirection. 
  1194.  
  1195.            uuidgen -i | idlgen -stdin -i s.c >! s.idl
  1196.  
  1197.  
  1198. ΓòÉΓòÉΓòÉ 6.3.4. The IDLGEN Environment Variable ΓòÉΓòÉΓòÉ
  1199.  
  1200. You can make use of the IDLGEN environment variable to hold switches and 
  1201. parameters. If this variable is present in the environment, idlgen first scans 
  1202. its contents and sets various defaults according to the switches and parameters 
  1203. defined by it before processing the command line options. 
  1204.  
  1205. Using the IDLGEN environment variable, you can reduce the size and complexity 
  1206. of the idlgen command line. You can also use it to contain switches and 
  1207. parameters you frequently use with idlgen. For example, on OS/2, this feature 
  1208. can be used as follows: 
  1209.  
  1210.    set IDLGEN=switches-and-parms
  1211.    idlgen more-switches-and-parms
  1212. This is equivalent to the following: 
  1213.  
  1214.    idlgen switches-and-parms more-switches-and-parms
  1215.  
  1216. The idlgen command produces two standard output streams, which can be 
  1217. redirected through pipes: 
  1218.  
  1219. o The stderr stream producing messages, warnings, and errors 
  1220.  
  1221. o The stdout stream producing the new IDL file generated by idlgen. 
  1222.  
  1223.  
  1224. ΓòÉΓòÉΓòÉ 6.4. Command Addendum ΓòÉΓòÉΓòÉ
  1225.  
  1226. This command addendum contains notes on various idlgen aspects that provide 
  1227. expanded information on the preceding descriptions and discussions. 
  1228.  
  1229.  
  1230. ΓòÉΓòÉΓòÉ 6.4.1. Number of Input IDL Files ΓòÉΓòÉΓòÉ
  1231.  
  1232. Although idlgen allows only one IDL input file, multiple IDL files can be 
  1233. processed when included as import statements in the IDL input file. When the 
  1234. IDL file is regenerated, the declarations in import files are not reproduced in 
  1235. the output file. Only import statements for these files are generated. 
  1236.  
  1237. A more complicated case occurs when there are multiple input IDL files at the 
  1238. command-line level. In this case, there are three classes of IDL files: 
  1239.  
  1240. o The main IDL file, which is the only IDL file in the file list that a new 
  1241.   version will be reproduced for at the end. 
  1242.  
  1243. o The example IDL files, which are used to fill in declarations that may be 
  1244.   needed in the generated file and cannot be found in any of the import files 
  1245.   thereof. Example files are distinguished by a special -xmp switch. 
  1246.  
  1247.   Note:  example files are not supported in this version. 
  1248.  
  1249. o The import files, which occur in the main or in example IDL files or which 
  1250.   are recursively imported in other import files. 
  1251.  
  1252.  
  1253. ΓòÉΓòÉΓòÉ 6.4.2. Order of Input Files ΓòÉΓòÉΓòÉ
  1254.  
  1255. When input files are scanned, symbols are encountered and inserted into the 
  1256. symbol table. The initial order of insertion in this table is preserved and is 
  1257. used as a basis for generating the output IDL file. 
  1258.  
  1259. Different C files can define symbols in different orders.  You can also alter 
  1260. the order of declarations (as long as they do not introduce IDL errors) in the 
  1261. IDL file by using a text editor. To preserve the order of declarations in the 
  1262. input IDL file, ensure that the declarations are the first input file name in 
  1263. the command line. 
  1264.  
  1265.  
  1266. ΓòÉΓòÉΓòÉ 6.4.3. Aggregate C Types ΓòÉΓòÉΓòÉ
  1267.  
  1268. In IDL, all type definitions come in the form of constants, typedefs, and 
  1269. operations. Typedefs are actually a declaration of a new name for an existing 
  1270. type. In the C language, aggregates can also be defined as pure types with no 
  1271. connection to any typedef nor with relation to a file-level variable. When you 
  1272. scan a C file, you can define a parameter of a function using a basic form of 
  1273. an aggregate (for example, void foo( struct s parm );).  When you convert to 
  1274. IDL declarations, change these aggregates to typedefs. Since if there is no 
  1275. name for a typedef, it has to be generated by idlgen. The new names are 
  1276. composed from contextual information so that they are unique in the file but 
  1277. are generated in the same way for additional files with the same context. A 
  1278. consistent naming convention is required in order to properly identify symbols 
  1279. to be matched in related files. For example, the aggregate: 
  1280.  
  1281.    struct s...;
  1282. is redefined as 
  1283.  
  1284.    typedef struct s...s_MKGEN...;
  1285.  
  1286.  
  1287. ΓòÉΓòÉΓòÉ 6.4.4. Anonymous C Aggregates ΓòÉΓòÉΓòÉ
  1288.  
  1289. When a C aggregate has no tag, one is created for it by idlgen in a way that 
  1290. depends on its context and ensures consistent matching for that type between 
  1291. the C and IDL files. For instance, the anonymous structure in this function 
  1292. prototype: 
  1293.  
  1294.    void foo( struct { int i;} x) ...
  1295. is converted to a tagged struct as follows: 
  1296.  
  1297.   typedef struct foo_MKAGGR_x {
  1298.       long int i;
  1299.   } foo_MKAGGR_x_MKGEN;
  1300.  
  1301.   void foo( [in] foo_MKAGGR_x_MKGEN x);
  1302.  
  1303.  
  1304. ΓòÉΓòÉΓòÉ 6.4.5. Type Matching ΓòÉΓòÉΓòÉ
  1305.  
  1306. When two input C files include the same .h file, the same declaration occurs 
  1307. twice. In this case, they are exactly the same. In other cases, because of 
  1308. careless programming practices, same declarations can occur in separate C 
  1309. sources as two distinct objects (having two separate sources). In the latter 
  1310. case, the two types may not be exactly compatible. Currently, the latest 
  1311. declaration takes precedence, but the two declarations (new and old) are 
  1312. compared, and a warning is issued if they are incompatible. 
  1313.  
  1314. In the case of the same include file, both declarations are the same. A method 
  1315. to help in the processing of duplicate include files is to record names of 
  1316. processed include files and ignore include files that have already been 
  1317. processed. Note that since multiple (preprocessed) C sources are scanned, the 
  1318. common method recommended for C programs to prevent duplicate inclusions of C 
  1319. includes by defining (and undefining) specific preprocessor symbols cannot be 
  1320. used. 
  1321.  
  1322.  
  1323. ΓòÉΓòÉΓòÉ 6.4.6. The Case of sizeof() and enum-items ΓòÉΓòÉΓòÉ
  1324.  
  1325. To check compatibility of array sizes in C declarations and IDL files, idlgen 
  1326. computes the constant expressions in IDL and in C sources. In case the program 
  1327. uses sizeof(), which is a compiler-specific internal operator, to set the size 
  1328. of an array, it cannot be used in an IDL file.  idlgen issues an appropriate 
  1329. warning message that size comparison cannot be done. When the size expression 
  1330. involves enumeration items, the expression cannot be part of the IDL file. If 
  1331. the IDL file is still generated with such expressions, an error is reported. 
  1332.  
  1333.  
  1334. ΓòÉΓòÉΓòÉ 6.4.7. Breaking Long Indirections ΓòÉΓòÉΓòÉ
  1335.  
  1336. C allows declarations to have a chain of indirections of any length. In IDL 
  1337. there are certain limitations on indirections and arrays. It is also impossible 
  1338. to specify different addressing attributes to the various levels of 
  1339. indirections unless they are separated into simple cases. This can be done by 
  1340. breaking long chains of indirections into chains of typedefs. If the -b switch 
  1341. is set in the command line, this is automatically done by idlgen.  Otherwise, a 
  1342. warning message is issued. 
  1343.  
  1344. In a specific case, when a function returns a pointer, it is always converted 
  1345. to a newly defined typedef where the indirection is hidden. This occurs because 
  1346. the current idl compiler does not accept IDL files with pointer function 
  1347. values, although the documentation does not preclude the case. 
  1348.  
  1349.  
  1350. ΓòÉΓòÉΓòÉ 6.4.8. Special New IDL Keywords ΓòÉΓòÉΓòÉ
  1351.  
  1352. When new IDL attributes are needed for a newly generated IDL declaration, which 
  1353. has been extracted from a C source, idlgen can generate a reasonably correct 
  1354. declaration. This is processed correctly by the IDL compiler, but it may not be 
  1355. the correct choice. Therefore, idlgen generates a new IDL declaration using new 
  1356. keywords, which indicates that you must enter something or approve what idlgen 
  1357. generated. If you pass the resulting IDL file with no changes to the idl 
  1358. compiler, syntax errors can occur. If you re-input it to idlgen, it removes 
  1359. these keywords and generates attributes it assumes are acceptable to you. 
  1360.  
  1361. idlgen uses two such special keywords currently:  MK_DEFAULT and MK_ERROR. The 
  1362. former is used whenever it generates IDL attributes and the latter when idlgen 
  1363. detects an apparent incompatibility between a declaration in the IDL file and 
  1364. its corresponding C counterpart. When an input IDL file to idlgen has special 
  1365. keywords, the MK_DEFAULT keywords are removed, but the MK_ERROR keywords are 
  1366. left for you to remove after you make the proper corrections. 
  1367.  
  1368. Another method to get rid of the MK_DEFAULT special keyword is to use the -d 
  1369. command-line switch as discussed on page Generation Switches. 
  1370.  
  1371.  
  1372. ΓòÉΓòÉΓòÉ 6.4.9. Function Pointers as Parameters and Aggregate Fields ΓòÉΓòÉΓòÉ
  1373.  
  1374. Parameters and aggregate fields can be function pointers. Such parameters and 
  1375. aggregate fields are illegal for IDL; they need to be detected in the C files 
  1376. and should not be used in the IDL file.  idlgen issues error messages when IDL 
  1377. operations make use of such declarations directly or indirectly. 
  1378.  
  1379.  
  1380. ΓòÉΓòÉΓòÉ 6.4.10. Matching Unions ΓòÉΓòÉΓòÉ
  1381.  
  1382. Unions in C and IDL match even when their fields have different orders.  Unions 
  1383. in IDL have selection information and attributes. 
  1384.  
  1385.    typedef union _u switch(long s) {
  1386.       case 0: long int i;
  1387.       case 1: double   d;
  1388.    } u;
  1389. When a union in a C file is changed and new fields are added, the IDL union 
  1390. attributes need to be extended and applied also to the new union fields.  For 
  1391. the preceding example, if a new field char c is added, it is automatically 
  1392. entered as: 
  1393.  
  1394.      case 2: char      c;
  1395.  
  1396.  
  1397. ΓòÉΓòÉΓòÉ 6.4.11. enum Tags ΓòÉΓòÉΓòÉ
  1398.  
  1399. IDL language does not accept enum with tags. All enum aggregates must have a 
  1400. typedef and must have their tags removed. To maintain affinity between the IDL 
  1401. file and its C source, the tag is entered into the IDL declaration inside a 
  1402. meta comment (see the preceding example). The idl compiler ignores this as a 
  1403. comment, while idlgen reads the tag name and is able to associate it with the 
  1404. corresponding C source construct for type matching. Carrying the tag name into 
  1405. the IDL file also creates a helpful piece of information for you. 
  1406.  
  1407.  
  1408. ΓòÉΓòÉΓòÉ 6.4.12. Bit Fields ΓòÉΓòÉΓòÉ
  1409.  
  1410. The IDL language does not accept bit fields in struct and union aggregates. 
  1411. idlgen removes these parts of the structure before generating the IDL file. 
  1412. Alignment (nameless, or 0-length) fields are removed, and other bit fields are 
  1413. left without their bit location part. In cases where two structures with bit 
  1414. fields in C files are compared, bit-field location values are compared as well. 
  1415. When a structure in a C file with bit fields is compared with a corresponding 
  1416. IDL structure, idlgen issues a warning message. 
  1417.  
  1418.  
  1419. ΓòÉΓòÉΓòÉ 6.4.13. Long Identifiers ΓòÉΓòÉΓòÉ
  1420.  
  1421. The IDL language limits identifiers length below the length permitted in C. 
  1422. idlgen has no limitation on the identifier length, but will check identifiers 
  1423. in input C files against the IDL limit. Moreover, idlgen generates new 
  1424. identifiers in output IDL files, which can be very long since they are 
  1425. generated as a combination of C identifiers. 
  1426.  
  1427. To prevent IDL syntax errors, idlgen generates #define statements in the output 
  1428. IDL file where long names are defined as short names. When the file is 
  1429. processed by idl compiler, only the short names are seen. When processed by 
  1430. idlgen, the long names are used. This is needed to properly identify and match 
  1431. C and IDL sources. 
  1432.  
  1433. An example is the following C source: 
  1434.  
  1435. User
  1436.                     type long.c
  1437.  
  1438. System
  1439.                     typedef struct very_long_struct_name_in_C {
  1440.                        int very_long_struct_field_name;
  1441.                     } very_long_typedef_name_in_C;
  1442.  
  1443.                     very_long_function_name 1 (
  1444.                        very_long_typedef_name_in_C very_long_parameter_in_C
  1445.                     ){};
  1446.  
  1447.  
  1448. The IDL file is generated using idlgen. 
  1449.  
  1450. User
  1451.                     idlgen long.c -idbo long.idl
  1452.  
  1453. System
  1454.  
  1455.                     MakeDCE 1.2 - Enabling tool for DCE
  1456.                     IBM Corporation (c) 1992, 1993
  1457.  
  1458.                     Running the C preprocessor  '... long.c ...' 2
  1459.                     Processing file 'long.c'...... C source file.
  1460.                     Output IDL file is 'long.idl'.
  1461.                     Successful completion
  1462.  
  1463.  
  1464. The resulting IDL file defines short names for the long names in the C source. 
  1465.  
  1466. User
  1467.                     type long.idl
  1468.  
  1469. System
  1470.                     interface noname {
  1471.                     /*@;*****************************************************************
  1472.                         * This file built with the MakeDCE facility for DCE ver 1.0     *
  1473.                         *     - A DCE Application-Development Enabling Tool             *
  1474.                         *                                                               *
  1475.                         * Initially generated on Mon Sep 20 14:35:41 1993               *
  1476.                         *         Last update on Mon Sep 20 14:35:41 1993               *
  1477.                         *                                                               *
  1478.                         * IBM Corporation 1992, 1993                                    *
  1479.                         *****************************************************************/
  1480.  
  1481.                     #ifndef IDLGEN 3
  1482.                     #   define function_name 4 MKSHORT_0 5
  1483.                     #   define very_long_parameter_in_C MKSHORT_1
  1484.                     #   define very_long_typedef_name_in_C MKSHORT_2
  1485.                     #   define very_long_struct_name_in_C MKSHORT_3
  1486.                     #   define very_long_struct_field_name MKSHORT_4
  1487.                     #endif
  1488.  
  1489.                     /*@[export] function_name ; file long.c */
  1490.  
  1491.  
  1492.                     typedef struct very_long_struct_name_in_C  6  {
  1493.                        long int very_long_struct_field_name;
  1494.                     } very_long_typedef_name_in_C;
  1495.  
  1496.                     long int
  1497.                     function_name (
  1498.                        [  in] very_long_typedef_name_in_C
  1499.                            very_long_parameter_in_C
  1500.                     );
  1501.  
  1502.                     }
  1503.  
  1504.  
  1505. Explanation for long identifiers 
  1506.  
  1507. The long function name 1 in the C source long.c is defined 4 in the resulting 
  1508. IDL file as a shorter name SHORT_0 5. In the idl compiler the symbol IDLGEN 3 
  1509. should not be defined so that the name of the very_long_struct 6 is converted 
  1510. by the C preprocessor to the short name. When the file is processed 2 by 
  1511. idlgen, the symbol IDLGEN 3 is defined (not shown in the execution log above), 
  1512. so that it sees the original long name. 
  1513.  
  1514.  
  1515. ΓòÉΓòÉΓòÉ 6.4.14. Differences between -dceV10 and -dceV11 ΓòÉΓòÉΓòÉ
  1516.  
  1517. The differences are currently only limited to how idlgen processes unions. 
  1518.  
  1519.  
  1520. ΓòÉΓòÉΓòÉ 6.4.14.1. Using -dceV10 ΓòÉΓòÉΓòÉ
  1521.  
  1522. User
  1523.                     type u.c 1
  1524.  
  1525. System
  1526.                     void foo (   2
  1527.                        union { int i; float f; } U) {}
  1528.  
  1529. User
  1530.                     icc -c u.c 3
  1531.  
  1532. System
  1533.                     4
  1534.  
  1535. User
  1536.                     idlgen u.c -dceV10 -ido u.idl 5
  1537.  
  1538. System
  1539.                      ... 6
  1540.  
  1541. User
  1542.                     type  u.idl 7
  1543.  
  1544.                     interface noname {
  1545.  
  1546.                        . . .       8
  1547.  
  1548.                     /*@[export] foo ;    file u.c */  9
  1549.  
  1550.                     /*Manufactured typedef for an aggregate by MakeDCE */  10
  1551.                     typedef union foo_MKAGGR_U switch 11 (long MK_TEMP 12)  {
  1552.                        13 case 0: long int i;
  1553.                             case 1: float f;
  1554.                     } foo_MKAGGR_U_MKGEN; 14
  1555.  
  1556.                     void
  1557.                     foo (
  1558.                        [  in] foo_MKAGGR_U_MKGEN U  15
  1559.                     );
  1560.  
  1561.                     }
  1562.  
  1563. Explanation for using -dceV10 
  1564.  
  1565. Displaying the source file u.c 1 reveals that there is a single function having 
  1566. a union parameter 2. File compilation 3 completes successfully 4. idlgen 
  1567. processes a single C input and produces an IDL file, u.idl, in one step 5. 
  1568. idlgen message trace is not shown 6.  The resulting IDL file is displayed 7, 
  1569. skipping the disclaimer meta comment header 8. One function 9 is exported.  The 
  1570. function has a single parameter, U, which uses an anonymous union. To assign 
  1571. IDL attributes, the union is assigned a name foo_MKAGGR_U 11, enclosed in a 
  1572. typedef whose name is also generated by idlgen: foo_MKAGGR_U_MKGEN 14.  These 
  1573. names are composed from the context where the union is defined originally:  the 
  1574. parameter U, of the function foo.  The generated typedef is preceded by a 
  1575. comment generated by idlgen 9.  The non-encapsulating union has the proper 
  1576. format, designating a long discriminator named formally as MK_TEMP 12. Two case 
  1577. of 0 and 1 mark the two possible fields of the union 13.  The reference to the 
  1578. new typedef becomes the new type of the original parameter 15. 
  1579.  
  1580.  
  1581. ΓòÉΓòÉΓòÉ 6.4.14.2. Using -dceV11 ΓòÉΓòÉΓòÉ
  1582.  
  1583. User
  1584.                     idlgen u.c -dceV11 -ido u.idl1 1
  1585.  
  1586. System
  1587.                      ...
  1588.  
  1589. User
  1590.                     type u.idl1
  1591.  
  1592. System
  1593.                     interface noname {
  1594.  
  1595.                      . . .
  1596.  
  1597.                     /*@[export] foo ;     file u.c */
  1598.  
  1599.                     /*Manufactured typedef for an aggregate by MakeDCE */
  1600.                     typedef union foo_MKAGGR_U  {
  1601.                        2   [case( 0)] long int i;
  1602.                              [case( 1)] float f;
  1603.                     } foo_MKAGGR_U_MKGEN;
  1604.  
  1605.                     void
  1606.                     foo (
  1607.                        [  in, switch_is( MK_TEMP 3)] foo_MKAGGR_U_MKGEN U
  1608.                     );
  1609.  
  1610.                     }
  1611.  
  1612. Explanation for using -dceV11 
  1613.  
  1614. idlgen is activated with the -dceV11 switch in the same context as the previous 
  1615. example, resulting in an IDL file containing an encapsulating union. As in the 
  1616. previous example, a new union and typedef are defined for the anonymous union 
  1617. originally found in the C source file.  The new format defines the case values 
  1618. only for the two alternative fields of the union 2.  In the function header, a 
  1619. [switch_is:] attribute is added with a temporary discriminator, MK_TEMP 3, 
  1620. which has to have a correct name of another parameter for the function (missing 
  1621. in this example). 
  1622.  
  1623.  
  1624. ΓòÉΓòÉΓòÉ 6.4.15. Dependencies Considerations ΓòÉΓòÉΓòÉ
  1625.  
  1626. When idlgen reads input, it builds a dependency graph of all language elements 
  1627. of the resulting IDL file and outputs only those that are needed to fully 
  1628. define the file.  In the following example, an IDL input file has some 
  1629. redundant declarations, which idlgen filters out of its output.  When input is 
  1630. C files, there are many declarations that are not needed for the IDL. 
  1631. Considering only the system include .h files is enough rationale to use idlgen. 
  1632.  
  1633. User
  1634.                     type orig.idl 1
  1635.  
  1636. System
  1637.                     [
  1638.                     uuid(0004CF04-AF11-1B28-8C80-10005AA8B716),
  1639.                     version(1.0)
  1640.                     ]
  1641.                     interface INTERFACENAME
  1642.                     {
  1643.                        const int a = 3;  2
  1644.                        const int b = a + 4;  3
  1645.                        const int c = a+b; 4
  1646.                        typedef int A[b*2];  5
  1647.                        void foo(A A);  6
  1648.                     }
  1649.  
  1650. User
  1651.                     idlgen orig.idl -o new.idl 7
  1652.  
  1653. System
  1654.                      ...
  1655.  
  1656. User
  1657.                     type new.idl
  1658.  
  1659. System
  1660.                     [
  1661.                     uuid(0004CF04-AF11-1B28-8C80-10005AA8B716),
  1662.                     version(1.0)
  1663.                     ] interface INTERFACENAME {
  1664.  
  1665.                      . . .  8
  1666.  
  1667.                     /*@[export] foo ; c.idl */  9
  1668.  
  1669.                     const int a= 3;  10
  1670.                     const int b= a + 4; 11
  1671.  
  1672.                     typedef int A[b*2];  12
  1673.  
  1674.                     void
  1675.                     foo (
  1676.                        A A  13
  1677.                     );
  1678.  
  1679.                     }
  1680.  
  1681. Explanation for dependencies 
  1682.  
  1683. The original IDL file is displayed 1.  The file defines several constants 2 - 4 
  1684. that are used to define the single foo operation 6. The function has a single 
  1685. parameter whose type 5 uses the constant b, which uses 3 the constant a 2. 
  1686. Apparently, the constant c 4 is not used anywhere. 
  1687.  
  1688. When you process this file with idlgen 7, the new file is reformatted, a 
  1689. disclaimer meta comment is added to it 8 (not shown), and an export meta 
  1690. comment for the foo operation is added 9.  Only the constants a 10 and b 11 are 
  1691. included, since they are needed to fully define the parameter type 12 and 13. 
  1692.  
  1693.  
  1694. ΓòÉΓòÉΓòÉ 6.4.16. Special MakeDCE keywords ΓòÉΓòÉΓòÉ
  1695.  
  1696. MakeDCE introduces MK_DEFAULT and MK_ERROR keywords. An example of the 
  1697. MK_DEFAULT is given in idlgen Invocation Example.  In the following example, a 
  1698. C source file is used to generate an IDL file and is then changed in a way that 
  1699. triggers idlgen to flag the change as a suspected error. 
  1700.  
  1701. User
  1702.                     type orig.c 1
  1703.  
  1704. System
  1705.                     struct s {
  1706.                        int i 2; float f 3;};
  1707.                     void foo( struct s S){};
  1708.  
  1709. User
  1710.                     idlgen orig.c -ido orig.idl 4
  1711.  
  1712. System
  1713.                      ... 5
  1714.  
  1715. User
  1716.                     type orig.idl
  1717.  
  1718. System
  1719.                     interface noname {
  1720.                       . . .
  1721.                     /*@[export] foo ;    file s.c */ 6
  1722.  
  1723.                     /*Manufactured typedef for an aggregate by MakeDCE */
  1724.                     typedef struct s  {
  1725.                        long int i; 7
  1726.                        float f; 8
  1727.                     } s_MKGEN;
  1728.  
  1729.                     void
  1730.                     foo (
  1731.                        [ in ] s_MKGEN S
  1732.                     );
  1733.                     }
  1734.  
  1735. struct s {
  1736.  
  1737. User
  1738.                     type new.c 9
  1739.  
  1740. System
  1741.                     struct s {
  1742.                        float i 10; float f 11;};
  1743.                     void foo( struct s S){};
  1744.  
  1745. User
  1746.                     idlgen orig.idl new.c -o new.idl 12
  1747.  
  1748. System
  1749.                      ...
  1750.  
  1751. User
  1752.                     type new.idl 13
  1753.  
  1754. System
  1755.                     interface noname {
  1756.                       . . .
  1757.                     /*@[export] foo ;     file s.c */
  1758.  
  1759.                     typedef struct s  {
  1760.                        [  MK_ERROR 14] long int  i;
  1761.                        float f;
  1762.                     } s_MKGEN;
  1763.  
  1764.                     void
  1765.                     foo (
  1766.                        [ in ] s_MKGEN S
  1767.                     );
  1768.                     }
  1769.  
  1770. Explanation for special MakeDCE keywords 
  1771.  
  1772. The original C file orig.c is displayed 1.  The file defines a single function 
  1773. with one parameter, which is a structure of two fields, int 2 and float 3. An 
  1774. IDL file orig.idl is generated from the original C file 4, skipping the idlgen 
  1775. execution trace 5 and displaying the generated IDL file. A meta comment 
  1776. declares the exported function 6 and includes the structure declaration with 
  1777. the two fields as in the original file, where the int is extended with a long 
  1778. modifier 7.  The float field remains as is 8. 
  1779.  
  1780. The C file is changed to new.c and displayed 9, revealing that the first field 
  1781. changed its type (but not the name) from int 2 to float 10. The second field 11 
  1782. remains as it was 3. The original IDL and and the modified C file 12 are 
  1783. merged, generating a new IDL file, new.idl, and displaying it 13. Since the 
  1784. first field in the structure has the same name, but a different type in the two 
  1785. input (C and IDL) files, this is marked as an error in the resulting file with 
  1786. the special keyword MK_ERROR 14.  An error message is also displayed (not shown 
  1787. here). 
  1788.  
  1789.  
  1790. ΓòÉΓòÉΓòÉ 6.5. idlgen Invocation Example ΓòÉΓòÉΓòÉ
  1791.  
  1792. Steps for invoking idlgen follow. 
  1793.  
  1794.  1. List the C source file 
  1795.  
  1796.  2. Run the initial IDL file 
  1797.  
  1798.  3. In the second phase, expand exported functions 
  1799.  
  1800.  4. In the third phase, clean up special keywords 
  1801.  
  1802.  5. Do everything in one step 
  1803.  
  1804.  6. Perform the full process from uuidgen to idl 
  1805.  
  1806.  
  1807. ΓòÉΓòÉΓòÉ 6.5.1. List the C source file ΓòÉΓòÉΓòÉ
  1808.  
  1809. User
  1810.                     type init.c 0
  1811.  
  1812. System
  1813.  
  1814.                     f(a){} 1
  1815.                     int x= 5; 2
  1816.                     static int g(int a, float b){}; 3
  1817.                     extern float h(int a); 4
  1818.                     int f1(char c); 5
  1819.                     int g1(char *s); 6
  1820.                     int f1(char c) { }; 7
  1821.  
  1822.  
  1823. User
  1824.                     icc -c init.c 8
  1825.  
  1826. System
  1827.                     9
  1828.  
  1829. Explanation of Listing the C source file 
  1830.  
  1831. Listing the source file init.c 0 shows that the file defines two global 
  1832. functions 1 and 7, one of which is preceded with a prototype 5.  One function 
  1833. is local (static) 3, one function is only a prototype (has no body) 6, and one 
  1834. function is a prototype of a function defined elsewhere 4. There is also one 
  1835. global variable 2.  When the file is compiled 8, there are no detected 
  1836. compilation errors 9. 
  1837.  
  1838.  
  1839. ΓòÉΓòÉΓòÉ 6.5.2. Run the initial IDL file ΓòÉΓòÉΓòÉ
  1840.  
  1841. User
  1842.                     idlgen init.c -o init.idl1 -interface test 1
  1843.  
  1844. System
  1845.  
  1846.                     MakeDCE 1.2 - Enabling tool for DCE
  1847.                     IBM Corporation (c) 1992, 1993  2
  1848.  
  1849.                     Running the C preprocessor  '... init.c ...' 3
  1850.                     Processing file 'init.c'...... C source file. 4
  1851.                     Output IDL file is 'init.idl1'. 5
  1852.                     Initial IDL file generation -- completed. 6
  1853.  
  1854. User
  1855.                     type init.idl1 7
  1856.  
  1857. System
  1858.                     interface test { 8
  1859.                     /*@;***************************************************************
  1860.                         * This file built with the MakeDCE facility for DCE ver 1.0   *
  1861.                         *     - A DCE Application-Development Enabling Tool           *
  1862.                         *                                                             *
  1863.                         * Initially generated on Mon May 24 20:24:37 1993 9         *
  1864.                         *         Last update on Mon May 24 20:24:37 1993 10        *
  1865.                         *                                                             *
  1866.                         * IBM Corporation 1992, 1993                                  *
  1867.                         ***************************************************************/
  1868.                     /*@[export] f;  file init.c */     11
  1869.                     /*@[noexport] x;     file init.c */   12
  1870.                     /*@[export] f1;      file init.c */    13
  1871.                     }
  1872.  
  1873. Explanation for running the initial IDL file 
  1874.  
  1875. Running idlgen takes one C input file, init.c, and produces IDL output into 
  1876. file init.idl1 designated with the -o switch 1.  This is also reported during 
  1877. the running of idlgen when the input file type is automatically determined as a 
  1878. C file 4 and the output file name is acknowledged 5. The C preprocessor is 
  1879. activated automatically on the input file using the default cpp command and 
  1880. switches 3, and idlgen runs without errors 6. Displaying the resulting IDL file 
  1881. 7 shows an empty interface header with a new name test 8 as requested in the 
  1882. command line using the -interface switch 1. Following the header is a 
  1883. disclaimer meta comment including the generation date and time 9 and the date 
  1884. and time of the last update 10, which are the same for the first time.  The 
  1885. list of symbols designation in meta comments recognizes the two functions 
  1886. defined in file f 11 and file f1 13. The global variable x is marked as 
  1887. noexport 12. 
  1888.  
  1889.  
  1890. ΓòÉΓòÉΓòÉ 6.5.3. In the second phase, expand exported functions ΓòÉΓòÉΓòÉ
  1891.  
  1892. User
  1893.                     idlgen init.idl1 init.c -o init.idl2 1
  1894.  
  1895. System
  1896.  
  1897.                     MakeDCE 1.2 - Enabling tool for DCE
  1898.                     IBM Corporation (c) 1992, 1993
  1899.  
  1900.                     Running the C preprocessor  '/...init.idl1...'  2
  1901.                     Processing file 'init.idl1'...... IDL file. 3
  1902.                     Importing IDL file '"dce\nbase.idl"' 4
  1903.                     Running the C preprocessor  '... dce\nbase.idl ...' 5
  1904.                     Running the C preprocessor  '... init.c ...' 6
  1905.                     Processing file 'init.c'...... C source file.  7
  1906.                     Output IDL file is 'init.idl2'.
  1907.                     Successful completion 8
  1908.  
  1909. User
  1910.                     type init.idl2 9
  1911.  
  1912. System
  1913.                     interface test {
  1914.                     /*@;***************************************************************
  1915.                         * This file built with the MakeDCE facility for DCE ver 1.0   *
  1916.                         *     - A DCE Application-Development Enabling Tool           *
  1917.                         *                                                             *
  1918.                         * Initially generated on Mon May 24 20:24:37 1993             *
  1919.                         *         Last update on Mon May 24 20:25:39 1993 10        *
  1920.                         *                                                             *
  1921.                         * IBM Corporation 1992, 1993                                  *
  1922.                         ***************************************************************/
  1923.                     /*@[export] f ;     file init.c */
  1924.                     /*@[noexport] x ;     file init.c */
  1925.                     /*@[export] f1 ;     file init.c */
  1926.  
  1927.                     long int MK_DEFAULT 11
  1928.                     f (
  1929.                        [  in, MK_DEFAULT] 12 long int MK_DEFAULT 13
  1930.                     );
  1931.  
  1932.  
  1933.                     long int MK_DEFAULT 14
  1934.                     f1 (
  1935.                        [  in, MK_DEFAULT] 15 char c
  1936.                     );
  1937.  
  1938.                     }
  1939.  
  1940. Explanation for expanding exported functions 
  1941.  
  1942. Running idlgen to merge an IDL and a C file takes the IDL file first and then 
  1943. the C file.  Based on the -o switch argument, an init.idl2 is selected for 
  1944. output 1 (instead of init.idl1 - the IDL input file). The first file init.idl1 
  1945. is preprocessed 2 and automatically recognized as an IDL file 3.  For the IDL 
  1946. file, idlgen automatically imports the DCE base file nbase.idl 4, which is 
  1947. located at the DCE installation base (whose path is stored in the NIDLDIR 
  1948. environment variable) and preprocess this file as well 5. As in the first 
  1949. stage, the C input file init.c is preprocessed 6 and recognized as a C file 7. 
  1950. idlgen successfully completes 8, writing its output to the designated output 
  1951. file init.idl2, which is subsequently listed 9.  The resulting IDL file has an 
  1952. updated date and time in the header disclaimer 10 and an expansion of the two 
  1953. exportable functions f and f1. The special keyword MK_DEFAULT is entered in 
  1954. places where idlgen adds attributes 12 and 15 and where idlgen extends the C 
  1955. types 11, 13, and 14 to the accuracy required by the idl compiler. 
  1956.  
  1957.  
  1958. ΓòÉΓòÉΓòÉ 6.5.4. In the third phase, clean up special keywords ΓòÉΓòÉΓòÉ
  1959.  
  1960. User
  1961.                     idlgen init.idl2 init.c -o init.idl3 1
  1962.  
  1963. System
  1964.  
  1965.                     MakeDCE 1.2 - Enabling tool for DCE
  1966.                     IBM Corporation (c) 1992, 1993    2
  1967.  
  1968.                     Running the C preprocessor  '... init.idl2...'
  1969.                     Processing file 'init.idl2'...... IDL file.
  1970.                     Importing IDL file '"dce\nbase.idl"'
  1971.                     Running the C preprocessor  '... dce\nbase.idl ...'
  1972.                     Running the C preprocessor  '... init.c ...'
  1973.                     Processing file 'init.c'...... C source file.
  1974.                     Output IDL file is 'init.idl3'.
  1975.                     Successful completion
  1976.  
  1977. User
  1978.                     type init.idl3
  1979.  
  1980. System
  1981.                     interface test {
  1982.                     /*@;***************************************************************
  1983.                         * This file built with the MakeDCE facility for DCE ver 1.0   *
  1984.                         *     - A DCE Application-Development Enabling Tool           *
  1985.                         *                                                             *
  1986.                         * Initially generated on Mon May 24 20:24:37 1993             *
  1987.                         *         Last update on Mon May 24 20:26:00 1993  3        *
  1988.                         *                                                             *
  1989.                         * IBM Corporation 1992, 1993                                  *
  1990.                         ***************************************************************/
  1991.                     /*@[export] f ;     file init.c */
  1992.                     /*@[noexport] x ;     file init.c */
  1993.                     /*@[export] f1 ;     file init.c */
  1994.  
  1995.                     long int          4
  1996.                     f (
  1997.                        [  in] long int a
  1998.                     );
  1999.  
  2000.  
  2001.                     long int
  2002.                     f1 (              5
  2003.                        [  in] char c
  2004.                     );
  2005.                     }
  2006.  
  2007. User
  2008.                     idl -syntax_only init.idl3 6
  2009.  
  2010. System
  2011.                      7
  2012.                     Operation f has no binding handle parameter; [auto_handle] assumed
  2013.                     Operation f1 has no binding handle parameter; [auto_handle] assumed
  2014.                     idl: File init.idl3, line 1: interface noname {
  2015.                     Interface UUID must be specified 8
  2016.  
  2017. Explanation for cleaning up special keywords 
  2018.  
  2019. The third running of idlgen merges the resulting IDL file from the previous 
  2020. stage, init.idl2, with the original C source, init.c, and writes the result to 
  2021. a new IDL file, init.idl3 1. The trace of the run 2 is very similar to the 
  2022. previous stage where all input files are preprocessed and their types 
  2023. automatically recognized. The resulting file has a new date and time stamp for 
  2024. the update in the header disclaimer 3, and the exported functions have been 
  2025. cleaned 4 and 5 of the special keywords for processing by the idl compiler 6 
  2026. and 7. 
  2027.  
  2028. Note:  The requirement for a UUID 8 could be met by using uuidgen -i at the 
  2029. start. 
  2030.  
  2031.  
  2032. ΓòÉΓòÉΓòÉ 6.5.5. Do everything in one step ΓòÉΓòÉΓòÉ
  2033.  
  2034. User
  2035.                     idlgen init.c -id 1
  2036.  
  2037. System
  2038.  
  2039.                     MakeDCE 1.2 - Enabling tool for DCE
  2040.                     IBM Corporation (c) 1992, 1993
  2041.  
  2042.                     Running the C preprocessor  '... init.c ...'
  2043.                     Processing file 'init.c'...... C source file. 2
  2044.                     Output IDL file is 'standard output (stdout)'. 3
  2045.                     Successful completion
  2046.                     interface noname {
  2047.                     /*@;***************************************************************
  2048.                         * This file built with the MakeDCE facility for DCE ver 1.0   *
  2049.                         *     - A DCE Application-Development Enabling Tool           *
  2050.                         *                                                             *
  2051.                         * Initially generated on Mon May 24 20:40:58 1993             *
  2052.                         *         Last update on Mon May 24 20:40:58 1993             *
  2053.                         *                                                             *
  2054.                         * IBM Corporation 1992, 1993                                  *
  2055.                         ***************************************************************/
  2056.                     /*@[export] f ;     file init.c */
  2057.                     /*@[noexport] x ;     file init.c */
  2058.                     /*@[export] f1 ;     file init.c */
  2059.  
  2060.                     long int
  2061.                     f (
  2062.                        [  in] long int a
  2063.                     );
  2064.  
  2065.  
  2066.                     long int
  2067.                     f1 (
  2068.                        [  in] char c
  2069.                     );
  2070.  
  2071.                     }
  2072.  
  2073. Explanation for doing everything in one step 
  2074.  
  2075. Note that the command switches -i and -d are combined. They force idl to skip 
  2076. the init and default insertion steps 1. There is only one input file 2, 
  2077. recognized as a C file, and the output goes to standard-output 3, where it is 
  2078. displayed (and is the same in content as the file that resulted from all the 
  2079. steps above). 
  2080.  
  2081.  
  2082. ΓòÉΓòÉΓòÉ 6.5.6. Perform the full process from uuidgen to idl ΓòÉΓòÉΓòÉ
  2083.  
  2084. User
  2085.                     uuidgen -i | idlgen -stdin 1 test.c -id -interface test |
  2086.                         idl -stdin 2
  2087.  
  2088. System
  2089.                     MakeDCE 1.2 - Enabling tool for DCE 3
  2090.                     IBM Corporation (c) 1992, 1993
  2091.  
  2092.                     Running the C preprocessor  '....' 5
  2093.                     Processing file '-stdin'...... IDL file. 6
  2094.                     Importing IDL file '"dce\nbase.idl"'
  2095.                     Running the C preprocessor  '... dce\nbase.idl ...' 7
  2096.                     Running the C preprocessor  '... init.c ...' 8
  2097.                     Processing file 'init.c'...... C source file. 9
  2098.                     Output IDL file is 'standard output (stdout)'. 10
  2099.                     Successful completion
  2100.                     Operation f has no binding handle parameter; [auto_handle] assumed 11
  2101.                     Operation f1 has no binding handle parameter; [auto_handle] assumed
  2102.  
  2103.  
  2104. Explanation for performing the full process 
  2105.  
  2106. The single-line call invokes three tools, uuidgen, idlgen, and the IDL 
  2107. compiler. uuidgen generates a skeleton IDL file including a UUID and pipes its 
  2108. output to idlgen.  The -stdin switch 1 tells idlgen to read its first input 
  2109. from the standard input, which is the uuidgen output.  idlgen recognizes this 
  2110. first input as an IDL file 6, which it preprocesses 5, and then imports the 
  2111. base IDL import, preprocessing it as well 7.  Last in is the C source file, 
  2112. which idlgen preprocesses 8 and then displays the information message that it 
  2113. recognizes the file as a C file 9. The IDL output goes to standard output 10, 
  2114. and idlgen completes successfully. 
  2115.  
  2116. The output is piped into the third tool, the idl compiler, which reads its 
  2117. input from standard input 2 and generates the stubs for it, reporting that it 
  2118. assumes auto_handles for both operations 11. 
  2119.  
  2120.  
  2121. ΓòÉΓòÉΓòÉ 7. gluegen - Glue-Code Generator ΓòÉΓòÉΓòÉ
  2122.  
  2123. This chapter details the operation and use of the MakeDCE gluegen tool. 
  2124.  
  2125. gluegen takes as input your application topology defined by a set of 
  2126. parameters. gluegen uses a simple formal language to compound the parameters 
  2127. and generate the appropriate glue-code. Parameters that are not specific to 
  2128. gluegen are defined in the DCE documentation. Those specific to gluegen are 
  2129. detailed here. 
  2130.  
  2131. In the discussion that follows, the nature of the input to gluegen is discussed 
  2132. as well as what happens to the input. A detailed presentation is given on the 
  2133. gluegen command line and options, as well as the formal gluegen language - 
  2134. Application Profile (APF) Language. 
  2135.  
  2136.  
  2137. ΓòÉΓòÉΓòÉ 7.1. gluegen Profile Objects ΓòÉΓòÉΓòÉ
  2138.  
  2139. The DCE parameters used by gluegen are discussed before the gluegen language is 
  2140. introduced. One set of parameters is used to define the Interface Profile. One 
  2141. or more interface profiles, with additional parameters, are combined into a 
  2142. single Application Profile. 
  2143.  
  2144.  
  2145. ΓòÉΓòÉΓòÉ 7.1.1. Interface Profile ΓòÉΓòÉΓòÉ
  2146.  
  2147. The interface profile parameters affect the initialization process and the 
  2148. binding method that an application node uses with respect to a given interface. 
  2149. Client and Server nodes of a given interface may have different interface 
  2150. profiles; however, proper binding of the two at runtime is guaranteed only by 
  2151. using compatible or identical profiles. 
  2152.  
  2153. The interface profile parameters fall into two categories: compile-time 
  2154. parameters and runtime parameters. Values of compile-time parameters must be 
  2155. specified by the interface profile itself. Values of runtime parameters can be 
  2156. specified initially by the profile or later at runtime upon invocation of the 
  2157. Client and Server applications. 
  2158.  
  2159. The following list describes the interface profile parameters. The notation 
  2160. parameter = value is used to describe a parameter and its possible values. The 
  2161. names and terminology used here are taken as much as possible from the DCE 
  2162. books (see Related Documents for a list). 
  2163.  
  2164. o protseq = protcol-sequence 
  2165.   A runtime parameter that defines a valid combination of communication 
  2166.   protocols that may take one of the following string values: ncadg_ip_udp or 
  2167.   ncaca_ip_tcp. 
  2168.  
  2169. o host = host-addr 
  2170.   A runtime parameter that identifies a specific host system that exports the 
  2171.   interface services. The format of host-addr depends on the network protocol 
  2172.   in protseq, for example, 129.35.65.233 for ncadg_ip_udp. 
  2173.  
  2174. o ep = endpoint 
  2175.   A runtime parameter that defines a communication endpoint for the specific 
  2176.   server instance that exports the interface services. A unique endpoint is 
  2177.   required for each protocol that a server uses, for example, 1027. If not 
  2178.   specified, the endpoint is allocated dynamically by the system. 
  2179.  
  2180. o eptype = endpoint-type 
  2181.   A runtime parameter that controls endpoint allocation and may take one of two 
  2182.   values:  shared or unique. A shared endpoint can be used by multiple 
  2183.   interfaces; unique endpoint can be shared by none. By default, endpoint-type 
  2184.   is shared. 
  2185.  
  2186. o obj = object-id 
  2187.   A runtime parameter that specifies a particular object universal unique 
  2188.   identifier (UUID) to be used for binding the proper server. When the 
  2189.   specified interface is associated with multiple server instances, the obj 
  2190.   parameter can be used to refine the selection of the requested server 
  2191.   instance, for example, 30DBEEA0-FB6C-11C9-8EEA-08002B0F4528. 
  2192.  
  2193. o nse = name-service-entry 
  2194.   A runtime parameter that specifies the path name of an entry stored in the 
  2195.   Cell Directory Service database, which can be used to bind with proper 
  2196.   server. The path of the named entry can be global CDS name, which contains 
  2197.   the /... prefix, or relative CDS name, which contains the /.: prefix.  An 
  2198.   example is /.:/hrg/server-1. 
  2199.  
  2200. o bindtype = binding-method 
  2201.   A compile-time parameter that defines the method for obtaining the binding 
  2202.   information for the binding parameters previously described. The 
  2203.   binding-method can be one of the following: string, lepm, repm, or ns. 
  2204.  
  2205.   Note:  This parameter identifies the set of binding parameters (previously 
  2206.   defined) that are used to bind that interface at runtime. The minimal 
  2207.   required set of binding parameters is protseq, host, and ep. Other binding 
  2208.   parameters like interface UUID and Version are determined automatically. The 
  2209.   obj parameter is optional, and the nse parameter is required only when using 
  2210.   the Name Service database. 
  2211.  
  2212.    string    Denotes that the binding method used is full-string binding. The 
  2213.              user should supply the binding parameters (possibly at runtime) 
  2214.              and none is determined automatically. The minimal required binding 
  2215.              parameters are protseq, host, and ep. In this binding type, the 
  2216.              Client and the Server can run on different hosts. The Server 
  2217.              requires only the protseq parameter and may need to output its 
  2218.              dynamically allocated endpoint.  The output method to be used is 
  2219.              defined in the application profile. See the following discussion. 
  2220.              The Client requires all three binding parameters previously 
  2221.              mentioned to accomplish full-string binding; some parameters can 
  2222.              be specified by the interface profile and others at runtime. 
  2223.    lepm      Denotes that the Server endpoint is allocated dynamically and 
  2224.              should be resolved by clients using the local endpoint map 
  2225.              maintained by the RPC daemon (rpcd). The obj parameter, if 
  2226.              defined, is used for resolving the Server endpoint. In this 
  2227.              binding type, the Client and the Server are assumed to run on the 
  2228.              same host. The host parameter is determined automatically, and 
  2229.              only the protseq parameter is required by both Client and Server. 
  2230.              The Server job is to register its endpoint in the local endpoint 
  2231.              map, and the Client has to resolve its partial server binding 
  2232.              using the same endpoint map. 
  2233.    repm      Denotes that the Server endpoint is allocated dynamically and 
  2234.              should be resolved using a remote endpoint map. The obj parameter, 
  2235.              if defined, is used to resolve the Server endpoint. In this 
  2236.              binding type, the Client and the Server can run on different 
  2237.              hosts. Only the protseq and host parameter are required. The 
  2238.              Server job is to register its dynamically allocated endpoint in 
  2239.              its local endpoint map, and the Client has to query the remote 
  2240.              endpoint map, using the host parameter, to obtain the Server 
  2241.              endpoint. 
  2242.    ns        Denotes that the binding parameters protseq, host, and ep are 
  2243.              resolved automatically using the Name Service database. The nse 
  2244.              parameter must be specified and, together with the obj parameter, 
  2245.              is used to resolve the binding information stored in the name 
  2246.              service database. In this binding type, the Client and the Server 
  2247.              can run on different hosts, and the cdsclerk programs on both 
  2248.              hosts should be running.  Using the nse parameter, the Server has 
  2249.              to export its binding information into the name service database 
  2250.              and the Client has to import that information from the database. 
  2251.  
  2252. o handle = handle-type 
  2253.   A compile-time parameter that defines the type of handle to be used by the 
  2254.   interface. Handle type can be implicit, explicit, or auto (see the OSF DCE 
  2255.   Application Development Guide). 
  2256.  
  2257.    - The implicit handle type informs DCE that binding to the Server is managed 
  2258.      by the application using a global variable. The presence of a binding 
  2259.      handle parameter in the interface operations is not required. 
  2260.  
  2261.    - The explicit handle type informs DCE that binding to the Server is managed 
  2262.      by the application and that a binding handle parameter is included in each 
  2263.      interface operation. 
  2264.  
  2265.    - The auto handle type informs DCE to automatically manage the binding to 
  2266.      the Server by using a name service. The presence of a binding handle 
  2267.      parameter in the interface operations is not required. 
  2268.  
  2269. o idl = idl-file 
  2270.   A compile-time parameter that specifies the name of the IDL file describing 
  2271.   the services provided by the interface. The relevant information is stored in 
  2272.   the IDL file header and includes: 
  2273.  
  2274.    version, idl version  Major and minor version numbers are needed for 
  2275.                          internally identifying implicit handles. 
  2276.    interface name        This name is also used to construct the internal name 
  2277.                          identifying implicit interface handles. 
  2278.  
  2279. Interface Profile Example 
  2280.  
  2281. Consider the distributed application graph in Distributed Application Graph. 
  2282. Notice that interface I1 is exported only by node D. To model dynamic endpoint 
  2283. allocation and binding for I1, the following interface profile can be used. 
  2284.  
  2285.          interface profile for I{1}
  2286.  
  2287.           protseq  = ncadg_ip_udp
  2288.           host     = nodeD
  2289.           bindtype = repm
  2290.           handle   = explicit
  2291.           idl      = "I1.idl"
  2292.  
  2293. Note:  This is not a file.  The organization of such information in an 
  2294.        interface object is done formally using information found in Application 
  2295.        Profile Specification Language. 
  2296.  
  2297.  
  2298. ΓòÉΓòÉΓòÉ 7.1.2. Application Profile ΓòÉΓòÉΓòÉ
  2299.  
  2300. gluegen configures DCE applications using application profiles. To form an 
  2301. application profile, one or more interface profiles are combined with 
  2302. additional global parameters, possibly overwriting some interface profile 
  2303. parameters. 
  2304.  
  2305. As in the preceding description of the interface profile, the notation 
  2306. parameter = value is used to denote a parameter and its possible values. Note 
  2307. that this is not the actual syntax used by gluegen to define application 
  2308. profiles. To formally define the interface and application profiles, use the 
  2309. Application Profile Language discussed in Application Profile Specification 
  2310. Language. 
  2311.  
  2312. o nthreads = n 
  2313.   Specifies the maximum number of service threads to be used by a Server 
  2314.   application. This number can be smaller, or higher, than the number of 
  2315.   interfaces exported by the application. By default, n is 1, which means that 
  2316.   service requests are processed serially. 
  2317.  
  2318. o finput = input-file 
  2319.   Names an input file for obtaining values of interface profile parameters at 
  2320.   runtime. Examples of interface runtime parameters are protseq, host, ep, and 
  2321.   so on. The input file is read as part of the Client/Server initialization 
  2322.   process and prior to any binding attempt of importing interfaces. Parameter 
  2323.   values retrieved from the input file can be overwritten by command line 
  2324.   arguments. 
  2325.  
  2326.   The input-file assumes the following values: 
  2327.  
  2328.    stdin         Denotes that parameter values are read from standard input. 
  2329.    null          Denotes that finput is to be ignored (default). 
  2330.    file-name     Denotes that parameter values are read from file file-name. 
  2331.    "file-name"   Denotes that runtime parameters are read from file file-name; 
  2332.                  for instance, "stdin" is taken as a file named stdin rather 
  2333.                  than the standard input. 
  2334.  
  2335. o foutput = output-file 
  2336.   A runtime parameter that names a file for writing values of binding 
  2337.   parameters, such as those obtained during runtime by a Server exporting an 
  2338.   interface. The output file is generated as part of the Client/Server 
  2339.   initialization process, after all binding operations of imported and exported 
  2340.   interfaces have been completed. The file is written using a compatible format 
  2341.   for the finput parameter and can serve as an input file on the Client side. 
  2342.  
  2343.   The output-file can assume the following values: 
  2344.  
  2345.    stdout        Denotes that parameter values are written to the standard 
  2346.                  output (default). 
  2347.    stderr        Denotes that parameter values are written to the standard 
  2348.                  error file. 
  2349.    null          Denote that foutput is to be ignored. 
  2350.    file-name     Denotes that parameter values are written to the file 
  2351.                  file-name. 
  2352.    "file-name"   Denotes that runtime parameters will be written to the file 
  2353.                  file-name; for instance, stdout is taken as a file named 
  2354.                  stdout rather than the standard output. 
  2355.  
  2356. o import = interface-profile 
  2357.  
  2358. o export = interface-profile 
  2359.   Associates an interface profile with the specified application, having an 
  2360.   import, or export roles, respectively. The profile describes the 
  2361.   initialization process and binding method to be used by the application, with 
  2362.   respect to the specified interface. 
  2363.  
  2364. The interface parameters can have multiple occurrences, each associating the 
  2365. application with a different interface. 
  2366.  
  2367.  
  2368. ΓòÉΓòÉΓòÉ 7.1.2.1. Parsing Command Arguments - Example ΓòÉΓòÉΓòÉ
  2369.  
  2370. Applications generated by gluegen parse their command arguments at runtime, 
  2371. assuming that the values of the interface profile parameters are specified as 
  2372. pairs: 
  2373.  
  2374.           -interface.parm value
  2375. For example an application named client that imports interface I1 can be 
  2376. invoked by the following: 
  2377.  
  2378.          client -I1.protseq ncadg_ip_udp -I1.host 129.35.65.223
  2379. If the interface part of the parameter specifications is omitted, for example 
  2380.  
  2381.          client -protseq ncadg_ip_udp -host 129.35.65.223
  2382. the value for these parameters is taken as default for all interfaces. 
  2383.  
  2384. The same holds for application profile parameters.  For example, redirection of 
  2385. input and output files for binding parameters can be done at runtime as 
  2386. follows: 
  2387.  
  2388.          server  -foutput binding_file
  2389.          client  -finput  binding_file
  2390.  
  2391.  
  2392. ΓòÉΓòÉΓòÉ 7.1.3. Application Profile Specification Language ΓòÉΓòÉΓòÉ
  2393.  
  2394. Formal specification of application profiles is facilitated by means of an 
  2395. Application Profile Language (APF Language). Complete syntax of the language is 
  2396. provided in APF Language Grammar. An informal description of the language is 
  2397. given here by means of some application profile examples. 
  2398.  
  2399. An application profile generally contains two types of statements. An interface 
  2400. statement defines an interface profile, and an application statement defines a 
  2401. collection of interfaces together with additional global parameters. 
  2402.  
  2403. For example, look at the distributed application graph in Distributed 
  2404. Application Graph. Application node A imports interface I1 and exports 
  2405. interfaces I2 and I3.  The definition of application node A using the APF 
  2406. Language would look like the following (keywords are in bold letters): 
  2407.  
  2408.       /* Application Profile for Node A */
  2409.  
  2410.       interface I1 {
  2411.            protseq = ncadg_ip_udp;
  2412.            host = nodeD;
  2413.            bindtype = repm;
  2414.            handle = explicit;
  2415.            idl = "I1.idl";
  2416.         }
  2417.  
  2418.      interface I2 {
  2419.           protseq = ncadg_ip_udp;
  2420.           bindtype = lepm;
  2421.           handle = explicit;
  2422.           idl = "I2.idl";
  2423.      }
  2424.  
  2425.      interface I3 {
  2426.           protseq = ncadg_ip_udp;
  2427.           bindtype = lepm;
  2428.           handle = explicit;
  2429.           idl = "I3.idl";
  2430.      }
  2431.  
  2432.      applicationappA {.
  2433.          finput = null;
  2434.          foutput = stdout;
  2435.          nthreads = 1;
  2436.          import I1;
  2437.          export I2;
  2438.          export I3;
  2439.      }
  2440. The preceding application profile defines an application named appA. The 
  2441. (interface) binding parameters for appA, some provided with command arguments 
  2442. and some resolved at runtime, are written to the standard output. No binding 
  2443. information is read from the input file. 
  2444.  
  2445.  
  2446. ΓòÉΓòÉΓòÉ 7.1.3.1. Application Profile using Preprocessor Directives ΓòÉΓòÉΓòÉ
  2447.  
  2448. You can gain more flexibility by separating the definition of interfaces from 
  2449. the definition of applications. To this end, the Application Profile Language 
  2450. can contain include and define statements, which have the same meaning as for 
  2451. the C language macro-processor. 
  2452.  
  2453. For example, let the interface statements for I1, I2, and I3 of appA be stored 
  2454. in files I1.ipf, I2.ipf, and I3.ipf, respectively. An equivalent application 
  2455. profile for appA looks like the following: 
  2456.  
  2457.       /* Application Profile for Node A  using
  2458.       ** interface profiles: I1.ipf, I2.ipf and I3.ipf
  2459.       */
  2460.       #include "I1.ipf"
  2461.       #include "I2.ipf"
  2462.       #include "I3.ipf"
  2463.  
  2464.       applicationappA {.
  2465.          finput = null;
  2466.          foutput = stdout;
  2467.          import I1;
  2468.          export I2;
  2469.          export I3;
  2470.      }
  2471.  
  2472.  
  2473. ΓòÉΓòÉΓòÉ 7.1.3.2. Application Profile using the Like Statement ΓòÉΓòÉΓòÉ
  2474.  
  2475. Similar interface profiles can be defined using the like statement. For 
  2476. example, the definition of interface I3, above, can be based on I2 as follows: 
  2477.  
  2478.       /* Application Profile for Node A  using
  2479.       ** I1.ipf, I2.ipf and the LIKE statement
  2480.       */
  2481.       #include "I1.ipf"
  2482.       #include "I2.ipf"
  2483.  
  2484.       interface I3 like I2 { idl = "I3.idl" }
  2485.  
  2486.       applicationappA {.
  2487.          finput = null;
  2488.          foutput = stdout;
  2489.          import I1;
  2490.          export I2;
  2491.          export I3;
  2492.      }
  2493.  
  2494.  
  2495. ΓòÉΓòÉΓòÉ 7.1.3.3. Application Profile for Simple Client and Server ΓòÉΓòÉΓòÉ
  2496.  
  2497. Consider the case of Client and Server applications running on the same host, 
  2498. where the Server exports interface I1 and the Client imports that interface. 
  2499. The application profile for the two applications might look like the following: 
  2500.  
  2501.       /* Application Profile for Simple Client and Server
  2502.       ** running on the same host
  2503.       */
  2504.      interface I1 {
  2505.           protseq = ncadg_ip_udp;
  2506.           bindtype = lepm;
  2507.           handle = implicit;
  2508.           idl = "I1.idl";
  2509.      }
  2510.  
  2511.      application Server {.
  2512.          foutput = stdout;
  2513.          export I1
  2514.      }
  2515.  
  2516.      application Client {.
  2517.          foutput = stdout;
  2518.          import I1
  2519.      }
  2520.  
  2521.  
  2522. ΓòÉΓòÉΓòÉ 7.2. Glue-Code Generation ΓòÉΓòÉΓòÉ
  2523.  
  2524. The MakeDCE gluegen tool generates application glue-code. It is convenient to 
  2525. view the gluegen tool as being parallel to the DCE/RPC idl compiler (see 
  2526. Client/Server component overview in MakeDCE environment). 
  2527.  
  2528. Code generaged by gluegen has three components: 
  2529.  
  2530. glue-code                Generated by gluegen from information in the APF file 
  2531.                         and consisting of the main() entry points to the Client 
  2532.                         or Server applications. These are simple programs that 
  2533.                         make very few calls to routines in glue runtime library 
  2534.                         (see The Glue APIs). 
  2535. glue-stub                Generated by gluegen from information in the APF file, 
  2536.                         building internal structures where all the information 
  2537.                         is stored and where references are defined for global 
  2538.                         variables declared in the DCE stubs generated by the 
  2539.                         idl compiler. This portion can be viewed as parallel to 
  2540.                         the RPC stubs generated by the idl compiler. 
  2541.  
  2542.                         Note:  gluegen generates a single glue-stub for each 
  2543.                                application, whereas idl generates multiple DCE 
  2544.                                stubs - one for each interface in the 
  2545.                                application. Also, as side effect of glue-stub 
  2546.                                generation, gluegen creates an ACF file for each 
  2547.                                interface that uses an implicit handle. 
  2548.  
  2549.  
  2550. glue runtime library    Supports the glue-code and glue-stubs generated by 
  2551.                         gluegen. It has a role similar to the DCE runtime 
  2552.                         library, which supports the RPC stubs generated by the 
  2553.                         idl compiler. The glue runtime library also uses the 
  2554.                         DCE runtime library. 
  2555.  
  2556.  
  2557. ΓòÉΓòÉΓòÉ 7.3. The gluegen Command ΓòÉΓòÉΓòÉ
  2558.  
  2559. This section discusses the gluegen command line syntax.  The general format of 
  2560. the command follows: 
  2561.  
  2562.  
  2563. gluegen app_profile app_name
  2564.   [-help] [-no_main] [-fmain func_name] [-Idir]
  2565.   [-cpp_cmd cpp] [-cpp_opt cppOpt] [-no_cpp]
  2566.   [-cc_cmd cc] [-cc_opt ccOpt] [-Dname] [-Uname]
  2567.   [ -keep {c_source | object | both} ] [-v]
  2568.  
  2569. The gluegen command invokes the glue-code generator to convert an application 
  2570. named app_name and specified by means of the application profile app_profile 
  2571. (.apf file) into a DCE program. The output files produced by gluegen include a 
  2572. glue-stub file, ACF file (.acf) for each interface imported or exported by 
  2573. app_name (when implicit handles are used), and a main program. 
  2574.  
  2575. The glue-code generator constructs the name of the glue-stub by appending the 
  2576. extension _gstub to app_name. For example, if an application is named client, 
  2577. the corresponding glue-stub object file is named client_gstub.o. 
  2578.  
  2579.  
  2580. The gluegen command accepts the following input: 
  2581.  
  2582. o An application profile (.apf file). 
  2583.  
  2584. o The name of an application defined in the application profile. 
  2585.  
  2586. o Arguments to indicate either special action to be performed by the glue-code 
  2587.   generator or special properties for the input or output files. 
  2588.  
  2589. Programs that make use of the glue-stubs generated by gluegen should be linked 
  2590. with two libraries. 
  2591.  
  2592. o For AIX, the glue library libglue.a and the DCE library libdce.a. 
  2593.  
  2594. o For OS/2, the glue library glue.lib and the DCE library dceos2.lib. 
  2595.  
  2596.  
  2597. ΓòÉΓòÉΓòÉ 7.3.1. gluegen Options ΓòÉΓòÉΓòÉ
  2598.  
  2599. The following options are available for controlling gluegen operations. You can 
  2600. include a number of options on the same line.  The order is not important. 
  2601. However, they are case-sensitive. When the same option is specified multiple 
  2602. times, the last one is taken. 
  2603.  
  2604. -no_main 
  2605.           This option suppresses the generation of the application main module. 
  2606.           When this option is specified, gluegen generates only the 
  2607.           application's glue-stub. 
  2608.  
  2609. -fmain func_name 
  2610.           gluegen uses func_name as the name of the function to be called by a 
  2611.           Client application after all initialization process and binding 
  2612.           operations have been completed. This function should represent the 
  2613.           actual activity of the Client application, usually in the form of 
  2614.           main() for non-DCE applications. If this option is not specified, 
  2615.           gluegen assumes a default function named fmain. 
  2616.  
  2617.  
  2618.           func_name (as well as the default function fmain) should have the 
  2619.           following prototype: 
  2620.  
  2621.  
  2622.                     void func_name(int argc, char **argv, char **env);
  2623.  
  2624. -Idir 
  2625.           Use this option to specify a directory path for include files. You 
  2626.           can specify more than one path by including additional -Idir 
  2627.           arguments on the command line. The directories are searched in the 
  2628.           order you list them. If a file is present in more than one directory, 
  2629.           the first occurrence of the file is taken. The default behavior of 
  2630.           gluegen is to search the current directory first and then to search 
  2631.           all specified directories. 
  2632.  
  2633. -cpp_cmd 'cpp-command' 
  2634.           Invokes the C preprocessor you specify in 'cpp-command' rather than 
  2635.           the default. The preprocessor command you specify should direct its 
  2636.           output to the standard output. 
  2637.  
  2638. -cpp_opt 'cpp-options' 
  2639.           Specifies additional options to be passed to the C preprocessor. You 
  2640.           can add options to the command line used to invoke the C preprocessor 
  2641.           independent of the -cpp_cmd option. gluegen concatenates the 
  2642.           -cpp_cmd, -cpp_opt, -D, -U, and -I arguments and the APF file name 
  2643.           into a command that calls the C preprocessor. 
  2644.  
  2645. -no_cpp 
  2646.           Prevents calling the C preprocessor. Note that the C processor must 
  2647.           be run on .apf files that contain preprocessor directives (such as 
  2648.           #define or #include). 
  2649.  
  2650. -cc_cmd 'cc-command' 
  2651.           Invokes the C compiler and the compiler options you specify in 
  2652.           'cc-command' rather than the default. 
  2653.  
  2654. -cc_opt 'cc-options' 
  2655.           Specifies additional options to be passed to the C compiler. You can 
  2656.           add options to the command line used to call the C compiler 
  2657.           independent of the -cc_cmd option. gluegen concatenates the -cc_cmd, 
  2658.           -cc_opt, and -I arguments and the source filename into a command that 
  2659.           calls the C compiler. 
  2660.  
  2661. -Dname[=definition] 
  2662.           Use this option to define a symbol name and an optional value to be 
  2663.           passed to the C preprocessor. You can use this method for defining 
  2664.           symbols instead of the #define directive in the source code. You can 
  2665.           use more than one -Dname argument on the command line. This argument 
  2666.           has no effect if the -no_cpp option is in use. 
  2667.  
  2668. -Uname 
  2669.           This is the reverse of the -D option; it undefines a symbol name for 
  2670.           the C preprocessor. You can use this method for removing symbol 
  2671.           definitions instead of using the #undef directive in the source code. 
  2672.           You can use more than one -Uname argument on the command line. This 
  2673.           argument has no effect if the -no_cpp option is in use. If you define 
  2674.           and undefine a name on the same command line, undefining takes 
  2675.           precedence. 
  2676.  
  2677. -keep file_types 
  2678.           This option tells gluegen the file types to retain. To produce object 
  2679.           modules, gluegen first creates C source modules, then calls the C 
  2680.           compiler to produce object modules, and finally deletes the C source 
  2681.           modules. If the keep argument is not used, only the object modules 
  2682.           are saved. 
  2683.  
  2684.  
  2685.           The file_type values are the following: 
  2686.  
  2687.    c_source  Saves only the C source modules. Does not invoke the C compiler. 
  2688.    object    Saves only the object modules. 
  2689.    both      Saves both the C source and the object modules. 
  2690.  
  2691.  
  2692. ΓòÉΓòÉΓòÉ 7.3.2. Getting Help in gluegen ΓòÉΓòÉΓòÉ
  2693.  
  2694.  
  2695. gluegen provides you with two aids: 
  2696.  
  2697. -help     If you invoke gluegen with just this option, you get a display with 
  2698.           short descriptions of the command line options and arguments. 
  2699. -v        Similar to the IDL compiler, gluegen runs silently. If you want 
  2700.           informational messages to display while gluegen is running, include 
  2701.           -v in the command line. -v turns on the verbose mode. 
  2702.  
  2703.  
  2704. ΓòÉΓòÉΓòÉ 7.3.3. Cautions ΓòÉΓòÉΓòÉ
  2705.  
  2706. When using implicit handles, gluegen generates an ACF file (.acf) for each 
  2707. imported or exported interface. This ACF file corresponds to the IDL file for 
  2708. the given interface (see the following example). To generate proper DCE stubs, 
  2709. you have to run gluegen prior to invoking the IDL compiler. 
  2710.  
  2711.  
  2712. ΓòÉΓòÉΓòÉ 7.3.4. Example ΓòÉΓòÉΓòÉ
  2713.  
  2714. This example assumes that the application profile binop.apf contains the 
  2715. following client and server profiles: 
  2716.  
  2717.  
  2718.     /*  binop.apf : application profile defining
  2719.     **    client and server applications for the "binop" interface
  2720.     */
  2721.     interface binop_if {
  2722.         protseq = ncadg_ip_udp;
  2723.         bindtype = lepm;
  2724.         handle = implicit;
  2725.         idl= "binop.idl";
  2726.     }
  2727.  
  2728.     application server { export binop_if }
  2729.     application client { import binop_if }
  2730.  
  2731. Type the following to invoke the glue-code generator in order to generate DCE 
  2732. application programs and glue-stubs for the client and server applications and 
  2733. keep the generated C source modules: 
  2734.  
  2735.     gluegen binop.apf client -v -keep c_source -no_cpp
  2736.     gluegen binop.apf server -v -keep c_source -no_cpp
  2737.  
  2738. The generated application programs are client.c and server.c. The generated 
  2739. glue-stubs are client_gstub.c and server_gstub.c. The client (server) 
  2740. application imports (exports) an interface that uses an implicit handle. 
  2741. gluegen also generates an ACF file, binop.acf (for binop.idl). 
  2742.  
  2743.  
  2744. ΓòÉΓòÉΓòÉ 7.4. Glue Run-Time Library ΓòÉΓòÉΓòÉ
  2745.  
  2746. The Glue runtime library provides a set of APIs that support DCE programs based 
  2747. on gluegen generated glue-stubs. This section presents the Glue APIs and 
  2748. demonstrates the relationships between the Glue and DCE components that make up 
  2749. a DCE application. 
  2750.  
  2751. In addition to the APIs described in this section, the Glue library contains 
  2752. some internal functions that are beyond the scope of this book and are not 
  2753. documented here. 
  2754.  
  2755.  
  2756. ΓòÉΓòÉΓòÉ 7.4.1. The Glue APIs ΓòÉΓòÉΓòÉ
  2757.  
  2758. The Glue APIs are functions of the form IFxxxxx(), which make use of data 
  2759. structures defined in the header file <glue.h>. Most of the APIs use the 
  2760. following data types: 
  2761.  
  2762. mk_if_handle_t   Handle to interface structure containing the interface profile 
  2763.                 together with public methods for executing DCE operations 
  2764. mk_app_profile_t  Handle to application profile, which is a data structure 
  2765.                 containing internal representation of an application profile 
  2766.                 defined in an APF file. 
  2767. The APIs are divided into three groups: 
  2768.  
  2769. o Application APIs 
  2770. o Binding APIs 
  2771. o Glue-stub API 
  2772.  
  2773.   The glue-stub API is generated automatically by gluegen into the glue-code 
  2774.   and is not part of the Glue library. 
  2775.  
  2776. A description of each API follows. 
  2777.  
  2778. o Application APIs 
  2779.  
  2780.     void IFClient( mk_app_profile_t app,
  2781.             VoidFunc fmain,
  2782.             int *argc,
  2783.             char **argc,
  2784.             char **env  )
  2785.  
  2786.       The IFClient function implements an M-Client application model that 
  2787.       imports multiple interfaces. The function processes the application 
  2788.       profile, app, resolves the unspecified binding parameters, does all 
  2789.       required binding operations, and calls the fmain routine. The function 
  2790.       uses static binding and exits if an attempted binding to one of its 
  2791.       servers fails. 
  2792.  
  2793.       Return Value - None. 
  2794.  
  2795.       void IFServer( mk_app_profile_t app,
  2796.               VoidFunc fmain,
  2797.               int *argc,
  2798.               char **argc,
  2799.               char **env )
  2800.  
  2801.       The IFServer function implements an M-Server application model that 
  2802.       exports multiple interfaces. The function processes the application 
  2803.       profile, app, and calls the fmain routine as part of its initialization. 
  2804.       After the initialization is completed, the function performs the required 
  2805.       operations to register and export its interfaces and listens for incoming 
  2806.       requests. 
  2807.  
  2808.       Return Value - None. 
  2809.  
  2810.       void IFChainingServer( mk_app_profile_t app,
  2811.                   VoidFunc fmain,
  2812.                   int *argc,
  2813.                   char **argc,
  2814.                   char **env )
  2815.  
  2816.       The IFChainingServer function implements an M-Client-Server application 
  2817.       model that imports and exports multiple interfaces. The function 
  2818.       processes the application profile, app, and calls the fmain routine as 
  2819.       part of its initialization. After the initialization is completed, the 
  2820.       function performs the required operations to import and export its 
  2821.       interfaces and listens for incoming requests. 
  2822.  
  2823.       A ChainingServer application exports operations that may call (be clients 
  2824.       of) operations exported by other servers. For instance, the application 
  2825.       exports the function F(): 
  2826.  
  2827.             F() {
  2828.                ...
  2829.                g();
  2830.                ...
  2831.             }
  2832.       where g() is exported by another server. 
  2833.  
  2834.       Return Value - None. 
  2835.  
  2836. o Binding APIs 
  2837.  
  2838.    - mk_if_handle_t IFHandleI( int I ) 
  2839.  
  2840.       Gets the MakeDCE interface handle number I of the current application. 
  2841.       Interface handle numbers range from 0 to n. 
  2842.  
  2843.       Return Value - Interface handle on success; NULL otherwise. 
  2844.  
  2845.    - mk_if_handle_t IFHandleIN( char *Name ) 
  2846.  
  2847.       Gets the MakeDCE interface handle for an interface named 'Name' of the 
  2848.       current application. Interface names are defined in the interface 
  2849.       statements of the underlying APF file. 
  2850.  
  2851.       Return Value - Interface handle on success; NULL otherwise. 
  2852.  
  2853.    - rpc_binding_handle_t IFBindingHandle( mk_if_handle_t ifh ) 
  2854.  
  2855.       Gets the DCE binding handle stored by MakeDCE interface ifh. 
  2856.  
  2857.       Return Value - DCE binding handle on success; NULL otherwise. 
  2858.  
  2859. o Glue-stub API 
  2860.  
  2861.    - mk_app_profile_t glue_app_profile( void ) 
  2862.  
  2863.       Returns the internal representation of an application profile. This 
  2864.       function is generated by gluegen for a particular application defined in 
  2865.       a given APF file. This function forms the major portion of the glue-stub 
  2866.       for that application. 
  2867.  
  2868.       Return Value - Application profile handle. 
  2869.  
  2870.  
  2871. ΓòÉΓòÉΓòÉ 7.4.2. Using Explicit Handles ΓòÉΓòÉΓòÉ
  2872.  
  2873. When using explicit handles, you can reference in the binding handle associated 
  2874. with each interface in your application. This is facilitated by two functions: 
  2875. IFHandleI()and IFBindingHandle(). For example, the function handle returns the 
  2876. binding handle of interface number i. 
  2877.  
  2878.      #include <glue.h>
  2879.  
  2880.      rpc_binding_handle_t handle(int i)
  2881.      {
  2882.          return ( IFBindingHandle(IFHandleI(i)) );
  2883.      }
  2884.  
  2885.  
  2886. ΓòÉΓòÉΓòÉ 7.4.3. Putting It All Together ΓòÉΓòÉΓòÉ
  2887.  
  2888. To demonstrate the relationships and sources of the components that make up a 
  2889. DCE application, the following figure: Splitting a stand-alone application into 
  2890. Client and Server roles shows a stand-alone application being split into two 
  2891. programs serving in the roles of a Client and a Server. 
  2892.  
  2893.  
  2894. ΓòÉΓòÉΓòÉ 7.5. MakeDCE Application Development Steps ΓòÉΓòÉΓòÉ
  2895.  
  2896. The following section describes the MakeDCE application development steps. 
  2897. Step-by-step instructions are shown for converting a simple application (the 
  2898. binop program) into a DCE Client/Server application. The IDL file generated by 
  2899. idlgen is discussed, as well as the glue-code and the glue-stubs generated by 
  2900. gluegen. 
  2901.  
  2902.  
  2903. ΓòÉΓòÉΓòÉ 7.5.1. The binop program ΓòÉΓòÉΓòÉ
  2904.  
  2905.      Program files:
  2906.          main.c  - main module of the binop program which calls the
  2907.                    binop_add() function.
  2908.          binop.c - module containing the binop_add() function.
  2909.  
  2910.  
  2911.      Objective:
  2912.          Create a DCE application in which the Client side is based
  2913.          on main.c and the Server side is based on binop.c
  2914.  
  2915.  
  2916.      binop.c file:
  2917.  
  2918.      /*
  2919.      **   binop program functions
  2920.      */
  2921.      void binop_add(a, b, c)
  2922.      long a, b, *c;
  2923.      {
  2924.          *c = a + b;
  2925.      }
  2926.  
  2927.      main.c file:
  2928.  
  2929.      /*
  2930.      **   binop program main() entry point
  2931.      */
  2932.      #include <stdio.h>
  2933.  
  2934.      main(int argc, char *argv[], char *envp[])
  2935.      {
  2936.          char *msg = "Binop Application Completed";
  2937.          int i, n, pass, failures=0, PASSES=10, CALLS=10;
  2938.  
  2939.          for (pass = 1; pass <= PASSES; pass++) {
  2940.             printf("PASS (%d):", pass);
  2941.             for (i = 1; i <= CALLS; i++) {
  2942.               binop_add(i, i, &.n);
  2943.                if (n != i+i) {
  2944.                   printf("Two times %ld is NOT %ld\n", i, n);
  2945.                   failures++;
  2946.                }
  2947.                printf(".");
  2948.             }
  2949.             printf("\n");
  2950.          }
  2951.  
  2952.          printf("%s: %d calls, %d failures\n", msg, PASSES*CALLS, failures);
  2953.      }
  2954.  
  2955.  
  2956. ΓòÉΓòÉΓòÉ 7.5.2. Step 1: Generate IDL file for the Server side using idlgen ΓòÉΓòÉΓòÉ
  2957.  
  2958. The first step is to generate the IDL file, binop.idl, describing the Server 
  2959. functions defined in binop.c. This can be done using uuidgen and idlgen, as 
  2960. shown in the following example. 
  2961.  
  2962. User
  2963.                     uuidgen -i | idlgen -stdin binop.c -ibd -interface binop > binop.idl
  2964.  
  2965. System
  2966.                     ...
  2967.  
  2968. User
  2969.                     type binop.idl
  2970.  
  2971. System
  2972.  
  2973.                          [
  2974.                          uuid(0096BF68-065E-1BE6-B951-10005AA8B716),1
  2975.                          version(1.0)
  2976.                          ] interface binop {
  2977.  
  2978.                          ...
  2979.                          /*@[export] binop_add;      file binop.c */
  2980.  
  2981.                          void
  2982.                          binop_add (
  2983.                             [  in] long a,
  2984.                             [  in] long b,
  2985.                             [  in, out, ref] long *c
  2986.                          );
  2987.  
  2988.                          }
  2989.  
  2990. The -stdin flag tells idlgen to treat the data streaming from the pipe as an 
  2991. input file. Placing this flag before binop.c on the command line causes idlgen 
  2992. to process the IDL skeleton generated by uuidgen before binop.c. (See file-name 
  2993. and -stdin and Order of Input Files). Note that uuidgen creates a new UUID 1 on 
  2994. each invocation. 
  2995.  
  2996.  
  2997. ΓòÉΓòÉΓòÉ 7.5.3. Step 2: Create an APF file (.apf) for the Client and Server sides ΓòÉΓòÉΓòÉ
  2998.  
  2999. The second step is to write an application profile, binop.apf, describing to 
  3000. gluegen the Client and Server sides of the distributed application. The 
  3001. contents of binop.apf could resemble the following example. 
  3002.  
  3003.  
  3004.     binop.apf file:
  3005.  
  3006.     /*  binop.apf : application profile defining
  3007.     **    client and server applications for the "binop" program
  3008.     */
  3009.     interface I1 {
  3010.         protseq = ncadg_ip_udp;
  3011.         bindtype = lepm;
  3012.         handle = implicit;
  3013.         idl= "binop.idl";
  3014.     }
  3015.  
  3016.     application server { export I1 }
  3017.     application client { import I1 }
  3018.  
  3019.  
  3020. ΓòÉΓòÉΓòÉ 7.5.4. Step 3: Generate Glue-code and Glue-stubs using gluegen ΓòÉΓòÉΓòÉ
  3021.  
  3022. Invoke gluegen to generate glue-code (DCE application programs) and glue-stubs 
  3023. for the client and server applications defined in binop.apf. To generate the C 
  3024. source modules only, type the following: 
  3025.  
  3026.  
  3027.      gluegen binop.apf client -v -keep c_source -no_cpp
  3028.      gluegen binop.apf server -v -keep c_source -no_cpp
  3029.  
  3030.  
  3031. The first gluegen command generates the client glue-code and glue-stub, 
  3032. client.c and client_gstub.c respectively. Because the Client application 
  3033. imports an interface that uses an implicit handle, gluegen also generates an 
  3034. ACF file binop.acf (for binop.idl). The second gluegen command generates the 
  3035. server glue-code and glue-stub, server.c and server_gstub.c respectively. 
  3036.  
  3037.  
  3038. ΓòÉΓòÉΓòÉ 7.5.5. Step 4: Generate DCE stubs using the IDL compiler ΓòÉΓòÉΓòÉ
  3039.  
  3040. Call the IDL compiler to generate DCE stubs for the Client and Server side of 
  3041. the distributed application, using the IDL file binop.idl generated in Step 1. 
  3042. To generate only the C source modules, type the following: 
  3043.  
  3044.  
  3045.      idl binop.idl -v -keep c_source -no_cpp -server none
  3046.      idl binop.idl -v -keep c_source -no_cpp -client none
  3047.  
  3048.  
  3049. The first line generates the client DCE stub binop_cstub.c; the second line 
  3050. generates the server DCE stub binop_sstub.c. 
  3051.  
  3052.  
  3053. ΓòÉΓòÉΓòÉ 7.5.6. Step 5: Convert your main program into a function. ΓòÉΓòÉΓòÉ
  3054.  
  3055. The module client.c contains the new main() entry point for the Client side of 
  3056. the distributed application. Unless specified otherwise (see the -fmain option 
  3057. of gluegen), the old main() entry point in main.c is treated now as a function 
  3058. named fmain()  (see also Client Program Using Glue APIs). Therefore, you can 
  3059. edit the C module main.c and convert the string main into fmain. Write the 
  3060. edited file into a new file named fmain.c. 
  3061.  
  3062.  
  3063. ΓòÉΓòÉΓòÉ 7.5.7. Step 6: Compile and link the Client Side ΓòÉΓòÉΓòÉ
  3064.  
  3065. This step compiles and links the Client side of the distributed application. 
  3066. The Client source files are: 
  3067.  
  3068.     client.c       - main program generated by gluegen (Step 3)
  3069.     client_gstub.c - glue-stub generated by gluegen (Step 3)
  3070.     binop_cstub.c  - DCE stub generated by IDL  (Step 4)
  3071.     fmain.c        - fmain() generated manually (Step 5)
  3072.  
  3073.     In AIX compile and link as follows:
  3074.  
  3075.     cc_r client.c fmain.c client_gstub.c binop_cstub.c -ldce -lglue -o client
  3076.  
  3077.     The comparable in OS/2 is more complicated. See in the MakeDCE
  3078.     example directory:  %MAKEDCE%\EXAMPLES\RULES.MAK
  3079.  
  3080.  
  3081. ΓòÉΓòÉΓòÉ 7.5.8. Step 7: Compile and link the Server Side ΓòÉΓòÉΓòÉ
  3082.  
  3083. This step compiles and links the Server side of the distributed application. 
  3084. The Server source files follow: 
  3085.  
  3086.     server.c       - main program generated by gluegen (Step 3)
  3087.     server_gstub.c - glue-stub generated by gluegen (Step 3)
  3088.     binop_sstub.c  - DCE stub generated by IDL  (Step 4)
  3089.     binop.c        - Manager function for binop.idl
  3090.  
  3091.     In AIX, type the following:
  3092.  
  3093.     cc_r server.c server_gstub.c binop_sstub.c binop.c -ldce -lglue -o server
  3094.  
  3095.     The comparable in OS/2 is more complicated. See in the MakeDCE
  3096.     example directory:  %MAKEDCE%\EXAMPLES\RULES.MAK
  3097.  
  3098.  
  3099. ΓòÉΓòÉΓòÉ 7.5.9. Step 8: Execute the distributed application ΓòÉΓòÉΓòÉ
  3100.  
  3101. To run the distributed application, call the server process in one window and 
  3102. the client process in another window. The binding method used in binop.apf is 
  3103. lepm (see page Interface Profile for details.  Therefore, the RPC daemon 
  3104. process, rpcd, must be running prior to invoking the server.  Correct client 
  3105. output will resemble the following: 
  3106.  
  3107. User
  3108.                     client
  3109.  
  3110. System
  3111.  
  3112.                     -protseq ncadg_ip_udp -host host-name -ep
  3113.                     ep-number
  3114.  
  3115.                     PASS(1):..........
  3116.                     PASS(2):..........
  3117.                     PASS(3):..........
  3118.                     PASS(4):..........
  3119.                     PASS(5):..........
  3120.                     PASS(6):..........
  3121.                     PASS(7):..........
  3122.                     PASS(8):..........
  3123.                     PASS(9):..........
  3124.                     PASS(10):..........
  3125.                     Binop Application Completed: 100 calls, 0 failures
  3126.  
  3127.  
  3128. In the preceding example, host-name is your host name and ep-number is the 
  3129. entry point number allocated to the server by rpcd. 
  3130.  
  3131.  
  3132. ΓòÉΓòÉΓòÉ 7.5.10. Examples of Code Generated by gluegen ΓòÉΓòÉΓòÉ
  3133.  
  3134. The following examples show the glue-code and the glue-stubs generated by 
  3135. gluegen for the distributed binop application. 
  3136.  
  3137.  
  3138. ΓòÉΓòÉΓòÉ 7.5.10.1. Client Program Using Glue APIs ΓòÉΓòÉΓòÉ
  3139.  
  3140. Using the glue-stubs generated by gluegen and the Glue library APIs, a Client 
  3141. program, client.c, that imports multiple interfaces could resemble the 
  3142. following example. 
  3143.  
  3144.     client.c file:
  3145.  
  3146.     /******************************************************************
  3147.     * This file was generated by the MakeDCE GLUEGEN facility         *
  3148.     *       - A DCE Application Development Tool                      *
  3149.     *                                                                 *
  3150.     * Generated on Sun Jun 27 12:01:16 1993                           *
  3151.     *                                                                 *
  3152.     * (c) Copyright IBM Corporation  1992, 1993                       *
  3153.     *******************************************************************/
  3154.  
  3155.     #include <makedce/glue.h>
  3156.  
  3157.     #ifdef IBMOS2
  3158.     #pragma handler (main)
  3159.     #endif
  3160.  
  3161.     void fmain(int argc, char **argv, char **env);
  3162.  
  3163.     main(int argc, char **argv, char **env)
  3164.     {
  3165.        IFClient(glue_app_profile(), fmain, &.argc, argv, env);
  3166.     }
  3167.  Unless specified otherwise (see the -fmain option of gluegen), the fmain() 
  3168. function now represents the old main entry point of the non-distributed 
  3169. application.  The fmain() function should be prototyped as follows: 
  3170.  
  3171.       /*
  3172.       ** fmain() - model of non DCE application
  3173.       */
  3174.  
  3175.       void fmain (int argc, char **argv, char **env)
  3176.       {
  3177.            .
  3178.            .
  3179.            call server_functions();
  3180.            .
  3181.            .
  3182.       }
  3183.  
  3184.  
  3185. ΓòÉΓòÉΓòÉ 7.5.10.2. Server Program Using Glue APIs ΓòÉΓòÉΓòÉ
  3186.  
  3187. Using the glue-stubs generated by gluegen and the Glue library APIs, a Server 
  3188. program, server.c, that exports multiple interfaces should resemble the 
  3189. following example. 
  3190.  
  3191.     server.c file:
  3192.  
  3193.     /******************************************************************
  3194.     * This file was generated by the MakeDCE GLUEGEN facility         *
  3195.     *       - A DCE Application Development Tool                      *
  3196.     *                                                                 *
  3197.     * Generated on Sun Jun 27 12:04:15 1993                           *
  3198.     *                                                                 *
  3199.     * (c) Copyright IBM Corporation  1992, 1993                       *
  3200.     *******************************************************************/
  3201.  
  3202.     #include <makedce/glue.h>
  3203.  
  3204.     #ifdef IBMOS2
  3205.     #pragma handler (main)
  3206.     #endif
  3207.  
  3208.  
  3209.     main(int argc, char **argv, char **env)
  3210.     {
  3211.        IFServer(glue_app_profile(), NULL, &.argc, argv, env);
  3212.     }
  3213.  
  3214.  
  3215. ΓòÉΓòÉΓòÉ 7.5.10.3. Glue-stub for a Simple Server Program ΓòÉΓòÉΓòÉ
  3216.  
  3217. The following glue-stub, server_gstub.c, is generated for the Server 
  3218. application defined in binop.apf  (see Step 2: Create an APF file (.apf) for 
  3219. the Client and Server sides). The IDL file, binop.idl, describing the Server 
  3220. operations, is shown in Step 1: Generate IDL file for the Server side using 
  3221. idlgen. 
  3222.  
  3223. #include <makedce/glue.h>
  3224.  
  3225. extern rpc_if_handle_t      glue_server_ifspec(binop,1,0);
  3226.  
  3227. static struct IFProfileRec I1 = {
  3228.   1"I1"                /* name */
  3229.   2"export",           /* role */
  3230.   3"binop.idl",        /* idl file */
  3231.   4"implicit",         /* handle   */
  3232.   5"lepm",             /* bindtype */
  3233.   6"ncadg_ip_udp",     /* protseq */
  3234.   7NULL,               /* host */
  3235.    NULL,                 /* endpoint */
  3236.    "shared",             /* eptype */
  3237.    NULL,                 /* obj */
  3238.    NULL,                 /* nse */
  3239.   8&.glue_server_ifspec(binop,1,0),   /* ifspec  address */
  3240.    NULL,/* handle address */
  3241.    NULL
  3242. };
  3243.  
  3244.  
  3245. static mk_if_profile_t if_profile_vector[] = {
  3246.   9&.I1,
  3247.    NULL
  3248. };
  3249.  
  3250. static struct APProfileRec Server = {
  3251.   10"server",              /* appname */
  3252.   111,                     /* nthreads */
  3253.   12"null",                /* finput */
  3254.   13"stdout",              /* foutput */
  3255.   141,                     /* ifcount */
  3256.   15if_profile_vector      /* if_profile_vector */
  3257. };
  3258.  
  3259. mk_app_profile_t 16 glue_app_profile(void) {
  3260.    return (&.Server);
  3261. };
  3262.  
  3263.  
  3264. Explanation :
  3265.  
  3266. The symbolic name of the interface 1 is used to reference information 
  3267. associated with an interface object; for instance, in getting runtime 
  3268. parameters as shown in Parsing Command Arguments - Example. The interface 
  3269. object defined here, I1, is exported 2, uses implicit handles 4, binds using a 
  3270. local entry-point mapper 5, uses the ncadg_ip_udp protocol sequence 6, and 
  3271. refers to the IDL defined in binop.idl 3. The parameters host, endpoint, obj, 
  3272. and nse are not needed at compile time 7. The internal reference to the 
  3273. implicit handle is constructed from information in the IDL file through a macro 
  3274. constructor 8, which combines the interface name binop and version numbers 1.0 
  3275. from the IDL file binop.idl. 
  3276.  
  3277. The set of (single) interface objects is stored in a list of such objects 9, 
  3278. and the list, along with other application-level parameters, is stored in an 
  3279. application object 10 through 15. 
  3280.  
  3281. The function glue_app_profile 16 returns a pointer to the application profile 
  3282. and serves as initialization entry point to the server glue-code (see Server 
  3283. Program Using Glue APIs). 
  3284.  
  3285.  
  3286. ΓòÉΓòÉΓòÉ 7.5.10.4. Glue-stub for a Simple Client Program ΓòÉΓòÉΓòÉ
  3287.  
  3288. The following glue-stub, client_gstub.c, is generated for the Client 
  3289. application defined in binop.apf  (see Step 2: Create an APF file (.apf) for 
  3290. the Client and Server sides). The IDL file binop.idl describing the Server 
  3291. operations is shown in Step 1: Generate IDL file for the Server side using 
  3292. idlgen. 
  3293.  
  3294. #include <makedce/glue.h>
  3295.  
  3296. extern rpc_if_handle_t         glue_client_ifspec(binop,1,0);
  3297. extern rpc_binding_handle_t 1 glue_implicit_handle(binop,1,0);
  3298.  
  3299. static struct IFProfileRec I1 = {
  3300.    "I1",                    /* name */
  3301. 2"import",                /* role */
  3302.    "binop.idl",             /* idl file */
  3303.    "implicit",              /* handle   */
  3304.    "lepm",                  /* bindtype */
  3305.    "ncadg_ip_udp",          /* protseq */
  3306.    NULL,                    /* host */
  3307.    NULL,                    /* endpoint */
  3308.    "shared",                /* eptype */
  3309.    NULL,                    /* obj */
  3310.    NULL,                    /* nse */
  3311.    &.glue_client_ifspec(binop,1,0),    /* ifspec  address */
  3312. 3&.glue_implicit_handle(binop,1,0),  /* handle address */
  3313.    NULL
  3314. };
  3315.  
  3316. static mk_if_profile_t if_profile_vector[] = {
  3317.    &.I1,
  3318.    NULL
  3319. };
  3320.  
  3321. static struct APProfileRec client = {
  3322. 4"client",                  /* appname */
  3323.    1,                         /* nthreads */
  3324.    "null",                    /* finput */
  3325.    "stdout",                  /* foutput */
  3326.    1,                         /* ifcount */
  3327.    if_profile_vector          /* if_profile_vector */
  3328. };
  3329.  
  3330. mk_app_profile_t 5 glue_app_profile(void) {
  3331.    return (&.Client);
  3332. };
  3333.  
  3334.  
  3335. Explanation :
  3336.  
  3337. This stub differs a little from the Server stub previously shown. A reference 
  3338. to an RPC binding handle, whose name is derived from the IDL file header 1, is 
  3339. also imbedded in the interface profile 3. The interface role is import 2. The 
  3340. application name is "client" 4. The initialization entry point to the glue-code 
  3341. is glue_app_profile (see Client Program Using Glue APIs). 
  3342.  
  3343.  
  3344. ΓòÉΓòÉΓòÉ 7.6. APF Language Grammar ΓòÉΓòÉΓòÉ
  3345.  
  3346. o Application profile can include C preprocessor directives. 
  3347.  
  3348. o Application Profile can include C comment statements. 
  3349. Annotations: 
  3350.  
  3351. <id>      id is a meta symbol in the grammar. 
  3352. ::=       The right-hand side is a definition of the left-hand side. 
  3353. |         A vertical bar separates alternatives of a possible right-hand side. 
  3354. [ opt ]   opt is an optional component of the right-hand side. 
  3355. ...       An ellipsis shows that previous entities can be repeated as a list 
  3356.           with a possibly optional separator symbol. 
  3357.  
  3358. All other symbols and letters are part of the language, except for the free 
  3359. English description of the right-hand side, such as for <idl-filename> and so 
  3360. on. 
  3361.  
  3362.  
  3363.  
  3364.       <apf>         ::= <interface> | <application> |
  3365.                         <interface> <apf> |  <application> <apf>
  3366.  
  3367.       <interface>   ::= interface <id> [ like] <id> {
  3368.                           <i-attribute> [ ; ] ...
  3369.                         }
  3370.  
  3371.       <application> ::= application <id> {
  3372.                           <a-attribute> [ ; ] ...
  3373.                         }
  3374.  
  3375.       <i-attribute> ::= protseq  = <protseq-val> |
  3376.                         bindtype = <bind-type> |
  3377.                         handle   = <handle-val> |
  3378.                         host     = <host-id> |
  3379.                         ep       = <integer>  |
  3380.                         eptype   = <ep-type> |
  3381.                         idl      = "<idl-filename>" |
  3382.                         obj      = <obj-uuid> |
  3383.                         nse      = <string>
  3384.  
  3385.  
  3386.       <a-attribute> ::= finput   = <finput-id> |
  3387.                         foutput  = <foutput-id>  |
  3388.                         nthreads = <integer> |
  3389.                         import <id> [ { <i-attribute> [ ; ] ... } ] |
  3390.                         export <id> [ { <i-attribute> [ ; ] ... } ]
  3391.  
  3392.  
  3393.       <protseq-val> ::= ncadg_ip_udp | ncaca_ip_tcp
  3394.       <handle-val>  ::= implicit | explicit | auto
  3395.       <bind-type>   ::= string | lepm | repm | ns
  3396.       <host-id>     ::= <id> | <ip_address> | <string>
  3397.       <ip-address>  ::= <integer>.<integer>.<integer>.<integer>
  3398.       <finput-id>   ::= null | stdin  | <id> | "<id>"
  3399.       <foutput-id>  ::= null | stdout | stderr | <id> | "<id>"
  3400.       <ep-type>     ::= shared | unique
  3401.       <idl-filename>::= legal IDL file name
  3402.       <id>          ::= legal C identifier
  3403.       <obj-uuid>    ::= DCE uuid value
  3404.       <integer>     ::= <digit>...
  3405.       <string>      ::= "<letter>... "
  3406.       <digit>       ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  3407.       <letter>      ::= any printable character
  3408.  
  3409.  A syntax chart for this grammar follows. 
  3410.  
  3411.   ZDDD APF LANGUAGE DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3412.   3                                        3
  3413.   3   ZDDDDDDDDDDDDDDDDDDD?                           3
  3414.   3             3                           3
  3415.   3 >>DDDBD4 Interface CDDDBADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD>< 3
  3416.   3    @D4 Application CDY                           3
  3417.   3                                        3
  3418.   3 INTERFACE:                                  3
  3419.   3                   ZD;DDDDDDDDDDDDDDD?            3
  3420.   3                            3            3
  3421.   3 CDDinterfaceDDidDDBDDDDDDDDDDBDD{DDDD4 I Attribute CDADD}DDDDDDDDDDDDDDDDDD4 3
  3422.   3          @DlikeDDidDY                        3
  3423.   3                                        3
  3424.   3 APPLICATION:                                 3
  3425.   3             ZD;DDDDDDDDDDDDDDD?                  3
  3426.   3                      3                  3
  3427.   3 CDDapplicationDDidDD{DDDD4 A Attribute CDADD}DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4 3
  3428.   3                                        3
  3429.   3 I ATTRIBUTE:                                 3
  3430.   3 CDDBDprotseqDD=DDBDncadg_ip_udpDBDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4 3
  3431.   3   3       @Dncaca_ip_tcpDY 3                      3
  3432.   3   CDbindtypeDD=DDBDstringDBDDDDDD4                      3
  3433.   3   3        CDlepmDDD4    3                      3
  3434.   3   3        CDrepmDDD4    3                      3
  3435.   3   3        @DnsDDDDDY    3                      3
  3436.   3   CDhandleDD=DDBDimplicitDBDDDDDD4                      3
  3437.   3   3       CDexplicitD4    3                      3
  3438.   3   3       @DautoDDDDDY    3                      3
  3439.   3   CDhostDD=DDBDidDDDDDDDDDDDDDBDD4                      3
  3440.   3   3      CD4 IP Address CD4  3                      3
  3441.   3   3      @D4 String CDDDADY  3                      3
  3442.   3   CDepDD=DDintegerDDDDDDADDDDDDDD4                      3
  3443.   3   CDeptypeDD=DDBDsharedDBDDDDDDDD4                      3
  3444.   3   3       @DuniqueDY     3                      3
  3445.   3   CDidlDD=DD"DDIDL file nameDD"DD4                      3
  3446.   3   CDobjDD=DD4 DCE uuid value CDDD4                      3
  3447.   3   @DnseDD=DD4 String CDDDDDDDADDDY                      3
  3448.   3                                        3
  3449.   3 IP ADDRESS:                                  3
  3450.   3 CDDintegerDDzDDintegerDDzDDintegerDDzDDintegerDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4 3
  3451.   3                                        3
  3452.   3 DCE UUID VALUE:                                3
  3453.   3 CDDhexaDDzDDhexaDDzDDhexaDDzDDhexaDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4 3
  3454.   3                                        3
  3455.   3 A ATTRIBUTE:                                 3
  3456.   3 CDDBDfinputDD=DDBDnullDDBDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDD4 3
  3457.   3   3       CDstdinD4              3             3
  3458.   3   3       CDidDDDD4              3             3
  3459.   3   3       @D"id"DDY              3             3
  3460.   3   CDfoutputDD=DDBDnullDDDBDDDDDDDDDDDDDDDDDDDDDDDD4             3
  3461.   3   3       CDstdoutD4             3             3
  3462.   3   3       CDstderrD4             3             3
  3463.   3   3       CDidDDDDD4             3             3
  3464.   3   3       @D"id"DDDY             3             3
  3465.   3   CDnthreadsDD=DDintegerDDDDDDDDDDDDDDDDDDDDDDDDDD4             3
  3466.   3   @DBDimportDBDDidDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDBDY             3
  3467.   3    @DexportDY    3   ZD;DDDDDDDDDDDDDDD?   3              3
  3468.   3            3            3   3              3
  3469.   3            @D{DDDD4 I Attribute CDADD}DY              3
  3470.   3                                        3
  3471.   3 STRING:                                    3
  3472.   3    ZDDDDDDDD?                               3
  3473.   3         3                               3
  3474.   3 CDD"DDDDletterDADD"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4 3
  3475.   3                                        3
  3476.   @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3477.  
  3478.  
  3479. ΓòÉΓòÉΓòÉ 8. idlgen Messages ΓòÉΓòÉΓòÉ
  3480.  
  3481. There are three categories of messages reported by idlgen: 
  3482.  
  3483.  o Information 
  3484.  o Warnings 
  3485.  o Errors 
  3486.  
  3487.  Information messages give you indications of various idlgen activities while 
  3488.  it is running. They enable you to track what idlgen is doing. You can suppress 
  3489.  them by including +v in the command line. This turns off verbose mode 
  3490.  
  3491.  idlgen issues warning messages when it detects deviations from the expected. 
  3492.  The nature of the deviations is not serious enough to prevent idlgen from 
  3493.  generating the IDL output file; however, you need to perform some corrective 
  3494.  action on the files later. Warning messages are displayed preceded by the word 
  3495.  Warning. You can suppress them by including -no_warn in the command line. 
  3496.  
  3497.  idlgen issues error messages whenever it detects a situation that prevents it 
  3498.  from generating the IDL output file or when your intentions as portrayed in 
  3499.  the command line switches are incomplete or ambiguous. Conditions that trigger 
  3500.  error messages include syntax errors in the input files and command line, 
  3501.  inability to locate input files, and inability to correctly process input 
  3502.  files. Error messages are preceded by the word Error. 
  3503.  
  3504.  Note:  There is one special Error message:  Bug. If it occurs, record the 
  3505.         circumstances and report it to IBM. 
  3506.  
  3507.  idlgen keeps a running tally of warnings and errors. When idlgen exits, it 
  3508.  displays the number of each. 
  3509.  
  3510.  When a message relates to specific locations in source files, there can be two 
  3511.  forms of location references: 
  3512.  
  3513.  single-location - Has the form:  "in the file 'file'(line/pos)", where file, 
  3514.                 line, and pos (for position) have the obvious meanings. 
  3515.  double-location - has the form: "in the file 'file'(line/pos) and 
  3516.                 'file'(line/pos)".  Two locations in two different files are 
  3517.                 referenced. 
  3518.  
  3519.  When the message subject is a symbol, the location is that of the first 
  3520.  character of the symbol. For syntax errors, there is no specific explanation 
  3521.  for the reason, and the location is in close proximity, pointing at the token 
  3522.  that was scanned when the error occurred. 
  3523.  
  3524.  
  3525. ΓòÉΓòÉΓòÉ 8.1. idlgen Information Messages ΓòÉΓòÉΓòÉ
  3526.  
  3527. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3528. 3 Message                         3 Explanation                  3
  3529. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3530. 3 Command line switch -o ignored.             3 When the input IDL file comes from standard  3
  3531. 3                             3 input, the -o switch is meaningless and    3
  3532. 3                             3 therefore ignored.               3
  3533. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3534. 3 Importing IDL file 'file'                3 An import "file" statement in an IDL file is  3
  3535. 3                             3 being interpreted.               3
  3536. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3537. 3 An initial IDL file generation - completed.       3 The initial IDL file is generated when there  3
  3538. 3                             3 is no IDL input file to IDLGEN, or the IDL   3
  3539. 3                             3 input file has an empty body (for example,   3
  3540. 3                             3 one generated by UUIDGEN with the -i switch). 3
  3541. 3                             3 This stage can be skipped by using the IDLGEN 3
  3542. 3                             3 switch -i.                   3
  3543. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3544. 3 Initial IDL file generation - completed with errors.   3 Similar to the preceding message except that  3
  3545. 3                             3 some errors were reported.  There were prob-  3
  3546. 3                             3 ably caused by syntax errors in input files.  3
  3547. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3548. 3 MakeDCE version - Enabling tool for DCE IBM Corporation 3 An opening product disclaimer message for   3
  3549. 3 (c) 1992, 1993, 1994                   3 IDLGEN.                    3
  3550. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3551. 3 No input file - reading from standard input       3 When no input files are present in the     3
  3552. 3                             3 command line, there is always one input file  3
  3553. 3                             3 that is read from the standard input.  If the 3
  3554. 3                             3 -stdin switch is present, one of the input   3
  3555. 3                             3 files (or the only one) comes from the     3
  3556. 3                             3 standard input, and this message is not    3
  3557. 3                             3 reported.                   3
  3558. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3559. 3 No output generated due to errors            3 Errors were reported during processing which  3
  3560. 3                             3 prevent the generation of a correct IDL file. 3
  3561. 3                             3 Although IDLGEN errors are not marked with a  3
  3562. 3                             3 severity level, some are more severe than   3
  3563. 3                             3 others.  Specifically, locations of some    3
  3564. 3                             3 reported errors can be marked in the gener-  3
  3565. 3                             3 ated IDL file with the special keyword     3
  3566. 3                             3 MK_ERROR, allowing you to correct them later. 3
  3567. 3                             3 In cases of errors which are more severe than 3
  3568. 3                             3 that, no output is generated.         3
  3569. 3                             3                        3
  3570. 3                             3 Erroneous input files that will not pass com- 3
  3571. 3                             3 pilation may cause IDLGEN errors that prevent 3
  3572. 3                             3 the generation of an output IDL file.     3
  3573. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3574. 3 Output IDL file is 'file'.                3 Tells you the name of the output IDL file.   3
  3575. 3                             3 It can also be the standard output.      3
  3576. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3577. 3 Processing file 'file'...                3 When starting to process each input file, its 3
  3578. 3                             3 name is reported, followed by two possible   3
  3579. 3                             3 complementary messages giving IDLGEN determi- 3
  3580. 3                             3 nation of its type (IDL or C).         3
  3581. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3582. 3 ... C source file.                    3 IDLGEN has determined that the file being   3
  3583. 3                             3 processed is a C file.             3
  3584. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3585. 3 ... idl file.                      3 IDLGEN has determined that the file being   3
  3586. 3                             3 processed is an IDL file.           3
  3587. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3588. 3 Running the C preprocessor  'C prep. command'      3 Each input file is preprocessed (unless the  3
  3589. 3                             3 -no_cpp is set) using the C prep. command as  3
  3590. 3                             3 listed here.                  3
  3591. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3592. 3 Successful completion                  3 Concluding message for successful completion  3
  3593. 3                             3 without errors, although warnings could have  3
  3594. 3                             3 been reported.                 3
  3595. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3596. 3 num errors num warnings found              3 Concluding message with the number of errors  3
  3597. 3                             3 and warnings encountered during execution.   3
  3598. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3599.  
  3600.  
  3601. ΓòÉΓòÉΓòÉ 8.2. idlgen Warning Messages ΓòÉΓòÉΓòÉ
  3602.  
  3603. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3604. 3 Message                         3 Explanation                  3
  3605. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3606. 3 Warning: Array boundaries illegal, in the file      3 Array boundaries in IDL file are illegal; the 3
  3607. 3 'file'(line/pos)                     3 lower bound is bigger than the upper bound.  3
  3608. 3                             3 This also causes an IDL compiler error.    3
  3609. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3610. 3 Warning: Array dimensions are different for 'symbol'.  3 Array dimensions in C and IDL for the same   3
  3611. 3 in the file 'file'(line/pos) and 'file'(line/pos)    3 symbol declaration do not match.        3
  3612. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3613. 3 Warning: Bitfields are not allowed in IDL - ignored for 3 Bit fields in C structures and unions have no 3
  3614. 3 'symbol', in the file 'file'(line/pos)          3 equivalent in IDL and are ignored.  This    3
  3615. 3                             3 leads to type incompatibility in the applica- 3
  3616. 3                             3 tion and should be corrected by changing the  3
  3617. 3                             3 C application accordingly.           3
  3618. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3619. 3 Warning: C declarations mismatch: 'symbol' in the file  3 More than one C input file defines the same  3
  3620. 3 'file'(line/pos) and 'file'(line/pos)          3 symbol differently.  The declaration in the  3
  3621. 3                             3 last file takes precedence.          3
  3622. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3623. 3 Warning: C preprocessing problem. Keyword 'symbol', in  3 Sources (C and IDL) that have not been pre-  3
  3624. 3 the file 'file'(line/pos)                3 processed, but contain preprocessing direc-  3
  3625. 3                             3 tives, produce this message.  Also, erroneous 3
  3626. 3                             3 preprocessor commands that are ignored by the 3
  3627. 3                             3 preprocessor will cause this. IDLGEN ignores  3
  3628. 3                             3 such lines and continues.           3
  3629. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3630. 3 Warning: Cannot compare dimensions for 'symbol'.  in   3 Array dimensions in C and IDL declarations of 3
  3631. 3 the file 'file'(line/pos) and 'file'(line/pos)      3 same symbol cannot be compared because the C  3
  3632. 3                             3 dimensions cannot be computed independently  3
  3633. 3                             3 of the compiler.                3
  3634. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3635. 3 Warning: Cannot invoke the C preprocessor        3 Something is wrong with the CPP command (-cpp 3
  3636. 3                             3 switch) that is causing the internal running  3
  3637. 3                             3 of this tool to fail.  Either change the -cpp 3
  3638. 3                             3 switch or set the -no_cpp switch to disable  3
  3639. 3                             3 preprocessing altogether.           3
  3640. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3641. 3 Warning: Constant 'symbol' in array bound has wrong   3 Not all constant types can be used in con-   3
  3642. 3 type, in the file 'file'(line/pos)            3 stant expressions of array dimensions.     3
  3643. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3644. 3 Warning: Declarator 'symbol' has more than one indi-   3 C declarator has long indirection and the -b  3
  3645. 3 rection.  in the file 'file'(line/pos)          3 switch is not set. Including -b causes IDLGEN 3
  3646. 3                             3 to break the declaration in question into   3
  3647. 3                             3 simpler declarations using typedefs.      3
  3648. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3649. 3 Warning: Identifier 'symbol' is a reserved word in IDL  3 Legal identifiers in C can conflict with IDL  3
  3650. 3 (or idlgen).  Renamed to 'new-symbol', in the file    3 keywords and cannot be used as identifiers in 3
  3651. 3 'file'(line/pos)                     3 generated IDL files.  IDLGEN appends a     3
  3652. 3                             3 special suffix when it renames IDL files as  3
  3653. 3                             3 reported in this message.           3
  3654. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3655. 3 Warning: Identifier 'symbol' too-long for IDL.      3 Function identifiers cannot be converted to  3
  3656. 3                             3 arbitrary short names since they provide the  3
  3657. 3                             3 hook between the client code and the stubs   3
  3658. 3                             3 generated by the IDL compiler.  You must    3
  3659. 3                             3 shorten the identifier.            3
  3660. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3661. 3 Warning: Illegal error format 'format', using native   3 The switch -errfmt can take two possible    3
  3662. 3 mode                           3 values:  NATIVE, and EMACS.  The default is  3
  3663. 3                             3 NATIVE.                    3
  3664. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3665. 3 Warning: Illegal preprocessor keyword. Token 'symbol',  3 Sources (C and IDL) which have not been pre-  3
  3666. 3 in the file 'file'(line/pos)               3 processed (but contain preprocessing direc-  3
  3667. 3                             3 tives that start with an unrecognized     3
  3668. 3                             3 preprocessor verb) produce this message.    3
  3669. 3                             3 IDLGEN ignores such lines and continues.    3
  3670. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3671. 3 Warning: NIDLDIR environment variable not defined    3 The NIDLDIR environment variable must be set  3
  3672. 3                             3 in a correctly installed DCE operational    3
  3673. 3                             3 environment.  This variable sets up the path  3
  3674. 3                             3 to DCE standard header and import files,    3
  3675. 3                             3 which are needed to correctly parse input IDL 3
  3676. 3                             3 files.  There is an internally defined     3
  3677. 3                             3 default path used by IDLGEN, but errors can  3
  3678. 3                             3 subsequently occur if that path is not the   3
  3679. 3                             3 correct one.                  3
  3680. @ DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3681. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3682. 3 Warning: No operations to do in IDL file         3 At the conclusion of processing input files,  3
  3683. 3                             3 the output IDL file does not contain any    3
  3684. 3                             3 operations.  This situation can occur when   3
  3685. 3                             3 input C files do not contain any exportable  3
  3686. 3                             3 operations or when all exportable operations  3
  3687. 3                             3 are marked as NOEXPORT in meta comments.    3
  3688. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3689. 3 Warning: Undefined constant (or enumeration) 'symbol'.  3 Some constant expressions rely on other con-  3
  3690. 3 in the file 'file'(line/pos)               3 stants (in IDL) or ENUMs (in C), which are   3
  3691. 3                             3 undefined in the input files.  This can lead  3
  3692. 3                             3 to more errors.                3
  3693. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3694. 3 Warning: Variable declarations are not supported in   3 There is no equivalent to C global and static 3
  3695. 3 IDL.  Declaration of 'symbol' ignored,  in the file   3 declarations in IDL.  Such symbols are     3
  3696. 3 'file'(line/pos)                     3 ignored and are note reproduced in the output 3
  3697. 3                             3 IDL file.                   3
  3698. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3699.  
  3700.  
  3701. ΓòÉΓòÉΓòÉ 8.3. idlgen Error Messages ΓòÉΓòÉΓòÉ
  3702.  
  3703. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3704. 3 Message                         3 Explanation                  3
  3705. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3706. 3 Error: Aggregate containing conformant array can be   3 DCE rules dictate this limitation but also   3
  3707. 3 passed only by reference, for 'symbol', in the file   3 dictate that the symbol has to be passed, or  3
  3708. 3 'file'(line/pos)                     3 has the attribute for, PTR.  This conflict is 3
  3709. 3                             3 reported here.                 3
  3710. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3711. 3 Error: Aggregate 'symbol' was not printed yet in proper 3 Because of C syntax rules, a reference to an  3
  3712. 3 context.  in the file 'file'(line/pos) and        3 aggregate symbol is made in a location that  3
  3713. 3 'file'(line/pos)                     3 is illegal for IDL. This situation leads to  3
  3714. 3                             3 an IDL compiler error.             3
  3715. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3716. 3 Error: Array 'symbol'. Only the first dimension can be  3 A DCE limitation is not met by a C declarator 3
  3717. 3 conformant.  in the file 'file'(line/pos)        3 that has to be included in the output IDL   3
  3718. 3                             3 file.  This leads to an IDL compiler error.  3
  3719. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3720. 3 Error: Bad switch in command line 'switch' at 'char-   3 An illegal IDLGEN switch was scanned in the  3
  3721. 3 acter' DD> Use -h switch for help.            3 IDLGEN invocation command line.        3
  3722. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3723. 3 Error: Bad switch in environment variable 'IDLGEN':   3 An illegal IDLGEN switch was scanned in the  3
  3724. 3 'switch' at 'character' DD> Use -h switch for help.   3 environment variable IDLGEN before the     3
  3725. 3                             3 command line can be scanned.          3
  3726. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3727. 3 Error: Cannot access an input file: 'file'        3 IDLGEN cannot read the specified input file.  3
  3728. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3729. 3 Error: Cannot export function 'symbol' which is static, 3 The C function is not defined in the input   3
  3730. 3 or prototype only.  in the file 'file'(line/pos)     3 IDL file as an operation.  It is designated  3
  3731. 3                             3 as EXPORT in a meta comment in the input IDL  3
  3732. 3                             3 file and must have an actual definition in an 3
  3733. 3                             3 input C file, which is not STATIC. Actual   3
  3734. 3                             3 definition means that it has a body (for    3
  3735. 3                             3 instance, int foo( ) { ...};).         3
  3736. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3737. 3 Error: Cannot export global 'symbol'.  in the file    3 symbol is designated in a meta comment of an  3
  3738. 3 'file'(line/pos)                     3 input IDL file as EXPORT.  It is a global   3
  3739. 3                             3 variable and not a function.  There is no   3
  3740. 3                             3 support for global variables in DCE.      3
  3741. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3742. 3 Error: Cannot write to output IDL file 'file'      3 IDLGEN cannot read the specified output file. 3
  3743. 3                             3 The output IDL file name is chosen as the   3
  3744. 3                             3 input IDL file name if the -o switch is set.  3
  3745. 3                             3 If a specific name is assigned to that     3
  3746. 3                             3 switch, it becomes the name of the output IDL 3
  3747. 3                             3 file.                     3
  3748. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3749. 3 Error: Comment is mixed within a meta comment.  in the  3 Meta comments use the /* ....*/ C comment   3
  3750. 3 file 'file'(line/pos)                  3 delimiters, so these delimiters cannot be   3
  3751. 3                             3 used inside a meta comment.  The following   3
  3752. 3                             3 situation for instance, causes this message:  3
  3753. 3                             3 /*@ .... ; /*  */.              3
  3754. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3755. 3 Error: Conflict in symbol between C and IDL files:    3 A declaration of a symbol in C and in IDL are 3
  3756. 3 'symbol' in the file 'file'(line/pos) and        3 incomparably different. For instance, one is  3
  3757. 3 'file'(line/pos)                     3 a typedef, and one is a structure.  You have  3
  3758. 3                             3 to correct the C and IDL sources.       3
  3759. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3760. 3 Error: Conformant array 'symbol' can only be last in   3 A DCE limitation is detected by IDLGEN and   3
  3761. 3 struct.  in the file 'file'(line/pos)          3 reported here.                 3
  3762. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3763. 3 Error: Conformant array 'symbol' cannot be part of a   3 A DCE limitation is detected by IDLGEN and   3
  3764. 3 union.  in the file 'file'(line/pos)           3 reported here.                 3
  3765. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3766. 3 Error: Declarator 'symbol' cannot be an IDL declarator. 3 A legal C declarator cannot be an IDL     3
  3767. 3 in the file 'file'(line/pos)               3 declarator - either as a parameter or an    3
  3768. 3                             3 operation.  Examples are functions with a   3
  3769. 3                             3 variable number of arguments, a function    3
  3770. 3                             3 pointer in an aggregate field, or a function  3
  3771. 3                             3 parameter.                   3
  3772. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3773. 3 Error: Duplicate name 'symbol' in the file        3 symbol is reused in the same file.       3
  3774. 3 'file'(line/pos)                     3                        3
  3775. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3776. 3 Error: Empty input file (file)              3 The input file exists but is empty.      3
  3777. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3778. 3 Error: Function header/prototype mismatch: 'symbol' in  3 A situation exists in C where the function   3
  3779. 3 the file 'file'(line/pos)                3 header of the actual declaration and the    3
  3780. 3                             3 function prototype differ.           3
  3781. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3782. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3783. 3 Error: Function 'symbol' cannot export - changed to   3 C functions have been designated as EXPORT in 3
  3784. 3 tbd(noexport).  in the file 'file'(line/pos)       3 the input IDL file, but cannot export (for   3
  3785. 3                             3 instance, they have variable number of argu-  3
  3786. 3                             3 ments or have a function pointer parameter).  3
  3787. 3                             3 The meta comment entry for them is changed as 3
  3788. 3                             3 reported in the message.            3
  3789. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3790. 3 Error: Global variable 'symbol' cannot be exportable.  3 A global symbol has been designated in the   3
  3791. 3 in the file 'file'(line/pos)               3 input IDL file as EXPORT.  This is illegal.  3
  3792. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3793. 3 Error: IDL declaration doesn't match C source: 'symbol' 3 Declarations of a symbol in C and in IDL are  3
  3794. 3 in the file 'file'(line/pos) and 'file'(line/pos)    3 different.  Some of the incompatibilities can 3
  3795. 3                             3 be corrected by updating the IDL declaration. 3
  3796. 3                             3 The -conformC switch automatically updates   3
  3797. 3                             3 the IDL file according to changes in the C   3
  3798. 3                             3 file.  However, not all changes can be traced 3
  3799. 3                             3 and corrected.                 3
  3800. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3801. 3 Error: Import file 'file' is not an IDL file.      3 IDLGEN recognizes the kind of input file from 3
  3802. 3                             3 its contents.  In this case, an import file  3
  3803. 3                             3 was found, but it is not the correct type.   3
  3804. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3805. 3 Error: Import file name w/path is too long: 'full-file- 3 IDLGEN builds an import file name from the   3
  3806. 3 name' File not imported.                 3 name in the IMPORT statement and the search  3
  3807. 3                             3 paths (from the -I switch).  However, the   3
  3808. 3                             3 resulting string is too long to process.    3
  3809. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3810. 3 Error: Import file 'file' not found.           3 An import file name was not found anywhere in 3
  3811. 3                             3 the search paths.               3
  3812. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3813. 3 Error: Invalid dimension expression (for an IDL array)  3 Array dimensions must be computable independ- 3
  3814. 3 on 'symbol'.  in the file 'file'(line/pos)        3 ently of the C compiler.  C constant      3
  3815. 3                             3 expressions that make this impossible trigger 3
  3816. 3                             3 this message.                 3
  3817. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3818. 3 Error: Missing value for argument 'switch' in environ-  3 The IDLGEN environment variable has a switch  3
  3819. 3 ment variable 'IDLGEN'.                 3 that requires an argument, but no argument   3
  3820. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3821. 3 Error: Missing value for command line argument      3 The IDLGEN command line has a switch that   3
  3822. 3 'switch'.                        3 requires an argument, but no argument was   3
  3823. 3                             3 given.                     3
  3824. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3825. 3 Error: More than two input IDL files.          3 Only one input IDL file is allowed.      3
  3826. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3827. 3 Error: Needs to specify conformant array size or max,  3 DCE requires conformant arrays to have the   3
  3828. 3 but context is NOT an operation or an aggregate.  For  3 [max] or [size] attributes but only in proper 3
  3829. 3 'symbol' (or derived typedefs), in the file       3 contexts where other fields or parameters can 3
  3830. 3 'file'(line/pos)                     3 be used as arguments to these attributes.   3
  3831. 3                             3 With IDLGEN, which generates new typedefs   3
  3832. 3                             3 from complex C declarations, this can display 3
  3833. 3                             3 in the wrong context (usually within      3
  3834. 3                             3 typedefs) where fields and parameters are not 3
  3835. 3                             3 available.                   3
  3836. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3837. 3 Error: No definition for aggregate (struct, union, or  3 An aggregate in C can be referenced without  3
  3838. 3 enum): 'symbol' in the file 'file'(line/pos)       3 having its actual definition present.  This  3
  3839. 3                             3 is not allowed in DCE, which has to have a   3
  3840. 3                             3 precise definition for all symbols involved  3
  3841. 3                             3 in an RPC.                   3
  3842. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3843. 3 Error: No definition for typedef: 'symbol' in the file  3 This is a rare error where a typedef is ref-  3
  3844. 3 'file'(line/pos) and 'file'(line/pos)          3 erenced but has no definition.         3
  3845. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3846. 3 Error: No IDL operation declared for C function     3 This a rare error where no IDL operation was  3
  3847. 3 'symbol'.  in the file 'file'(line/pos)         3 declared in the input IDL file or automat-   3
  3848. 3                             3 ically generated by IDLGEN for a C function  3
  3849. 3                             3 that has been designated for EXPORT.      3
  3850. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3851. 3 Error: No output IDL name specified and cannot be con-  3 This a rare error where IDLGEN is unable to  3
  3852. 3 cluded - since there is no input IDL parameter      3 output the IDL file because of an earlier   3
  3853. 3                             3 error.                     3
  3854. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3855. 3 Error: Order of declarations in typedef list is bad at  3 This a rare error resulting from a conflict  3
  3856. 3 symbol 'symbol' in the file 'file'(line/pos)       3 in the internal ordering of symbols by     3
  3857. 3                             3 IDLGEN.                    3
  3858. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3859. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3860. 3 Error: [ref] attribute of 'symbol' should be [ptr] due  3 IDL requires that pointers have the full    3
  3861. 3 to use in union.  in the file 'file'(line/pos)      3 pointer attribute ([ptr]) when referenced in  3
  3862. 3                             3 unions.  When IDLGEN generates these attri-  3
  3863. 3                             3 butes initially, the proper considerations   3
  3864. 3                             3 are taken to use the [ref] attribute only   3
  3865. 3                             3 where it is allowed.  However, when an attri- 3
  3866. 3                             3 bute in an input IDL file needs to be CHANGED 3
  3867. 3                             3 from ref to ptr, IDLGEN makes the change and  3
  3868. 3                             3 reports it to the user.            3
  3869. 3                             3                        3
  3870. 3                             3 This message format is used when the error is 3
  3871. 3                             3 found in the immediate context of its cause.  3
  3872. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3873. 3 Error: [ref] attribute of 'symbol' should be [ptr] due  3 This is similar to the preceding message, but 3
  3874. 3 to use in union field 'symbol'.  in the file       3 it also points to the union field which trig- 3
  3875. 3 'file'(line/pos) and 'file'(line/pos)          3 gered this situation.  Note that there can be 3
  3876. 3                             3 more than one such trigger, but only one is  3
  3877. 3                             3 reported.                   3
  3878. 3                             3                        3
  3879. 3                             3 This message format is used when the error is 3
  3880. 3                             3 found in a different location than the     3
  3881. 3                             3 trigger.                    3
  3882. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3883. 3 Error: Output IDL file 'file' exists.  Must specify -o  3 This a rare error resulting from internal   3
  3884. 3 to overwrite it                     3 IDLGEN conflicts.               3
  3885. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3886. 3 Error: Symbol 'symbol' cannot be redefined, in the file 3 symbol is used in the same file for two dif-  3
  3887. 3 'file'(line/pos)                     3 ferent and conflicting purposes.        3
  3888. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3889. 3 Error: Symbol 'symbol' not defined.  in the file     3 This a rare error resulting from internal   3
  3890. 3 'file'(line/pos)                     3 IDLGEN conflicts when an aggregate is refer-  3
  3891. 3                             3 enced, but has no actual declaration.     3
  3892. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3893. 3 Error (Syntax) 'symbol', in the file 'file'(line/pos)  3 A parser error resulted from scanning a C or  3
  3894. 3                             3 IDL file.  Input file scanning stops upon   3
  3895. 3                             3 this error, and IDLGEN starts processing the  3
  3896. 3                             3 next file in line.               3
  3897. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3898. 3 Error: Trailing switches 'switches' ignored in combined 3 An error was encountered in a combined string 3
  3899. 3 switch 'switch'                     3 of single-letter switches. The rest of the   3
  3900. 3                             3 string is ignored.               3
  3901. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3902. 3 Error: Undefined const symbol or enum item 'symbol'   3 A constant expression for a given symbol ref- 3
  3903. 3 used by symbol 'symbol'.  in the file 'file'(line/pos)  3 erences other symbols that have to be consts  3
  3904. 3                             3 or enums.  However, these symbols are unde-  3
  3905. 3                             3 fined.                     3
  3906. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3907. 3 Error: Unexpected end-of-file in the file        3 The parser encountered an end-of-file before  3
  3908. 3 'file'(line/pos)                     3 parsing was completed.             3
  3909. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3910. 3 Error: Wrong IDL language indicator '%  C or Pascal'.  3 IDL files can have a language indicator    3
  3911. 3 in the file 'file'(line/pos)               3 before the IDL header. IDLGEN checks these to 3
  3912. 3                             3 be either C or Pascal but processes C IDL   3
  3913. 3                             3 files only.  IDLGEN removes this indicator   3
  3914. 3                             3 from the output IDL files it produces.     3
  3915. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3916. 3 Fatal error: string "text string" is too long.  in the  3 This a rare error caused bu internal con-   3
  3917. 3 file 'file'(line/pos)                  3 flicts in IDLGEN when a string constant is   3
  3918. 3                             3 too long.                   3
  3919. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3920. 3 line line(file): BUG(function - file - Lline:      3 This is a rare internal IDLGEN error that   3
  3921. 3 description                       3 should never occur and that points at a    3
  3922. 3                             3 IDLGEN bug that must be reported to IBM.    3
  3923. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3924.  
  3925.  
  3926. ΓòÉΓòÉΓòÉ 9. gluegen Messages ΓòÉΓòÉΓòÉ
  3927.  
  3928. gluegen, like idlgen. also reports three kinds of messages: 
  3929.  
  3930.  o Information 
  3931.  o Warnings 
  3932.  o Errors 
  3933.  
  3934.  gluegen generates several types of outputs, but errors can prevent the 
  3935.  production of some of these outputs. 
  3936.  
  3937.  To distinguish gluegen messages from other tools used in the development of a 
  3938.  DCE application, most are preceded with an arrow: "-->" in the left margin. 
  3939.  
  3940.  
  3941. ΓòÉΓòÉΓòÉ 9.1. gluegen Information Messages ΓòÉΓòÉΓòÉ
  3942.  
  3943. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  3944. 3 Message                         3 Explanation                  3
  3945. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3946. 3 Cannot open glue stub module name, writing to stdout   3 The file name is not write-accessible, so   3
  3947. 3                             3 output for the glue stub goes to standard   3
  3948. 3                             3 output.                    3
  3949. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3950. 3 Compiling module name: C-compile-cmd           3 This message is displayed when the -keep    3
  3951. 3                             3 switch is included in the command line to   3
  3952. 3                             3 select object or both.  It indicates that   3
  3953. 3                             3 module name was generated by GLUEGEN and is  3
  3954. 3                             3 being compiled.  The compilation generates a  3
  3955. 3                             3 new object file.                3
  3956. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3957. 3 Creating acf file file (for name)            3 GLUEGEN generates an ACF file, file, for a   3
  3958. 3                             3 given IDL file, name, when such a file is   3
  3959. 3                             3 needed for running the IDL compiler cor-    3
  3960. 3                             3 rectly.                    3
  3961. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3962. 3 Creating app main module file              3 A main module (containing the main() entry   3
  3963. 3                             3 point) for an application is being generated  3
  3964. 3                             3 and written into file.             3
  3965. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3966. 3 Creating glue stub module file              3 GLUEGEN is generating a glue stub file for   3
  3967. 3                             3 the client or the server sides.        3
  3968. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3969. 3 Deleting application module file             3 Displays if -keep switch has specified     3
  3970. 3                             3 keeping only object files.  It indicates that 3
  3971. 3                             3 the source for the application module file is 3
  3972. 3                             3 being erased.                 3
  3973. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3974. 3 Deleting stub module file                3 This message is displayed if -keep switch has 3
  3975. 3                             3 specified keeping only object files.  It    3
  3976. 3                             3 indicates that the source for the stub module 3
  3977. 3                             3 file is being erased.             3
  3978. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3979. 3 MakeDCE(gluegen) version - Enabling tool for DCE IBM   3 An opening product disclaimer message for   3
  3980. 3 Corporation (c) 1992                   3 GLUEGEN.                    3
  3981. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3982. 3 Reading app-profile from file, app-name is name     3 This message indicates that GLUEGEN is     3
  3983. 3                             3 reading the APF file from file and that the  3
  3984. 3                             3 application is name.  This provides assurance 3
  3985. 3                             3 that you have specified the correct file and  3
  3986. 3                             3 name in the command line.           3
  3987. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3988. 3 Running the C preprocessor  C prep. command       3 This message is displayed if you have not   3
  3989. 3                             3 included the -no_cpp switch.  It indicates   3
  3990. 3                             3 that the C prep. command is being used to   3
  3991. 3                             3 preprocess the APF file.            3
  3992. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  3993. 3 num errors num warnings reported             3 This is a concluding message reporting the   3
  3994. 3                             3 number of errors and warnings encountered   3
  3995. 3                             3 when GLUEGEN is run.              3
  3996. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  3997.  
  3998.  
  3999. ΓòÉΓòÉΓòÉ 9.2. gluegen Warning Messages ΓòÉΓòÉΓòÉ
  4000.  
  4001. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  4002. 3 Message                         3 Explanation                  3
  4003. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4004. 3 DD>Warning: C preprocessor problem, keyword 'token' in  3 This is usually the result of an incorrect   3
  4005. 3 the file 'file'(line/pos)                3 preprocessing directive embedded in the APF  3
  4006. 3                             3 file that the preprocessor did not recognize  3
  4007. 3                             3 and left in place during preprocessing.    3
  4008. 3                             3 GLUEGEN ignores such lines and continues.   3
  4009. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4010. 3 DD>Warning: APF protseq 'value' differs from IDL     3 GLUEGEN compared values in the APF file with  3
  4011. 3 protseq 'value' Interface = 'name', IDL file = 'file'  3 corresponding attributes in IDL files that   3
  4012. 3                             3 are used by interfaces defined in the APF   3
  4013. 3                             3 file.  It found an inconsistency in the    3
  4014. 3                             3 protseq attribute.               3
  4015. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4016. 3 DD>Warning: APF endpoint 'value' differs form IDL    3 GLUEGEN compared values in the APF file with  3
  4017. 3 endpoint 'value' Interface = 'name', IDL file = 'file'  3 corresponding attributes in IDL files that   3
  4018. 3                             3 are used by interfaces defined in the APF   3
  4019. 3                             3 file.  It found an inconsistency in the    3
  4020. 3                             3 endpoint attribute.              3
  4021. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4022. 3 DD>Warning: Cannot invoke the C preprocessor       3 Unless you have included the -no_cpp option  3
  4023. 3                             3 in the command, GLUEGEN automatically calls  3
  4024. 3                             3 the C preprocessor.  This warning displays if 3
  4025. 3                             3 something is wrong with the cpp command that  3
  4026. 3                             3 is causing the internal execution of this   3
  4027. 3                             3 tool to fail.  Either change the -cpp_cmd   3
  4028. 3                             3 option or use the -no_cpp option to disable  3
  4029. 3                             3 preprocessing altogether.           3
  4030. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4031. 3 DD>Warning: Cannot open catalog file file        3 Catalog file file is needed for generating   3
  4032. 3                             3 GLUEGEN messages.  If GLUEGEN cannot find   3
  4033. 3                             3 this file (this can be caused by environment  3
  4034. 3                             3 variables NLSDIR and LANG improperly set or  3
  4035. 3                             3 GLUEGEN installation not complete), it uses  3
  4036. 3                             3 internal English text for messages.      3
  4037. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  4038.  
  4039.  
  4040. ΓòÉΓòÉΓòÉ 9.3. gluegen Error Messages ΓòÉΓòÉΓòÉ
  4041.  
  4042. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  4043. 3 Message                         3 Explanation                  3
  4044. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4045. 3 DD>Error: Must run preprocessor prior to gluegen invo-  3 This is usually the result of inputting an   3
  4046. 3 cation.  Keyword 'token', in the file 'file'(line/pos)  3 APF file that contains preprocessor direc-   3
  4047. 3                             3 tives and that has not been preprocessed at  3
  4048. 3                             3 all.                      3
  4049. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4050. 3 DD>Error: Cannot access IDL file 'file' in interface   3 GLUEGEN cannot access and read the IDL file  3
  4051. 3 'name'                          3 file.  The IDL file is defined for interface  3
  4052. 3                             3 name in the input APF file.          3
  4053. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4054. 3 DD>Error: Cannot access input file file         3 GLUEGEN cannot access and read the input file 3
  4055. 3                             3 file.                     3
  4056. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4057. 3 DD>Error: Cannot generate name of ACF file form IDL   3 ACF files names are derived from their corre- 3
  4058. 3 file 'file' current interface is 'name'         3 sponding IDL file names. An attempt to gen-  3
  4059. 3                             3 erate such a name for IDL file file has    3
  4060. 3                             3 failed. The IDL file is defined for interface 3
  4061. 3                             3 name in the input APF file.          3
  4062. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4063. 3 DD>Error: Cannot open ACF file file for interface    3 GLUEGEN cannot access and write to the ACF   3
  4064. 3 'name'                          3 file 'file'.  The ACF file name was generated 3
  4065. 3                             3 for an IDL file defined in interface name in  3
  4066. 3                             3 the input APF file.              3
  4067. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4068. 3 DD>Error: Cannot open glue application file 'file'    3 GLUEGEN cannot access and write to the output 3
  4069. 3                             3 glue application file file.  The file name is 3
  4070. 3                             3 derived from the application name in the    3
  4071. 3                             3 command line, which is also defined in the   3
  4072. 3                             3 input APF file.                3
  4073. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4074. 3 DD>Error: Cannot open glue stub file 'file'       3 GLUEGEN cannot access and write to the output 3
  4075. 3                             3 glue-stub file file.  The file name is     3
  4076. 3                             3 derived from the application name in the    3
  4077. 3                             3 command line, which must be defined in the   3
  4078. 3                             3 input APF file.                3
  4079. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4080. 3 DD>Error: Compilation of glue stub module file, Failed  3 A glue-stub was generated, but the -keep    3
  4081. 3                             3 switch specified object or both, and internal 3
  4082. 3                             3 activation of the compiler failed.       3
  4083. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4084. 3 DD>Error: Compilation of application module file,    3 An application module was generated, but the  3
  4085. 3 Failed                          3 -keep switch specified object or both, and   3
  4086. 3                             3 internal activation of the compiler failed.  3
  4087. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4088. 3 DD>Error: Duplicate interface definition 'name', in the 3 An interface in the input APF file is defined 3
  4089. 3 file 'file'(line/pos)                  3 twice.  The last definition location is    3
  4090. 3                             3 shown.                     3
  4091. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4092. 3 DD>Error: Empty input file (file)            3 The input file (APF or IDL) is empty.     3
  4093. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4094. 3 DD>Error: Application 'name' can not have empty body,  3 The application name in the input APF file   3
  4095. 3 in the file 'file'(line/pos)               3 has an empty body: {}.  The last definition  3
  4096. 3                             3 location is shown.               3
  4097. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4098. 3 DD>Error: Interface 'name' can not have empty body, in  3 The interface name in the input APF file has  3
  4099. 3 the file 'file'(line/pos)                3 an empty body: {}.  The last definition    3
  4100. 3                             3 location is shown.               3
  4101. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4102. 3 DD>Fatal ERROR: APF contains no application definition  3 APF files must have at least one application  3
  4103. 3                             3 statement to produce output.          3
  4104. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4105. 3 DD>Fatal ERROR: Application stack overflow        3 An internal error has occurred in GLUEGEN.   3
  4106. 3                             3 Report the circumstances to IBM.        3
  4107. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4108. 3 DD>Fatal ERROR: Cannot generate glue code 'name' Appli- 3 Application name was specified in command   3
  4109. 3 cation is undefined in 'file'              3 line, but is not defined in the input APF   3
  4110. 3                             3 file (also specified in command line).     3
  4111. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4112. 3 DD>Fatal ERROR: cannot parse APF definitions in file   3 A rare internal complication occurred in    3
  4113. 3 'file'                          3 GLUEGEN.                    3
  4114. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4115. 3 DD>Fatal ERROR: cannot parse IDL definitions in file   3 A rare internal complication occurred in    3
  4116. 3 'file'                          3 GLUEGEN.                    3
  4117. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4118. 3 DD>Fatal ERROR: invalid interface in application 'name' 3 A rare internal complication occurred in    3
  4119. 3 Probably an internal GLUGEN error.            3 GLUEGEN.                    3
  4120. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4121. 3 DD>Fatal ERROR: Interface stack overflow         3 An internal error occurred in GLUEGEN.     3
  4122. 3                             3 Report the circumstances to IBM.        3
  4123. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  4124. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  4125. 3 DD>Fatal ERROR: Application stack overflow        3 An internal error occurred in GLUEGEN.     3
  4126. 3                             3 Report the circumstances to IBM.        3
  4127. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4128. 3 DD>Fatal ERROR: NIDLDIR environment variable not     3 This message is displayed only in OS/2.  The  3
  4129. 3 defined                         3 NIDLDIR environment variable must be set in a 3
  4130. 3                             3 correctly installed DCE operational environ-  3
  4131. 3                             3 ment.  This variable sets up the path to DCE  3
  4132. 3                             3 standard header and import files, which are  3
  4133. 3                             3 needed to correctly compile stubs generated  3
  4134. 3                             3 by GLUEGEN.  You cannot use GLUEGEN unless   3
  4135. 3                             3 DCE is properly installed.           3
  4136. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4137. 3 DD>Fatal ERROR: no interface is imported/exported by   3 A application does not use any interface and  3
  4138. 3 application 'name'                    3 is therefore meaningless.           3
  4139. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4140. 3 DD>Fatal ERROR: string "text string" is too long.  in  3 An internal error has occurred in GLUEGEN.   3
  4141. 3 the file 'file'(line/pos)                3 Report the circumstances to IBM.        3
  4142. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4143. 3 DD>Error: 'import name' will generate duplicate     3 The same interface name and version numbers  3
  4144. 3 implicit handle, IDL files: 'file1' for interface    3 in IDL files are defined for two different   3
  4145. 3 'name1', and 'file2' for interface 'name2' define the  3 interfaces in the input APF file.  Implicit  3
  4146. 3 same DCE interface and the same version numbers.     3 handle names are derived from an IDL inter-  3
  4147. 3                             3 face name and its version numbers.  These   3
  4148. 3                             3 must be distinct for different interfaces.   3
  4149. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4150. 3 DD>Error: 'import name' will generate duplicate ACF   3 ACF file names are derived from the corre-   3
  4151. 3 file.  interfaces 'name1' and 'name2' reference the   3 sponding IDL file names.  The interfaces in  3
  4152. 3 same IDL file 'file'                   3 question reference the same IDL file.     3
  4153. 3                             3 Because both use an implicit handle, an    3
  4154. 3                             3 attempt to generate duplicate ACF file was   3
  4155. 3                             3 made.                     3
  4156. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4157. 3 DD>Error: Missing IDL file specification in interface  3 The interface name in the input APF file is  3
  4158. 3 'name'                          3 not associated with an IDL file.        3
  4159. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4160. 3                             3 APF file or an IDL file whose name is associ- 3
  4161. 3                             3 ated with an interface in the APF file.  Only 3
  4162. 3                             3 the header of IDL files is parsed.       3
  4163. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4164. 3 DD>Error: Too many -D arguments on command line     3 An internal limitation on the number of -D   3
  4165. 3                             3 switches is violated.             3
  4166. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4167. 3 DD>Error: Too many -I arguments on command line     3 An internal limitation on the number of -I   3
  4168. 3                             3 switches is violated.             3
  4169. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4170. 3 DD>Error: Too many -U arguments on command line     3 An internal limitation on the number of -U   3
  4171. 3                             3 switches is violated.             3
  4172. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4173. 3 DD>Error: Undefined interface 'name', in the file    3 An interface name is referenced in the input  3
  4174. 3 'file'(line/pos)                     3 APF file but was not previously defined in   3
  4175. 3                             3 that file.                   3
  4176. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4177. 3 DD>Error: Undefined interface 'name' in application   3 An application references an interface in the 3
  4178. 3 'file'                          3 input APF file, but the interface has not   3
  4179. 3                             3 been previously defined in that file.     3
  4180. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4181. 3 DD>Error: Unsupported option 'option = value' in inter- 3 Not all APF language features are supported  3
  4182. 3 face 'name'                       3 yet.                      3
  4183. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4184. 3 DD>Error: Invalid input file definition 'finput=name',  3 The definition of the finput file is not    3
  4185. 3 in the file 'file'(line/pos)               3 valid.  This error can result from an incor-  3
  4186. 3                             3 rect definition, such as 'finput=stdout'.   3
  4187. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4188. 3 DD>Error: Invalid output file definition         3 The definition of the foutput file is not   3
  4189. 3 'foutput=name', in the file 'file'(line/pos)       3 valid.  This error can result from an incor-  3
  4190. 3                             3 rect definition, such as 'foutput=stdin'.   3
  4191. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4192. 3 DD>Error: duplicate unique endpoint 'value', interfaces 3 The user has defined a fixed endpoint for   3
  4193. 3 'name1' and 'name2' define the same unique endpoint   3 interface 'name1'.  This type of this     3
  4194. 3                             3 endpoint is unique and can not be shared by  3
  4195. 3                             3 other interfaces, such as 'name2'.       3
  4196. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  4197.  
  4198.  
  4199. ΓòÉΓòÉΓòÉ 10. gluelib Messages ΓòÉΓòÉΓòÉ
  4200.  
  4201. The gluelib contains functions that report runtime errors when applications 
  4202. generated by gluegen fail to run some DCE operation or whenever they run into a 
  4203. situation that obstructs normal running. Some rare problems are due to memory 
  4204. allocation failures.  These will probably never occur.  If they do, please 
  4205. report them to IBM. 
  4206.  
  4207.  
  4208. ΓòÉΓòÉΓòÉ 10.1. gluelib Error Messages ΓòÉΓòÉΓòÉ
  4209.  
  4210. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  4211. 3 Message                         3 Explanation                  3
  4212. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4213. 3 IFInputBegin(): Cannot begin input            3 User error.  Check the implementation of the  3
  4214. 3                             3 finput function specified in the APF file for 3
  4215. 3                             3 GLUEGEN.                    3
  4216. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4217. 3 IFInputDone(): Cannot terminate input          3 User error.  Check the implementation of the  3
  4218. 3                             3 finput function specified in the APF file for 3
  4219. 3                             3 GLUEGEN.                    3
  4220. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4221. 3 IFOutputBegin(): Cannot begin output           3 User error.  Check the implementation of the  3
  4222. 3                             3 foutput function specified in the APF file   3
  4223. 3                             3 for GLUEGEN.                  3
  4224. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4225. 3 IFOutputDone(): Cannot terminate output         3 User error.  Check the implementation of the  3
  4226. 3                             3 foutput function specified in the APF file   3
  4227. 3                             3 for GLUEGEN.                  3
  4228. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4229. 3 IFCreate('ifname'): Invalid bindtype 'bindtype'     3 User error.  Check the binding method used in 3
  4230. 3                             3 your application profile.  The bindtype value 3
  4231. 3                             3 should be string, lepm, repm, or ns.      3
  4232. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4233. 3 IFBind('ifname'): Invalid binding mode 'bindtype'    3 User error.  Check the binding method used in 3
  4234. 3                             3 your application profile.  The bindtype value 3
  4235. 3                             3 should be string, lepm, repm, or ns.      3
  4236. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4237. 3 IFBind(): failed on binding interface 'ifname' to    3 A Client application failed on binding to a  3
  4238. 3 Server on host 'hostname'                3 Server on hostname. ifname is the name of the 3
  4239. 3                             3 imported interface in your application     3
  4240. 3                             3 profile.  Ensure that the Server is running.  3
  4241. 3                             3 If it is, verify that the endpoint reported  3
  4242. 3                             3 by the Client is the one allocated to the   3
  4243. 3                             3 Server.  Additional error messages, which may 3
  4244. 3                             3 be reported, explain the the nature of the   3
  4245. 3                             3 problem.                    3
  4246. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4247. 3 IFUnbind(): failed on terminating Server connection   3 An internal GLUELIB error.  Notify IBM.    3
  4248. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4249. 3 IFRegister(): Cannot register interface 'ifname'     3 A Server application failed to register its  3
  4250. 3                             3 interface to the RPCD. Additional error mes-  3
  4251. 3                             3 sages, which may be reported, explain the   3
  4252. 3                             3 nature of the problem.             3
  4253. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4254. 3 IFImport(): Cannot import name service information for  3 A Client application failed to import host   3
  4255. 3 'ifname'                         3 information from name service.  Additional   3
  4256. 3                             3 error messages, which may be reported,     3
  4257. 3                             3 explain the the nature of the problem.     3
  4258. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4259. 3 IFUnregister(): Failed to unregister interface 'ifname' 3 A Server application failed to remove the   3
  4260. 3                             3 information it has registered by the RPCD.   3
  4261. 3                             3 Additional error messages, which may be    3
  4262. 3                             3 reported, explain the nature of the problem.  3
  4263. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4264. 3 IFExport(): Failed to export interface 'ifname' to name 3 A Server application failed to export its   3
  4265. 3 service                         3 information to the name service.  Additional  3
  4266. 3                             3 error messages, which may be reported,     3
  4267. 3                             3 explain the nature of the problem.       3
  4268. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4269. 3 IFHandleI('number'): Cannot find interface handle    3 User error.  The interface number provided is 3
  4270. 3                             3 out of range.  Check the number of interfaces 3
  4271. 3                             3 in your application.  Interface numbers range 3
  4272. 3                             3 from 0 to n.                  3
  4273. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4274. 3 Server failed on listening                3 A Server application failed on listening to  3
  4275. 3                             3 incoming requests.  Additional error mes-   3
  4276. 3                             3 sages, which may be reported, explain the   3
  4277. 3                             3 nature of the problem.             3
  4278. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4279. 3 ***FAILURE***: unexpected CMA exception - 'text'     3 An undefined EXCEPTION event that could not  3
  4280. 3                             3 be caught by the application occurred.     3
  4281. 3                             3 Report the error to IBM.            3
  4282. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4283. 3 Cannot get string binding - 'text'            3 GLUELIB failed to run a DCE function.  text  3
  4284. 3                             3 is the DCE error message explaining the    3
  4285. 3                             3 nature of the problem.             3
  4286. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4287. 3 Cannot parse string binding - 'text'           3 GLUELIB failed to run a DCE function.  text  3
  4288. 3                             3 is the DCE error message explaining the    3
  4289. 3                             3 nature of the problem.             3
  4290. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  4291. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  4292. 3 Cannot compose string binding - 'text'          3 GLUELIB failed to run a DCE function.  text  3
  4293. 3                             3 is the DCE error message explaining the    3
  4294. 3                             3 nature of the problem.             3
  4295. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4296. 3 Cannot check protocol sequence - 'text'         3 GLUELIB failed to run a DCE function.  text  3
  4297. 3                             3 is the DCE error message explaining the    3
  4298. 3                             3 nature of the problem.             3
  4299. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4300. 3 Cannot Inquire bindings - 'text'             3 GLUELIB failed to run a DCE function.  text  3
  4301. 3                             3 is the DCE error message explaining the    3
  4302. 3                             3 nature of the problem.             3
  4303. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4304. 3 Cannot use protocol sequence - 'text'          3 GLUELIB failed to run a DCE function.  text  3
  4305. 3                             3 is the DCE error message explaining the    3
  4306. 3                             3 nature of the problem.             3
  4307. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4308. 3 Cannot get binding from string binding 'string' -    3 GLUELIB failed to run a DCE function.  text  3
  4309. 3 'text'                          3 is the DCE error message explaining the    3
  4310. 3                             3 nature of the problem.             3
  4311. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4312. 3 Cannot register interface - 'text'            3 GLUELIB failed to run a DCE function.  text  3
  4313. 3                             3 is the DCE error message explaining the    3
  4314. 3                             3 nature of the problem.             3
  4315. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4316. 3 Cannot register endpoint - 'text'            3 GLUELIB failed to run a DCE function.  text  3
  4317. 3                             3 is the DCE error message explaining the    3
  4318. 3                             3 nature of the problem.             3
  4319. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4320. 3 Error on listening: 'text'                3 GLUELIB failed to run a DCE function.  text  3
  4321. 3                             3 is the DCE error message explaining the    3
  4322. 3                             3 nature of the problem.             3
  4323. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4324. 3 Cannot delete endpoint registration - 'text'       3 GLUELIB failed to run a DCE function.  text  3
  4325. 3                             3 is the DCE error message explaining the    3
  4326. 3                             3 nature of the problem.             3
  4327. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4328. 3 NULL host parameter, cannot bind to remote host     3 Self-explanatory                3
  4329. 3 Cannot compose binding string: NULL endpoint       3 Self-explanatory                3
  4330. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4331. 3 Protocol sequence 'protseq' is not valid         3 Self-explanatory                3
  4332. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4333. 3 Cannot generate obj_uuid from obj = 'objid'       3 Self-explanatory                3
  4334. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4335. 3 Cannot generate new type_uuid              3 Self-explanatory                3
  4336. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4337. 3 Cannot register object/type uuid association, obj =   3 Self-explanatory                3
  4338. 3 'objid'                         3                        3
  4339. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  4340.  
  4341.  
  4342. ΓòÉΓòÉΓòÉ 10.2. gluelib Allocation Errors ΓòÉΓòÉΓòÉ
  4343.  
  4344. The following errors are rare allocation problems which should never occur at 
  4345. runtime.  If they do, report them to IBM. 
  4346.  
  4347. ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
  4348. 3 Message                         3 Explanation                  3
  4349. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4350. 3 Cannot allocate application profile, exiting ...     3 Self-explanatory                3
  4351. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4352. 3 Cannot allocate application interface vector       3 Self-explanatory                3
  4353. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4354. 3 Cannot create application, exiting ...          3 Self-explanatory                3
  4355. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4356. 3 Cannot allocate input buffer, exiting ...        3 Self-explanatory                3
  4357. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4358. 3 Cannot reallocate input buffer, exiting ...       3 Self-explanatory                3
  4359. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4360. 3 IFInitialize(): Cannot allocate application, exiting   3 Self-explanatory                3
  4361. 3 ...                           3                        3
  4362. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4363. 3 IFInitialize(): Cannot initialize application profile  3 Self-explanatory                3
  4364. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4365. 3 IFCreate(): Cannot allocate interface, exiting ...    3 Self-explanatory                3
  4366. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4367. 3 IFCreate(): Cannot initialize interface profile     3 Self-explanatory                3
  4368. CDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD4
  4369. 3 IFCreate(): Cannot initialize interface methods for   3 Self-explanatory                3
  4370. 3 'ifname'                         3                        3
  4371. @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
  4372.  
  4373.  
  4374. ΓòÉΓòÉΓòÉ 11. Send Us Your Comments ΓòÉΓòÉΓòÉ
  4375.  
  4376. Was the MakeDCE - Application Development Tools User's Guide Version useful, 
  4377. clear, and accurate? Please let us know by completing this form and sending it 
  4378. to the following address: 
  4379.  
  4380.  
  4381. Uri Shani
  4382. IBM Israel Science and Technology
  4383. Haifa Research Laboratory
  4384. MATAM - Advanced Technology Center
  4385. Haifa, Israel 31905
  4386. Fax: (+972)4-296114
  4387.  
  4388. ZDDDDDDDDDDDDDDDDBDDDDDDDDDDBDDDDDDDDDDBDDDDDDDDDDBDDDDDDDDDDBDDDDDDDDDD?
  4389. 3         3 Strongly 3 Agree   3 Neutral  3 Disagree 3 Strongly 3
  4390. 3         3 agree   3      3      3      3 disagree 3
  4391. CDDDDDDDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDD4
  4392. 3 I am satisfied 3      3      3      3      3      3
  4393. 3 with this    3      3      3      3      3      3
  4394. 3 information   3      3      3      3      3      3
  4395. CDDDDDDDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDD4
  4396. 3 The informa-  3      3      3      3      3      3
  4397. 3 tion is tech-  3      3      3      3      3      3
  4398. 3 nically     3      3      3      3      3      3
  4399. 3 accurate    3      3      3      3      3      3
  4400. CDDDDDDDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDD4
  4401. 3 The informa-  3      3      3      3      3      3
  4402. 3 tion is com-  3      3      3      3      3      3
  4403. 3 plete      3      3      3      3      3      3
  4404. CDDDDDDDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDD4
  4405. 3 Specific    3      3      3      3      3      3
  4406. 3 topics are   3      3      3      3      3      3
  4407. 3 easy to find  3      3      3      3      3      3
  4408. CDDDDDDDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDD4
  4409. 3 Examples are  3      3      3      3      3      3
  4410. 3 clear and    3      3      3      3      3      3
  4411. 3 useful     3      3      3      3      3      3
  4412. CDDDDDDDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDDEDDDDDDDDDD4
  4413. 3 The format is  3      3      3      3      3      3
  4414. 3 attractive and 3      3      3      3      3      3
  4415. 3 useful     3      3      3      3      3      3
  4416. @DDDDDDDDDDDDDDDDADDDDDDDDDDADDDDDDDDDDADDDDDDDDDDADDDDDDDDDDADDDDDDDDDDY
  4417.  
  4418.  
  4419. What would you like to see included in the product or the information?
  4420.  
  4421.               _______________________________________________
  4422.  
  4423.               _______________________________________________
  4424.  
  4425.               _______________________________________________
  4426.  
  4427.               _______________________________________________
  4428.  
  4429.               _______________________________________________
  4430.  
  4431.   How to find you:
  4432.  
  4433.               Name
  4434.               _______________________________________
  4435.               Address
  4436.               _______________________________________
  4437.               Zip
  4438.               _______________________________________
  4439.               Phone
  4440.               _______________________________________
  4441.  
  4442.  
  4443. ΓòÉΓòÉΓòÉ 12. Figures ΓòÉΓòÉΓòÉ
  4444.  
  4445.   1. Distributed Application Graph 
  4446.  
  4447.   2. MakeDCE flow diagram 
  4448.  
  4449.   3. idlgen data and control flow 
  4450.  
  4451.   4. Client/Server component overview in MakeDCE environment 
  4452.  
  4453.   5. Splitting a stand-alone application into Client and Server roles 
  4454.  
  4455.  
  4456. ΓòÉΓòÉΓòÉ 12.1. Distributed Application Graph ΓòÉΓòÉΓòÉ
  4457.  
  4458.  
  4459. ΓòÉΓòÉΓòÉ <hidden> fid2 ΓòÉΓòÉΓòÉ
  4460.  
  4461.  
  4462. ΓòÉΓòÉΓòÉ <hidden> fid1 ΓòÉΓòÉΓòÉ
  4463.  
  4464. An edge in the graph represents a collection of operations that can use RPC. 
  4465. It is named after the DCE Interface describing these operations. The edge 
  4466. arrowhead represents the direction of an RPC; directed from node B to node A 
  4467. specifies that interface I2 is imported by node B (source of edge) and exported 
  4468. by node A (target of edge). A single application node can import and export 
  4469. multiple interfaces. 
  4470.  
  4471.  
  4472. ΓòÉΓòÉΓòÉ 12.2. MakeDCE flow diagram ΓòÉΓòÉΓòÉ
  4473.  
  4474.  
  4475. ΓòÉΓòÉΓòÉ <hidden> fid4 ΓòÉΓòÉΓòÉ
  4476.  
  4477.  
  4478. ΓòÉΓòÉΓòÉ <hidden> fid3 ΓòÉΓòÉΓòÉ
  4479.  
  4480.  
  4481. C files (.c and .h items in the top box) are sources for developing IDL files 
  4482. (using idlgen). The stubs generated from them by the idl compiler, together 
  4483. with glue code generated by gluegen, and the original C files are used to make 
  4484. up the client and server applications. 
  4485.  
  4486. Numbered items in these figures play a role in DCE application development with 
  4487. MakeDCE. 
  4488.  
  4489.   1. A collection of C sources and their .h files is given 1. 
  4490.  
  4491.   2. For any subset of relevant C sources 2, the idlgen tool is activated (3). 
  4492.      It takes as input the C sources and an IDL file. 
  4493.  
  4494.      Note:  Each IDL file denotes a server interface by defining the set of 
  4495.      operations it exports.  There may be several different interfaces to the 
  4496.      same server, to the same set of C sources, or to various (overlapping) 
  4497.      subsets of the given C sources. idlgen always operates on an IDL file and 
  4498.      its associated C sources. Yet, for flexibility, idlgen can accept an IDL 
  4499.      file with any subset of C sources whenever you want to progress in small 
  4500.      steps, gradually building up the final IDL file. idlgen also takes C files 
  4501.      alone as input, generating an IDL file for them without the IDL header 
  4502.      attributes. 
  4503.  
  4504.      Another flexibility advantage is to use old IDL files to lend internal 
  4505.      information to newly generated IDL files when both IDL files share some C 
  4506.      sources. idlgen does not support this possibility at this time. Multiple 
  4507.      IDL input files could mean one main IDL input file, while other files 
  4508.      would play the role of examples (see Number of Input IDL Files). 
  4509.  
  4510.   3. The IDL file (.idl) comes from four possible sources: 
  4511.  
  4512.     o An initial skeleton IDL file 4 is generated by uuidgen [uuidgen is a DCE 
  4513.       tool that generates Unique Universal IDs.  When activated as uuidgen -i, 
  4514.       it generates an IDL skeleton file, containing a uuid in the proper place. 
  4515.       ] 5 
  4516.     o A existing IDL file 6 is fed into idlgen 
  4517.     o An erroneous IDL file is corrected by the user and fed again into idlgen 
  4518.       7 
  4519.     o An existing IDL file (either complete or still in development 8) to be 
  4520.       used as an example for the IDL file in development. 
  4521.  
  4522.   4. The basic idlgen step 3 also takes user input and corrections9, which are 
  4523.      applied to the IDL file until a good or legal IDL file is generated (10). 
  4524.  
  4525.   5. The good IDL file is fed into the idl compiler11, where good means that 
  4526.      there is nothing else idlgen can do about it, although the idl compiler 
  4527.      may still detect more errors. In cases where you made no final decision in 
  4528.      the idlgen step3, the IDL file does not pass the idl compilation step11, 
  4529.      which generates error and warning messages12. 
  4530.  
  4531.   6. A successful idl compilation generates stubs 14 and19. 
  4532.  
  4533.   7. gluegen generates the glue code, 15 and 20, which starts the server and 
  4534.      wraps the client, so that client and server bind at runtime to resolve the 
  4535.      RPC services required. gluegen uses an APF file 13 as input for the 
  4536.      glue-code generation. 
  4537.  
  4538.   8. From the files generated by the idl compiler, some 14 are needed to be 
  4539.      compiled and linked 16 with the glue code15 and some of the sources 17 are 
  4540.      needed to create the server program 18. 
  4541.  
  4542.   9. Similarly to the server, another set of IDL-generated files19 with some 
  4543.      glue code 20 and a portion of the C sources 21 are compiled and linked 22 
  4544.      to generate the client program 23. 
  4545.  
  4546.  
  4547. ΓòÉΓòÉΓòÉ 12.3. idlgen data and control flow ΓòÉΓòÉΓòÉ
  4548.  
  4549.  
  4550. ΓòÉΓòÉΓòÉ <hidden> fid6 ΓòÉΓòÉΓòÉ
  4551.  
  4552.  
  4553. ΓòÉΓòÉΓòÉ <hidden> fid5 ΓòÉΓòÉΓòÉ
  4554.  
  4555. idlgen Components and processing steps in reading input, matching idl and C 
  4556. sources, and producing resulting IDL file. 
  4557.  
  4558.  
  4559. ΓòÉΓòÉΓòÉ 12.4. Client/Server component overview in MakeDCE environment ΓòÉΓòÉΓòÉ
  4560.  
  4561.  
  4562. ΓòÉΓòÉΓòÉ <hidden> fid8 ΓòÉΓòÉΓòÉ
  4563.  
  4564.  
  4565. ΓòÉΓòÉΓòÉ <hidden> fid7 ΓòÉΓòÉΓòÉ
  4566.  
  4567. Note the parallel roles between the gluegen process, and the stubs generated by 
  4568. the idl compiler. 
  4569.  
  4570.  
  4571. ΓòÉΓòÉΓòÉ 12.5. Splitting a stand-alone application into Client and Server roles ΓòÉΓòÉΓòÉ
  4572.  
  4573.  
  4574. ΓòÉΓòÉΓòÉ <hidden> fid10 ΓòÉΓòÉΓòÉ
  4575.  
  4576.  
  4577. ΓòÉΓòÉΓòÉ <hidden> fid9 ΓòÉΓòÉΓòÉ
  4578.  
  4579. The components of each application node (Client and Server) are as follows: 
  4580.  
  4581.  o Glue-code and glue-stub are generated by gluegen from an APF file. Separate 
  4582.    pairs of glue-code and glue-stub files are generated for each application - 
  4583.    one for the Client and one for the Server. The glue-codes include the main() 
  4584.    entry-points of the Client and Server programs. 
  4585.  
  4586.  o The glue-library is linked with each program and implements the API used in 
  4587.    the glue-code. Application code can also use the API of the Glue library. 
  4588.  
  4589.  o Application code in the Client is the Main part of the original application, 
  4590.    which performs an RPC to the Server. 
  4591.  
  4592.  o Application code in the Server is the Utility part of the original 
  4593.    application, which implements the RPC performed by the Client. 
  4594.  
  4595.  o Server-stub is a code generated by the idl compiler (part of DCE) for the 
  4596.    Server. The code is generated from an IDL file that represents the interface 
  4597.    between the Client and the Server. 
  4598.  
  4599.  o Client-stub is a code generated by the idl compiler for the Client. 
  4600.  
  4601.  o DCE RTL is the DCE runtime library, which supports the DCE execution 
  4602.    environment of DCE applications. This layer uses other lower-level 
  4603.    communication support layers in the operating systems of the respective 
  4604.    platforms on which the application nodes run. 
  4605.  
  4606.  
  4607. ΓòÉΓòÉΓòÉ 13. Glossary ΓòÉΓòÉΓòÉ
  4608.  
  4609.  
  4610. ΓòÉΓòÉΓòÉ 13.1. A ΓòÉΓòÉΓòÉ
  4611.  
  4612.  
  4613. ΓòÉΓòÉΓòÉ 13.1.1. ACF file ΓòÉΓòÉΓòÉ
  4614.  
  4615. ACF file 
  4616.  
  4617. An optional definition file complementary to the IDL file, which provides 
  4618. additional specifications for the idl compiler when generating stubs. 
  4619.  
  4620.  
  4621. ΓòÉΓòÉΓòÉ 13.1.2. Application Profile ΓòÉΓòÉΓòÉ
  4622.  
  4623. Application Profile 
  4624.  
  4625. gluegen configures DCE applications using Application Profiles that are a 
  4626. combination of one or more interface profiles plus additional global 
  4627. parameters. 
  4628.  
  4629.  
  4630. ΓòÉΓòÉΓòÉ 13.1.3. APF ΓòÉΓòÉΓòÉ
  4631.  
  4632. APF 
  4633.  
  4634. Application Profile Language. Formal statements used for specifying application 
  4635. profiles. 
  4636.  
  4637.  
  4638. ΓòÉΓòÉΓòÉ 13.2. B ΓòÉΓòÉΓòÉ
  4639.  
  4640.  
  4641. ΓòÉΓòÉΓòÉ 13.2.1. Binding ΓòÉΓòÉΓòÉ
  4642.  
  4643. Binding 
  4644.  
  4645. The operation that connects a Client and a Server for the purpose of making an 
  4646. RPC. To bind, a Server has to make its network location known to the Client so 
  4647. that a connection over the communication network can be established. Binding is 
  4648. performed at the level of interfaces and can use many kinds of DCE services. To 
  4649. bind, a Client needs to have at least an interface UUID and versions (and can 
  4650. include an object UUID), as well as a way to obtain the Server machine and port 
  4651. addresses. 
  4652.  
  4653.  port      A machine-wide unique resource used for data communications between 
  4654.            separate applications on separate machines (or the same machine). 
  4655.  host      A network-wide resource identifying a specific machine or domain. In 
  4656.            DCE, machines are also organized in cells, but each machine is 
  4657.            uniquely identified. On Internet, a machine is uniquely identified 
  4658.            by a four-field number and its compatible string of names. An 
  4659.            example is harod.haifa.ibm.com, which is a symbolic name of the 
  4660.            unique address 9.148.5.128. 
  4661.  protocol  An agreed-upon method of communication between two endpoints on a 
  4662.            network. DCE supports two protocols:  TCP/IP and UDP/IP. The former 
  4663.            is connection-based, and the latter is datagram-based. 
  4664.  
  4665.  
  4666. ΓòÉΓòÉΓòÉ 13.2.2. Binding Handle ΓòÉΓòÉΓòÉ
  4667.  
  4668. Binding Handle 
  4669.  
  4670. A DCE internal data structure that identifies the resources allocated for 
  4671. performing RPC between Client and Server. The binding handle has its 
  4672. appropriate form in the Client and in the Server. It can be partially bound, 
  4673. which means that some of the information to establish binding is present, but 
  4674. RPCs cannot be performed yet. To fully bind, a handle can require a significant 
  4675. number of interactions with the DCE API. There are four kinds of binding 
  4676. handles: 
  4677.  
  4678.  Auto Handle A binding handle used by the DCE/RPC run-time that is completely 
  4679.            transparent at the RPC level (that is, the RPC function prototype 
  4680.            does not include a handle parameter). Whenever a Client performs 
  4681.            RPC, the handle is initialized automatically based solely on 
  4682.            information in the IDL file. 
  4683.  Customized Handle The most general form of a handle, which allows an 
  4684.            application to maintain its own structure representing its notion of 
  4685.            a handle. 
  4686.  Explicit Handle The general form of a binding handle, which the application 
  4687.            has to initialize and explicitly pass to the RPC run-time through a 
  4688.            parameter to the operation. 
  4689.  Implicit Handle A binding handle similar to the Auto Handle in that it is also 
  4690.            completely transparent at the RPC level, but the application has to 
  4691.            bind the handle. This is done through a naming convention that 
  4692.            assures that the correct implicit handle is initialized and bound by 
  4693.            the application for a given interface (defined in an IDL file). 
  4694.  
  4695.  
  4696. ΓòÉΓòÉΓòÉ 13.3. C ΓòÉΓòÉΓòÉ
  4697.  
  4698.  
  4699. ΓòÉΓòÉΓòÉ 13.3.1. Client ΓòÉΓòÉΓòÉ
  4700.  
  4701. Client 
  4702.  
  4703. The portion of a DCE application that performs RPC calls. This is a program 
  4704. which may be engaged in all possible kinds of activities, some of which involve 
  4705. calls through RPC to a remote Server. 
  4706.  
  4707.  
  4708. ΓòÉΓòÉΓòÉ 13.4. D ΓòÉΓòÉΓòÉ
  4709.  
  4710.  
  4711. ΓòÉΓòÉΓòÉ 13.4.1. DCE Cell ΓòÉΓòÉΓòÉ
  4712.  
  4713. DCE Cell 
  4714.  
  4715. An organization of hosts in a local area network to work as a single namespace 
  4716. cell. A directory service for the cell is used to resolve binding request for 
  4717. Clients on the cell to Servers on the cell. 
  4718.  
  4719.  
  4720. ΓòÉΓòÉΓòÉ 13.4.2. DCE Run-Time Library ΓòÉΓòÉΓòÉ
  4721.  
  4722. DCE Run-Time Library 
  4723.  
  4724. The collection of procedures and functions that implement the DCE API through 
  4725. which applications can gain access to all DCE services, perform RPC, and use 
  4726. threads. 
  4727.  
  4728.  
  4729. ΓòÉΓòÉΓòÉ 13.5. E ΓòÉΓòÉΓòÉ
  4730.  
  4731.  
  4732. ΓòÉΓòÉΓòÉ 13.5.1. EPV ΓòÉΓòÉΓòÉ
  4733.  
  4734. EPV 
  4735.  
  4736. Entry-Point Vector. A mapping between IDL operations and actual procedure entry 
  4737. points in IDL manager code. A manager can have more than one EPV per interface, 
  4738. thus differentiating different versions. When an RPC is received, this vector 
  4739. is used to select the actual service routine. By default, the idl compiler 
  4740. generates the EPV automatically in the stubs. 
  4741.  
  4742.  
  4743. ΓòÉΓòÉΓòÉ 13.5.2. Entry-point mapper ΓòÉΓòÉΓòÉ
  4744.  
  4745. Entry-point mapper 
  4746.  
  4747. Another functional name for the RPCD tool. An application can refer to an 
  4748. entry-point mapper on its own host as a local entry-point mapper and on remote 
  4749. machines as remote entry-point mappers. 
  4750.  
  4751.  
  4752. ΓòÉΓòÉΓòÉ 13.5.3. export ΓòÉΓòÉΓòÉ
  4753.  
  4754. export 
  4755.  
  4756. A flag word contained in a meta comment indicating that the symbols following 
  4757. it are to be exported. 
  4758.  
  4759.  
  4760. ΓòÉΓòÉΓòÉ 13.6. I ΓòÉΓòÉΓòÉ
  4761.  
  4762.  
  4763. ΓòÉΓòÉΓòÉ 13.6.1. idl compiler ΓòÉΓòÉΓòÉ
  4764.  
  4765. idl compiler 
  4766.  
  4767. A DCE tool that compiles IDL files (and possibly also ACF files) into stubs and 
  4768. possibly additional support code. 
  4769.  
  4770.  
  4771. ΓòÉΓòÉΓòÉ 13.6.2. IDL file ΓòÉΓòÉΓòÉ
  4772.  
  4773. IDL file 
  4774.  
  4775. Interface Definition Language file that defines the interface between Server 
  4776. and Client. This file contains definitions of RPC operation prototypes, as well 
  4777. as the semantics of parameter marshalling, RPC behavior, and the unique 
  4778. identification of this set of operations. IDL files are compiled by the idl 
  4779. compiler into stubs. 
  4780.  
  4781.  
  4782. ΓòÉΓòÉΓòÉ 13.6.3. IDLGEN ΓòÉΓòÉΓòÉ
  4783.  
  4784. IDLGEN 
  4785.  
  4786. An environmental variable that can be used for holding idlgen command switches. 
  4787.  
  4788.  
  4789. ΓòÉΓòÉΓòÉ 13.6.4. IDL version ΓòÉΓòÉΓòÉ
  4790.  
  4791. IDL version 
  4792.  
  4793. A pair of numbers, termed major and minor, constituting the version numbers, 
  4794. part of the header of an IDL file, which, together with the interface UUID in 
  4795. the IDL file, differentiates and identifies an interface for binding. 
  4796.  
  4797.  
  4798. ΓòÉΓòÉΓòÉ 13.6.5. Interface Profile ΓòÉΓòÉΓòÉ
  4799.  
  4800. Interface Profile 
  4801.  
  4802. A group of parameters that affect the initialization process and binding method 
  4803. that an application node uses with respect to a given interface; one of the set 
  4804. of parameters used by gluegen. 
  4805.  
  4806.  
  4807. ΓòÉΓòÉΓòÉ 13.7. M ΓòÉΓòÉΓòÉ
  4808.  
  4809.  
  4810. ΓòÉΓòÉΓòÉ 13.7.1. Manager ΓòÉΓòÉΓòÉ
  4811.  
  4812. Manager 
  4813.  
  4814. The implementation of operations defined in an IDL file. Sometimes, these are 
  4815. organized in a single file called manager.c. Sometimes the implementation can 
  4816. span several files collectively, termed the manager of an interface. 
  4817.  
  4818.  
  4819. ΓòÉΓòÉΓòÉ 13.7.2. Marshalling ΓòÉΓòÉΓòÉ
  4820.  
  4821. Marshalling 
  4822.  
  4823. The activity of encoding parameter structures, contents, and presentation into 
  4824. a byte stream that can be sent using a packet switching communication media, so 
  4825. that it can be recreated at the receiving end. Marshalling takes care of 
  4826. differences between machine architectures, operating systems, languages, and 
  4827. compilers. 
  4828.  
  4829.  
  4830. ΓòÉΓòÉΓòÉ 13.7.3. Meta comment ΓòÉΓòÉΓòÉ
  4831.  
  4832. Meta comment 
  4833.  
  4834. Comments that idlgen embeds in the output IDL file. There are three kinds of 
  4835. Meta comment contents: 
  4836.  
  4837.  o Disclaimer identifying idlgen as the IDL file generator. 
  4838.  
  4839.  o List of export and noexport symbols identified from the C source file. 
  4840.  
  4841.  o Flagging certain C source forms that are incompatible with IDL files (at the 
  4842.    present time this applies only to enum tags). 
  4843.  
  4844.  
  4845. ΓòÉΓòÉΓòÉ 13.7.4. MK_DEFAULT ΓòÉΓòÉΓòÉ
  4846.  
  4847. MK_DEFAULT 
  4848.  
  4849. An idlgen special keyword inserted in IDL output files by idlgen when 
  4850. generating IDL attributes.  This keyword is removed on subsequent idlgen passes 
  4851. on the IDL file. 
  4852.  
  4853.  
  4854. ΓòÉΓòÉΓòÉ 13.7.5. MK_ERROR ΓòÉΓòÉΓòÉ
  4855.  
  4856. MK_ERROR 
  4857.  
  4858. An idlgen special keyword inserted in IDL output files by idlgen to flag 
  4859. incompatibilities between IDL file declarations and the corresponding C source 
  4860. declarations. This keyword remains even after subsequent idlgen passes until 
  4861. the user makes corrections to the C source file. 
  4862.  
  4863.  
  4864. ΓòÉΓòÉΓòÉ 13.8. N ΓòÉΓòÉΓòÉ
  4865.  
  4866.  
  4867. ΓòÉΓòÉΓòÉ 13.8.1. Name Services ΓòÉΓòÉΓòÉ
  4868.  
  4869. Name Services 
  4870.  
  4871. DCE Name services consist of the RPCD port mapper and the more general 
  4872. directory services, which can span a local cell or a global worldwide directory 
  4873. of service names. 
  4874.  
  4875.  
  4876. ΓòÉΓòÉΓòÉ 13.8.2. noexport ΓòÉΓòÉΓòÉ
  4877.  
  4878. noexport 
  4879.  
  4880. Flag word contained in a meta comment indicating that the symbols following it 
  4881. are not to be exported. 
  4882.  
  4883.  
  4884. ΓòÉΓòÉΓòÉ 13.9. R ΓòÉΓòÉΓòÉ
  4885.  
  4886.  
  4887. ΓòÉΓòÉΓòÉ 13.9.1. RPC ΓòÉΓòÉΓòÉ
  4888.  
  4889. RPC 
  4890.  
  4891. Remote Procedure Call. A communication paradigm used mostly in connection with 
  4892. Client/Server models. Each RPC is performed by a Client program and is serviced 
  4893. by a Server program. In the application code, the call to an RPC and the 
  4894. service entry point look exactly like any other local procedure call and its 
  4895. return in the application. An RPC call involves sending (marshalling) input 
  4896. parameters to the server invoking a remote service that unmarshalls these 
  4897. parameters, and placing the calling party in wait state until completion of the 
  4898. remote service. Output parameters are then marshalled back to the caller so 
  4899. that it can continue running. The servicing party awaits further calls for 
  4900. service. 
  4901.  
  4902.  
  4903. ΓòÉΓòÉΓòÉ 13.9.2. RPCD ΓòÉΓòÉΓòÉ
  4904.  
  4905. RPCD 
  4906.  
  4907. A DCE tool (a daemon) that operates one per host and maintains a mapping table 
  4908. between interfaces and entry-points (ports) of Servers. Each Server can 
  4909. register all its exported interfaces in the RPCD daemon, associated with object 
  4910. UUIDs if so desired, and can also register the interface with the ports 
  4911. allocated to these objects and interfaces. A Client can then request the daemon 
  4912. to resolve a particular interface to a corresponding port on the machine. 
  4913.  
  4914.  
  4915. ΓòÉΓòÉΓòÉ 13.9.3. RPC stubs ΓòÉΓòÉΓòÉ
  4916.  
  4917. RPC stubs 
  4918.  
  4919. A piece of code that the idl compiler generates from a given IDL file. There 
  4920. are a Client stub and a Server stub. The Client stub takes care of performing 
  4921. the call out from the client, and the Server stub takes care of the 
  4922. complementary activity on the Server side. Stubs have to be compiled and linked 
  4923. with the appropriate Server and Client programs. 
  4924.  
  4925.  
  4926. ΓòÉΓòÉΓòÉ 13.10. S ΓòÉΓòÉΓòÉ
  4927.  
  4928.  
  4929. ΓòÉΓòÉΓòÉ 13.10.1. Security Services ΓòÉΓòÉΓòÉ
  4930.  
  4931. Security Services 
  4932.  
  4933. A DCE feature that limits the permission of Clients to bind with Servers, 
  4934. unless specific security permissions are obtained. Security services are 
  4935. functional during Server registration and handle binding. 
  4936.  
  4937.  
  4938. ΓòÉΓòÉΓòÉ 13.10.2. Server ΓòÉΓòÉΓòÉ
  4939.  
  4940. Server 
  4941.  
  4942. A portion of a DCE application that services RPC calls. This is a program that 
  4943. can be engaged in a number of activities and that is capable of listening for 
  4944. incoming RPC calls and servicing them when received. 
  4945.  
  4946.  
  4947. ΓòÉΓòÉΓòÉ 13.10.3. String Binding ΓòÉΓòÉΓòÉ
  4948.  
  4949. String Binding 
  4950.  
  4951. The simplest method of binding a Client to a Server. Specifies the actual 
  4952. machine and port of the Server in the form of a string. Such strings can come 
  4953. from a command line, a file, and so on. 
  4954.  
  4955.  
  4956. ΓòÉΓòÉΓòÉ 13.11. T ΓòÉΓòÉΓòÉ
  4957.  
  4958.  
  4959. ΓòÉΓòÉΓòÉ 13.11.1. tbd(...) ΓòÉΓòÉΓòÉ
  4960.  
  4961. tbd(...) 
  4962.  
  4963. A flag contained in a meta comment indicating that idlgen has determined that 
  4964. the given symbol is for export or noexport (the value is given in the 
  4965. parentheses). This decision must be confirmed by the user. 
  4966.  
  4967.  
  4968. ΓòÉΓòÉΓòÉ 13.11.2. Threads ΓòÉΓòÉΓòÉ
  4969.  
  4970. Threads 
  4971.  
  4972. A DCE support which, at the application level (unlike the operating-system 
  4973. level), permits the concurrent execution of several independent execution 
  4974. paths. All threads of the same program share the same code and static program 
  4975. memory segment but have distinctive stacks. Support of the DCE threads comes as 
  4976. a library of routines. Threads are used in DCE to allow Servers to service more 
  4977. than one request concurrently. 
  4978.  
  4979.  
  4980. ΓòÉΓòÉΓòÉ 13.12. U ΓòÉΓòÉΓòÉ
  4981.  
  4982.  
  4983. ΓòÉΓòÉΓòÉ 13.12.1. UUID ΓòÉΓòÉΓòÉ
  4984.  
  4985. UUID 
  4986.  
  4987. Universal Unique IDentifier. Used to identify DCE objects in a universally 
  4988. ensured unique string of 128 bits. UUIDs are generated by the DCE uuidgen tool. 
  4989. UUIDs have a hexadecimal string representation composed of 5 fields separated 
  4990. by hyphens, such as 006EE100-21AF-1BFA-8B16-10005AA8B716. The two types of 
  4991. UUIDs are the following: 
  4992.  
  4993.  Interface UUID A UUID used in the header of IDL files to uniquely identify the 
  4994.                 interface when binding a Client and a Server for the operations 
  4995.                 in the IDL file. 
  4996.  Object UUID    A UUID used in DCE binding when a specific server or object is 
  4997.                 requested among the numerous possible Servers implementing a 
  4998.                 given interface (identified by its own UUID and IDL file). 
  4999.  
  5000.  
  5001. ΓòÉΓòÉΓòÉ 13.12.2. uuidgen ΓòÉΓòÉΓòÉ
  5002.  
  5003. uuidgen 
  5004.  
  5005. A DCE tool that generates UUIDs. Activating this tool with the -i switch 
  5006. generates an IDL skeleton file where the contents of an interface can be filled 
  5007. in.  It has its own UUID.