T.R | Title | User | Personal Name | Date | Lines |
---|
21.1 | Use VB Object Browser | iceaxe.zko.dec.com::Rosen | Michael Rosen | Fri Feb 14 1997 14:46 | 23 |
| > When I see in my .ODL file
>
> interface DIBANK_AcctFactory : IDispatch
> {
> [id(7)]
> HRESULT CreateAcct(
> [in] BANK_ACCT_TYPES acctType,
> [in] float amount,
> [out] long* acctId,
> [in,out,optional] VARIANT* exceptionInfo,
> [out,retval] DIBANK_Account** returnValue);
> }
>
>
> How is a data type defined in .ODL made available to a VB program ?
We use the .ODL file to create a type library, the name/location of which
is specified by the -T command line switch or an edit box in the GUI. From
the VB Tools menu, choose References... and add include that type library
in your VB Project. Then use the Object Brower (Choose View from the Menu
Bar, or F2) to see the signature and types that VB expects.
|
21.2 | object types | EMNTAL::STADELMANN | Sepp @ZUO 760-2609 | Tue Feb 18 1997 05:57 | 11 |
| Thank you that does the trick. To bad to forget it.
1 more question: Can I use
DIM xyz AS DIBANK_AcctFactory (to say that each DIxyz...
can be used as object type in a DIM statement after
the type library generated has ben made available to VB?
Sepp,
|
21.3 | Not sure what you are asking? | iceaxe.zko.dec.com::Rosen | Michael Rosen | Thu Feb 20 1997 16:44 | 8 |
| Sepp,
I'm really not sure what you're asking in .2. Can you give me another example
of what you want to do?
Thanks,
Mike Rosen
|
21.4 | | EMNTAL::STADELMANN | Sepp @ZUO 760-2609 | Mon Feb 24 1997 04:15 | 14 |
| Mike,
I want to know, after which steps I can use a VB DIM declaration
statement of the form
DIM myObj AS DIBANK_CheckAccnt
when latest is DIBANK_CheckAccnt know to VB; My guess, after
referencing the generated type library.
which pre-required steps will make the DIM statement above work.
DIBANK_CheckAccnt beeing an example.
Sepp
|
21.5 | After referencing the Typelib from VB | iceaxe.zko.dec.com::Rosen | Michael Rosen | Mon Feb 24 1997 16:43 | 18 |
| There are two steps required before you can use the object in VB.
1) Right click on the CORBA IDL file, choose the Generate Code option, select
the Desktop Views tab and create Automation interfaces and type libraries.
2) Reference the generated typelib in VB by including it using the
Tools->Reference menu function.
Before you can use the "GetObject" function, you must also register the object
reference in the object broker advertisement registry using the obbreg -O
command.
OR
Before you can use the "CreateObject" function, you must register the CORBA
factory object in the advertisement partition.
Mike
|
21.6 | | EMNTAL::STADELMANN | Sepp @ZUO 760-2609 | Tue Feb 25 1997 04:21 | 1 |
| thanks Mike, this helped. Sepp
|