How to use CORBA Name service in BCB

Source: Internet
Author: User

Because in the attempt to use BCB 4 to access Nameservice, encountered some strange problems, and Visibroker example can be used to bcc32 normal compilation, I decided to do a program from scratch to see where the problem. Toss all night, the conclusion is to do the server or not the CORBA Server Wizard good. (I still don't understand why?) )

1, file| New, Multitier,corba IDL File:

interface Order{
string Name();
};

Save As Order.idl

2, file| New, Consol Wizard, generates a CONSOL application with no VCL support.

3, project| ADD to Project, select the order.idl,project you just wrote | The Compile.

4, file| New, Miltitier, Corba Object implementation,idl Select the newly written order.idl,interface order, for the sake of simplicity, the other names are not changed. OK, automatically generate OrderServer.cpp.

5, found in the OrderServer.cpp char* orderimpl::name (), in its function body write:

Return "Hi, I am Test corbaserver";

6, File | Save All,unit1.cpp as Tcnserver.cpp,project Save as TCNSERVER.BPR. and make the. A simple CORBA server is done.

7. Test run, then run Osfind.exe in MS-DOS mode (should be in path, otherwise to $ (vbroker) \ Bin), this will display a series of CORBA information:

C:\>osfind
osfind: Found one agent at port 14000
     HOST: YANGWU
osfind: Found 1 OADs in your domain
HOST: YANGWU
osfind: Following are the list of Implementations registered with OADs.
     HOST: YANGWU
         REPOSITORY ID: IDL:CorbaTester/DBServer2Factory:1.0
             OBJECT NAME: DBServer2
osfind: Following are the list of Implementations started manually.
HOST: YANGWU
         REPOSITORY ID: IDL:Order:1.0
             OBJECT NAME: OrderObject
         REPOSITORY ID: IDL:visigenic.com/Activation/OAD:1.0
             OBJECT NAME: 61.132.58.166

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.