|
|
1.1 ! root 1: More Information about Microsoft RPC version 1.0 ! 2: ____________________________________________________________ ! 3: ! 4: This document contains important information about Microsoft ! 5: RPC version 1.0 that is not included in the Microsoft RPC ! 6: Programmer's Guide and Reference or in online help. ! 7: ! 8: Using Notepad to View This Document ! 9: ! 10: To move through this document, press PAGE UP and PAGE DOWN ! 11: or click the arrows at the top and bottom of the scroll bar ! 12: along the right side of the window. ! 13: ! 14: To print this document, choose the Print command from the ! 15: File menu. ! 16: ! 17: For Help on using Notepad, press F1. ! 18: ! 19: ____________________________________________________________ ! 20: ! 21: Introduction ! 22: ! 23: Microsoft RPC SDK version 1.0 is a toolkit for developing ! 24: network-aware distributed applications in C/C++. The RPC ! 25: toolkit includes: ! 26: ! 27: MIDL compilers for Microsoft Windows NT and MS-DOS ! 28: C/C++ language header files and run-time libraries for ! 29: Microsoft Windows NT, Microsoft Windows, and MS-DOS ! 30: Sample programs for Microsoft Windows NT, Microsoft ! 31: Windows, and MS-DOS ! 32: RPC reference online help files and PostScript(TM) ! 33: files ! 34: ! 35: The Microsoft Windows NT SDK contains both the Microsoft ! 36: Windows NT and Microsoft Windows 3.x/MS-DOS versions of the ! 37: RPC SDK. ! 38: ! 39: Installation ! 40: ! 41: The Microsoft Windows NT SDK installs the components of the ! 42: Microsoft Windows NT RPC SDK as part of its standard ! 43: installation. No additional installation is required. ! 44: ! 45: You must install the Microsoft Windows 3.x and MS-DOS ! 46: versions of the RPC toolkit. This software requires: ! 47: ! 48: Microsoft C/C++ version 7.0 ! 49: DOS Protected Mode Interface (DPMI) server that ! 50: supports version 0.9 or later of the DPMI specification and ! 51: the MS-DOS extensions to the DPMI (or Microsoft Windows 3.1) ! 52: Microsoft LAN Manager version 2.1 with NetBEUI, Named ! 53: Pipes, or TCP/IP ! 54: ! 55: To install the Microsoft Windows and MS-DOS version of the ! 56: RPC toolkit, run the Setup program that is available in the ! 57: directory NT\MSTOOLS\RPC_DOS\NSETUP under Microsoft Windows 3.x. ! 58: ! 59: The environment variables INCLUDE, LIB, and PATH should be ! 60: set to point to the directories that contain the Microsoft ! 61: C/C++ version 7.0 development tools. (The C/C++ version 7.0 ! 62: installation program sets these environment variables.) ! 63: ! 64: RPC Documentation ! 65: ! 66: The following Microsoft RPC version 1.0 reference materials ! 67: are available in published book form and in PostScript file ! 68: format: ! 69: ! 70: RPC Programmer's Guide and Reference ! 71: Part I: Programmer's Guide ! 72: Part II: Run-time API Reference ! 73: Part III: MIDL Language Reference ! 74: ! 75: The PostScript files allow you to print individual chapters ! 76: of the documentation on your own PostScript printer. ! 77: ! 78: The following run-time and MIDL reference help files are ! 79: available on line: ! 80: ! 81: RPC10WH.HLP WinHelp run-time API reference ! 82: RPC10QH.HLP QuickHelp run-time API reference ! 83: MIDL10WH.HLP WinHelp MIDL reference ! 84: MIDL10QH.HLP QuickHelp MIDL reference ! 85: ! 86: RPC sample program source files are available in the ! 87: directory NT\MSTOOLS\SAMPLES\RPC. The file ! 88: NT\MSTOOLS\SAMPLES\RPC\README.TXT describes each sample. ! 89: ! 90: ____________________________________________________________ ! 91: ! 92: Contents ! 93: ! 94: This document contains additional information on the ! 95: following topics: ! 96: ! 97: 1.0 DCE interoperability issues ! 98: ! 99: 2.0 Packing and alignment considerations ! 100: ! 101: 3.0 String arrays not transmitted correctly; use pointers ! 102: ! 103: 4.0 MIDL switch "-env generic" not supported ! 104: ! 105: 5.0 Cast char constants as small in OSF compatibility mode ! 106: ! 107: 6.0 MIDL type wchar_t not supported in all modes ! 108: ! 109: 7.0 MIDL attribute pointer_default() not OSF compatible ! 110: ! 111: 8.0 MIDL interprets "handle" in attribute list as keyword ! 112: ! 113: 9.0 C stub source code causes compilation warnings ! 114: ! 115: 10.0 Use tagged structure declarations ! 116: ! 117: 11.0 Unsized arrays not supported ! 118: ! 119: 12.0 Updated command line help for the MIDL compiler ! 120: ! 121: 13.0 RpcBindingToStringBinding does not return network address ! 122: ! 123: 14.0 RpcServerUseAllProtseqs, RpcNetworkInqProtseqs incomplete ! 124: ! 125: 15.0 DCE error codes not mapped to Win32 error codes ! 126: ! 127: 16.0 Using the MS-DOS UuidGen utility with Microsoft Windows NT ! 128: ! 129: 17.0 Creating installation disks for your application ! 130: ! 131: 18.0 New LAN Manager 2.1 DLL required for Windows clients ! 132: ! 133: 19.0 Running the locator and endpoint mapper ! 134: ! 135: 20.0 Updating RPC registry entries for new NetBIOS configurations ! 136: ! 137: 21.0 RPC application exception handling for Microsoft Windows 3.x ! 138: ! 139: ____________________________________________________________ ! 140: ! 141: 1.0 DCE interoperability issues ! 142: ! 143: The Microsoft implementations of the name service and ! 144: endpoint mapper that are provided with this release of ! 145: Microsoft RPC version 1.0 do not interoperate with DCE ! 146: implementations. ! 147: ! 148: The endpoint mapper is the equivalent of the DCE RPC daemon ! 149: rpcd. DCE clients cannot resolve endpoints from the ! 150: Microsoft endpoint mapper and Microsoft clients cannot ! 151: resolve endpoints from the DCE RPC daemon rpcd. ! 152: ! 153: This release of Microsoft RPC version 1.0 defines the type ! 154: error_status_t as unsigned short. DCE implementations define ! 155: error_status_t as unsigned long. ! 156: ! 157: Full pointers (pointers associated with the attribute [ptr]) ! 158: are not completely implemented in this release of Microsoft ! 159: RPC version 1.0. To allow portability of DCE applications, ! 160: MIDL treats full pointers as unique pointers, which means ! 161: that aliasing is not supported. The use of full pointers ! 162: that cause aliasing can cause undefined results. ! 163: ! 164: DCE host names are case-sensitive. Specify the hostname ! 165: exactly as it appears or the client will not be able to ! 166: locate the host server. ! 167: ! 168: Other differences between the Microsoft and DCE ! 169: implementations are documented in the RPC Programmer's Guide ! 170: and Reference. ! 171: ! 172: 2.0 Packing and Alignment Considerations ! 173: ! 174: You must use the same packing and alignment settings (/Zp ! 175: switch) with both the C compiler and the MIDL compiler. ! 176: Using different packing levels for each compiler causes ! 177: undefined results. Default values are set for each target ! 178: operating system. You can specify the /Zp switch to verify ! 179: that the correct packing and alignment settings are used on ! 180: both compilers. ! 181: ! 182: For Microsoft Windows 3.x and MS-DOS-based distributed ! 183: applications, use one of the following two methods: ! 184: ! 185: a. Compile using /Zp2 with both the MIDL and C compilers ! 186: ! 187: b. Compile using any /Zp level (use the same level ! 188: for both the MIDL and C compilers; the level /Zp4 produces ! 189: the most efficient marshalling code) and add the following ! 190: code to the files RPC.H and RPCNDR.H: ! 191: ! 192: #pragma pack(2) /* at start of rpc.h and rpcndr.h */ ! 193: ... ! 194: #pragma pack () /* at end, restore default level */ ! 195: ! 196: 3.0 String arrays not transmitted correctly; use pointers ! 197: ! 198: Arrays of strings are not transmitted correctly in some ! 199: cases because the MIDL compiler contains a known software ! 200: error that leads to incorrect stub source files. In this ! 201: release, avoid the use of such string arrays as the ! 202: following: ! 203: ! 204: typedef [string] char str[80]; ! 205: void foo([out,length_is(*len)] str array[100], ! 206: [out] short *len); ! 207: ! 208: In this release of Microsoft RPC version 1.0, an [out] array ! 209: of string pointers must be initialized with valid non-null ! 210: values before the remote procedure call. When an array of ! 211: null pointer values is transmitted to the server, the stub ! 212: does not correctly allocate storage for the strings on ! 213: return to the client. For example, the array pArray must be ! 214: initialized: ! 215: ! 216: typedef [string] char * PSTRINGTYPE; ! 217: void OutStringSArray( ! 218: [in, out] long * psize, ! 219: [out, size_is(*psize)] PSTRINGTYPE * pArray); ! 220: ! 221: 4.0 MIDL switch "-env generic" not supported ! 222: ! 223: The MIDL compiler environment switch "-env generic" is ! 224: not supported in this version. When your target operating ! 225: system is the same as the development environment, you do ! 226: not have to specify an environment switch; the default ! 227: settings are correct. Otherwise, use the specific ! 228: environment switch that corresponds to your target ! 229: application environment: "-env win32", "-env win16", or ! 230: "-env dos". ! 231: ! 232: 5.0 Cast char constants as small in OSF compatibility mode ! 233: ! 234: The MIDL compiler expects char constants to be type ! 235: small. The following definition generates a type mismatch ! 236: error message: ! 237: ! 238: const char c = 'a'; // fails with type mismatch error ! 239: ! 240: Use the following statement to avoid the error: ! 241: ! 242: const char c = (small) 'a'; ! 243: ! 244: This temporary solution applies only to this release of ! 245: Microsoft RPC version 1.0 and will generate errors in OSF ! 246: versions of the IDL compiler and in future releases of the ! 247: MIDL compiler. ! 248: ! 249: 6.0 MIDL type "wchar_t" not supported in all modes ! 250: ! 251: The extended character type wchar_t is not fully supported ! 252: in this release of Microsoft RPC version 1.0. ! 253: ! 254: The wchar_t type is supported in the following modes: ! 255: ! 256: implicit_local ! 257: app_config ! 258: ms_ext ! 259: (ms_ext + implicit_local) ! 260: ! 261: The wchar_t type is not supported in the following modes: ! 262: ! 263: OSF compatibility mode (no switches) ! 264: (implicit_local + app_config) ! 265: (ms_ext + app_config) ! 266: (ms_ext + app_config + implicit_local) ! 267: ! 268: 7.0 MIDL attribute pointer_default() not OSF compatible ! 269: ! 270: The pointer_default() attribute in this release of Microsoft ! 271: RPC version 1.0 is not completely compatible with the DCE ! 272: implementation. For example, in the Microsoft ! 273: implementation, the following function parameter is a ! 274: reference pointer: ! 275: ! 276: pointer_default(ptr); ! 277: ... ! 278: typedef x * MY_POINTER_TYPE; ! 279: ... ! 280: Foo(MY_POINTER_TYPE px); ! 281: ! 282: The DCE implementation treats px as a full pointer in the ! 283: above example. ! 284: ! 285: 8.0 MIDL interprets "handle" in attribute list as keyword ! 286: ! 287: The MIDL compiler supplied with this release of Microsoft ! 288: RPC version 1.0 interprets the token "handle" as a keyword ! 289: in the context of an attribute list. For example, consider ! 290: an IDL file that contains the following implicit handle ! 291: declaration: ! 292: ! 293: [implicit_handle (handle_t handle)] ! 294: ! 295: Because the MIDL compiler interprets the name "handle" as a ! 296: keyword rather than as a variable name, MIDL returns an ! 297: error code indicating that the "handle" keyword is used ! 298: incorrectly in the above example. ! 299: ! 300: C keywords such as "auto", "static", and "extern" generate ! 301: similar errors during MIDL compilation. Do not use MIDL or C ! 302: keywords as variable names. ! 303: ! 304: 9.0 C Stub Source Code Causes Compilation Warnings ! 305: ! 306: The stub files generated by the MIDL compiler may generate ! 307: warnings when they are compiled at compiler warning level 3 ! 308: and higher. These warnings can generally be safely ignored. ! 309: ! 310: Unsigned character string arguments generate "incompatible ! 311: pointer assignment warnings" when you compile the stubs. The ! 312: C run-time library functions use char * arguments rather ! 313: than unsigned char * arguments. Compiler warning messages ! 314: about mismatched comparisons between integral types and ! 315: mismatched pointer assignments in stubs can be safely ! 316: ignored. ! 317: ! 318: 10.0 Use tagged structure declarations ! 319: ! 320: The MIDL compiler assigns temporary tags to untagged ! 321: structures. When you use more than one IDL file to build ! 322: your distributed application, the MIDL compiler may assign ! 323: the same temporary name to both untagged structures and fail ! 324: to link. ! 325: ! 326: You can avoid these link errors by specifying using tagged ! 327: structure declarations for types imported or shared between ! 328: interfaces. ! 329: ! 330: For example, the following untagged structure ! 331: UNTAGGED_STRUCT can be changed to the tagged structure ! 332: TAGGED_STRUCT: ! 333: ! 334: typedef struct { ! 335: char * pszName; ! 336: char * pszAddress; ! 337: } UNTAGGED_STRUCT; ! 338: ! 339: typedef struct _TAGGED_STRUCT { ! 340: char * pszName; ! 341: char * pszAddress; ! 342: } TAGGED_STRUCT; ! 343: ! 344: 11.0 Unsized arrays not supported ! 345: ! 346: This release of Microsoft RPC version 1.0 does not support ! 347: character arrays that are specified without the array size. ! 348: Specify the array size or use a character pointer. ! 349: ! 350: For example, the following function argument is not ! 351: supported: ! 352: ! 353: foo ([in, string] char ac[]); ! 354: ! 355: Use char pointers or specify the array size. The following ! 356: function arguments are supported: ! 357: ! 358: foo([in, string] char char_array[100]); ! 359: ! 360: foo([in, string] char * char_array); ! 361: ! 362: 12.0 Updated command line help for the MIDL compiler ! 363: ! 364: The updated help text for the MIDL compiler appears as ! 365: follows: ! 366: ! 367: -MIDL COMPILER OPTIONS- ! 368: -MODE- ! 369: /ms_ext Microsoft extensions mode ! 370: /app_config Application configuration mode ! 371: /implicit_local Assume non-remote data is [local] ! 372: ! 373: -INPUT- ! 374: /acf filename Specify the attribute configuration file ! 375: /I directory Specify directory for import and include files ! 376: /import ms_ext Compile only needed portions of imported IDL files ! 377: /import ms_nt Compile only needed portions of imported IDL files ! 378: /import osf Assume imported IDL files are compiled separately ! 379: /no_def_idir Ignore the current and the INCLUDE directories ! 380: ! 381: -OUTPUT FILE GENERATION- ! 382: /client all Generate client stub and aux files ! 383: /client aux Generate client auxiliary file only ! 384: /client none Generate no client files ! 385: /client stub Generate client stub file only ! 386: /out directory Destination directory for output files ! 387: /server all Generate server stub and aux files ! 388: /server aux Generate server aux file only ! 389: /server none Generate no server files ! 390: /server stub Generate server stub file only ! 391: /syntax_check Check syntax only; do not generate output files ! 392: /Zs Check syntax only; do not generate output files ! 393: ! 394: -OUTPUT FILE NAMES- ! 395: /caux filename Specify client auxiliary file name ! 396: /cstub filename Specify client stub file name ! 397: /cswtch filename Specify switch stub file name ! 398: /Fs filename Generate a listing file ! 399: /header filename Specify header file name ! 400: /saux filename Specify server auxiliary file name ! 401: /sstub filename Specify server stub file name ! 402: ! 403: -C COMPILER AND PREPROCESSOR OPTIONS- ! 404: /cc_cmd cmd_line Specify C compiler for stub, aux files ! 405: /cc_opt options Specify options associated with C compiler ! 406: /cpp_cmd cmd_line Specify name of C preprocessor ! 407: /cpp_opt options Specify additional C preprocessor ! 408: options ! 409: /D name[=def] Pass #define name, optional value to C preprocessor ! 410: /no_cpp Turn off the C preprocessing option ! 411: /U name Remove any previous definition (undefine) ! 412: ! 413: -ENVIRONMENT- ! 414: /char signed C compiler default char is signed ! 415: /char unsigned C compiler default char is unsigned ! 416: /char ansi7 Char values limited to 0-127 ! 417: /env dos MS-DOS client ! 418: /env win16 Microsoft Windows 16-bit (Win 3.x) ! 419: /env win32 Microsoft Windows 32-bit (NT) ! 420: /env generic Produce one header for all environments ! 421: ! 422: -ERROR AND WARNING MESSAGES- ! 423: /error all Check for all types of errors ! 424: /error allocation Check for out of memory errors ! 425: /error enum Check for errors converting long, short enum ! 426: /error trees Check for aliasing errors only ! 427: /no_warn Suppress compiler warning messages ! 428: ! 429: -OPTIMIZATION- ! 430: /pack {1|2|4|8} Designate packing level of structures ! 431: /space_opt Optimize code for space rather than speed ! 432: /Zp{1|2|4|8} Designate packing level of structures ! 433: ! 434: -MISCELLANEOUS- ! 435: /? List MIDL compiler switch settings ! 436: @response_file Accept input from a response file ! 437: /confirm Display options without compiling MIDL source ! 438: /help Display a list of MIDL compiler switches ! 439: /prefix "s1" "s2" Replace default suffix "s1" with prefix "s2" ! 440: ! 441: 13.0 RpcBindingToStringBinding does not return network address ! 442: ! 443: The RPC API function RpcBindingToStringBinding, when used ! 444: with the named pipe loadable transport, does not return the ! 445: network address. ! 446: ! 447: Use the function RpcStringBindingParse to obtain the other ! 448: components of the binding string, use the Win32 function ! 449: GetComputerName to obtain the computer name that represents ! 450: the network address, then call RpcStringBindingCompose to ! 451: reconstruct the correct string binding from these ! 452: components. ! 453: ! 454: 14.0 RpcServerUseAllProtseqs, RpcNetworkInqProtseqs Incomplete ! 455: ! 456: The RPC API functions RpcNetworkInqProtseqs and ! 457: RpcServerUseAllProtseqs return status codes that indicate ! 458: success but the functions do not operate properly. ! 459: ! 460: RpcNetworkInqProtseqs returns a RPC_PROTSEQ_VECTOR data ! 461: structure with a count value of 0 and no pointers to ! 462: protocol sequence strings. ! 463: ! 464: Rather than call RpcServerUseAllProtseqs, call ! 465: RpcServerUseProtseq for each supported protocol sequence: ! 466: ! 467: RPC_STATUS RpcStatus; ! 468: ! 469: RpcStatus = RpcServerUseProtseq("ncacn_np", ! 470: MaxCalls, SecurityDescriptor); ! 471: ... ! 472: RpcStatus = RpcServerUseProtseq("ncacn_ip_tcp", ! 473: MaxCalls, SecurityDescriptor); ! 474: ... ! 475: RpcStatus = RpcServerUseProtseq("ncacn_dnet_nsp", ! 476: MaxCalls, SecurityDescriptor); ! 477: ... ! 478: RpcStatus = RpcServerUseProtseq("ncacn_nb_nb", ! 479: MaxCalls, SecurityDescriptor); ! 480: ... ! 481: RpcStatus = RpcServerUseProtseq("ncalrpc", ! 482: MaxCalls, SecurityDescriptor); ! 483: ! 484: 15.0 DCE error codes not mapped to Win32 error codes ! 485: ! 486: In this release of Microsoft RPC version 1.0, the run-time ! 487: API functions RpcEp* return DCE error codes rather than the ! 488: documented Win32 error codes. The DCE error codes, RPC error ! 489: manifest, and Win32 error codes are as follows: ! 490: ! 491: Win32 error code RPC Manifest DCE error code ! 492: ! 493: 1751 EPT_S_INVALID_ENTRY 0x1c110007 ! 494: 1752 EPT_S_CANT_PERFORM_OP 0x1c110001 ! 495: 1753 EPT_S_NOT_REGISTERED 0x1c110004 ! 496: ! 497: The RPC header files define the manifests to the Win32 error ! 498: code values but the RPC runtime functions return the DCE ! 499: values. Redefine the manifests in your application to the ! 500: DCE values, as follows: ! 501: ! 502: #undef EPT_S_CANT_PERFORM_OP ! 503: #define EPT_S_CANT_PERFORM_OP 0x1c110001 ! 504: #undef EPT_S_INVALID_ENTRY ! 505: #define EPT_S_INVALID_ENTRY 0x1c110007 ! 506: #undef EPT_S_NOT_REGISTERED ! 507: #define EPT_S_NOT_REGISTERED 0x1c110004 ! 508: ! 509: 16.0 Using the MS-DOS UuidGen utility with Microsoft Windows NT ! 510: ! 511: The UuidGen utility is supplied for MS-DOS only. No version ! 512: is supplied for native Microsoft Windows NT. However, you ! 513: can run the MS-DOS version of this utility in the Microsoft ! 514: Windows NT MS-DOS screen group. The utility is available in ! 515: compressed format in the MSTOOLS\RPC_DOS directory. To ! 516: decompress the UuidGen utility, use the following command on ! 517: Microsoft Windows 3.x: ! 518: ! 519: setup /z uuidgen.ex_ drive:\directory\uuidgen.exe ! 520: ! 521: where drive: and directory specify a directory on your path. ! 522: ! 523: 17.0 Creating installation disks for your application ! 524: ! 525: Two batch files help you create RPC run-time installation ! 526: disks that can accompany your distributed application. These ! 527: batch files create installation disks that contain the Setup ! 528: program and the Microsoft RPC run-time libraries, allowing ! 529: you to distribute the Microsoft RPC run-time libraries with ! 530: your distributed application. The following two batch files ! 531: are provided: ! 532: ! 533: wrundisk.bat creates Microsoft Windows/MS-DOS run-time ! 534: install disk ! 535: drundisk.bat creates MS-DOS-only run-time install disk ! 536: ! 537: 17.1 Creating installation disks for Microsoft Windows applications ! 538: ! 539: Insert a formatted, blank floppy disk in the destination ! 540: drive. Start the installation disk utility by typing ! 541: "wrundisk" followed by the optional source and destination ! 542: drive names. The wrundisk.bat file uses the following ! 543: syntax: ! 544: ! 545: wrundisk [source:[path] [dest:]] ! 546: ! 547: where ! 548: ! 549: source is a disk or directory that contains the compressed ! 550: files that are provided in the Microsoft Windows NT SDK ! 551: directory \mstools\rpc_dos\disk1. ! 552: ! 553: dest is a drive name specifying the drive that contains the ! 554: formatted, blank floppy disk. ! 555: ! 556: For example,"wrundisk c:\nt\mstools\rpc_dos\disk1 a:" copies ! 557: the compressed files to the floppy disk in the drive A. ! 558: ! 559: Your application user can then use the Setup program under ! 560: Microsoft Windows on the resulting installation disk to ! 561: install the RPC run-time libraries for Microsoft Windows and ! 562: MS-DOS. ! 563: ! 564: 17.2 Installation disks for MS-DOS Distributed Applications ! 565: ! 566: The drundisk utility copies files from an installed RPC SDK. ! 567: To ensure that all MS-DOS loadable transports are present on ! 568: the run-time installation disk, you must select all loadable ! 569: transports at the time you install the Microsoft RPC SDK. ! 570: ! 571: Insert a formatted, blank floppy disk in the destination ! 572: drive. Start the installation utility by typing "drundisk" ! 573: followed by the optional source and destination drive names. ! 574: The drundisk.bat file uses the following syntax: ! 575: ! 576: drundisk [directory [dest:]] ! 577: ! 578: where directory is the name of the directory that contains ! 579: all loadable transport (.RPC) files and all name service ! 580: dynamic link libraries. ! 581: ! 582: For example, the command "drundisk c:\lanman.dos\netprog a:" ! 583: copies the MS-DOS run-time libraries, the loadable transport ! 584: files, and name service DLLs from the C hard drive to the ! 585: floppy disk in drive A. Your application user can then use ! 586: the Setup program on the run-time installation disk to ! 587: install the RPC run-time libraries. ! 588: ! 589: 18.0 New LAN Manager 2.1 DLL required for Windows clients ! 590: ! 591: Install an updated version of the dynamic link library ! 592: NETAPI.DLL for Microsoft Windows 3.x clients that use ! 593: Microsoft LAN Manager 2.1 named pipes. This version of the ! 594: LAN Manager API library corrects a software error. ! 595: ! 596: To install the new version of this library, connect to the ! 597: directory that contains the Setup program and the compressed ! 598: source files, then enter the command: ! 599: ! 600: setup /z netapi.dl_ drive:\directory\netapi.dll ! 601: ! 602: where drive and directory specify the path to the LAN ! 603: Manager 2.1 directory that contains NETAPI.DLL. For example, ! 604: if LAN Manager is installed in the directory C:\LANMAN.DOS, ! 605: use the command: ! 606: ! 607: setup /z netapi.dl_ c:\lanman.dos\netprog\netapi.dll ! 608: ! 609: 19.0 Running the locator and endpoint mapper ! 610: ! 611: In this release of Microsoft RPC version 1.0, the locator ! 612: and endpoint mapper are not provided as services but as ! 613: programs that you must start from the Microsoft Windows NT ! 614: command line. The locator is the Microsoft implementation of ! 615: the RPC name service independent API functions (NSI). The ! 616: endpoint mapper allows the use of dynamic endpoints. ! 617: ! 618: Start the locator using the following command syntax: ! 619: ! 620: locator /noservice ! 621: ! 622: Start the endpoint mapper on the RPC server using the ! 623: following syntax: ! 624: ! 625: rpcss noservice ! 626: ! 627: Start the locator and endpoint mapper before starting the ! 628: server application. In this release of Microsoft RPC version ! 629: 1.0, distributed applications that use the RPC NSI API ! 630: functions must run the server and client applications on the ! 631: same computer. ! 632: ! 633: 20.0 Updating RPC registry entries for new NetBIOS configurations ! 634: ! 635: The Microsoft RPC Setup program automatically maps protocol ! 636: strings to NetBIOS lana numbers and writes these settings in ! 637: the registry. These mappings work as long as you only have ! 638: one network card and one network protocol. If this is not ! 639: the case, or if you change your network configuration after ! 640: installing Microsoft RPC, you must update the registry to ! 641: indicate the new correspondences between protocol strings ! 642: and NetBIOS lana numbers. ! 643: ! 644: For Microsoft Windows NT, the mapping string appears in the ! 645: registry tree under \Software\Microsoft\Rpc\NetBios. For ! 646: MS-DOS, the mapping string appears in the registry file ! 647: RPCREG.DAT. ! 648: ! 649: The mapping string uses the following syntax: ! 650: ! 651: ncacn_nb_<protocol><digit> = <lana_number> ! 652: ! 653: where ! 654: ! 655: <protocol> indicates the protocol type. For MS-DOS, the ! 656: valid <protocol> value is "nb". For Microsoft Windows NT, ! 657: valid <protocol> values are as follows: ! 658: ! 659: <protocol> Protocol type ! 660: ! 661: xns XNS ! 662: nb NetBEUI ! 663: tcpip TCP/IP ! 664: ! 665: <digit> indicates a unique digit associated with each ! 666: instance of a protocol. Use the value 0 for the first ! 667: instance of a protocol and use the next consecutive digit ! 668: for each additional instance of that protocol. For example, ! 669: assign the value ncacn_nb_nb0 to the first NetBEUI entry; ! 670: assign the value ncacn_nb_nb1 to the second NetBEUI entry. ! 671: ! 672: <lana_number> indicates the NetBIOS lana number. A unique ! 673: lana number is associated with each network adapter present ! 674: in the computer. For more information about the lana number, ! 675: see your network documentation. ! 676: ! 677: For example, the following mapping string describes a ! 678: configuration that uses the NetBEUI protocol over an adapter ! 679: card that is assigned lana number 0: ! 680: ! 681: ncacn_nb_nb0=0 ! 682: ! 683: When you install a second card that supports both XNS and ! 684: NetBEUI protocols, the mapping strings appear as follows: ! 685: ! 686: ncacn_nb_nb0=0 ! 687: ncacn_nb_nb1=1 ! 688: ncacn_nb_xns0=2 ! 689: ! 690: 21.0 RPC application exception handling for Microsoft Windows 3.x ! 691: ! 692: A software error in this release of Microsoft RPC version ! 693: 1.0 can cause your Microsoft Windows 3.x RPC application to ! 694: GP fault after repeated exceptions and repeated execution of ! 695: the application. ! 696: ! 697: When the top-level exception handler exits with an ! 698: exception, an internal data structure is left in an ! 699: incorrect state. Repeated execution of the same application ! 700: can then cause memory corruption. ! 701: ! 702: You can avoid this error by guaranteeing that the final top- ! 703: level try block of the program is exited normally (without ! 704: an exception). Use the following structure in your ! 705: application: ! 706: ! 707: RpcTryExcept ! 708: { ! 709: ... ! 710: } ! 711: RpcExcept(...) ! 712: { ! 713: ... ! 714: } ! 715: /* add a try-finally block here */ ! 716: volatile x = 1; /* assure this code is present */ ! 717: RpcTryFinally ! 718: { ! 719: if (x == 2) ! 720: x++; ! 721: } ! 722: RpcFinally ! 723: { ! 724: x = 3; ! 725: } ! 726: RpcEndFinally; ! 727: RpcEndExcept ! 728: ! 729: The volatile variable x does not perform any useful function ! 730: for the application. It is present only to ensure that the ! 731: RpcTryFinally structure is present after the C compiler ! 732: optimizes the application.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.