| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 16.1 | Try this | iceaxe.zko.dec.com::Rosen | Michael Rosen | Fri Feb 07 1997 13:46 | 19 | 
|  | Sepp,
You are correct, the documentation is wrong for using this function.  The following 
code works for me.
Mike Rosen
-----------
Dim oTest As DITest_SeqofLongs	'Where this is the interface generated by DTC for the 
CORBA module Test, interface SeqofLongs.
Set oTest = 
GetObject("@Digital.Obb.Bridge\OREF\DEC::~10001979d1dae7a1120000002101fa0a500000000000
8a1dae7a971b000002101fa0a5000000000011000000000018a1dae7a981b000002101fa0a500000000001
000008a1dae7a971b000002101fa0a500000002010000180~~~~%00000%|")
The following code also works with an object in the namespace named Test.
Set oTest = GetObject("@Digital.Obb.Bridge\ADAPTER\ObjectBroker\Advertisements\Test")
 | 
| 16.2 | GetObject(OrefMoniker$) makes VB crashing | EMNTAL::STADELMANN | Sepp @ZUO 760-2609 | Wed Feb 12 1997 12:21 | 26 | 
|  |     when I do (setting up my Oref Moniker) as you recommend in .-1, 
    Set anAccount = GetObject(DisplayName$)
    
    pops up an error message box
    
    Microsoft Visual C++ Debug Library
    Debug Error!
    Program: D:\VB32\VB32.EXE
    abnormal program termination
    
    (Press Retry to debug the application)
    <abort> <retry> <ignore>
    
    in other words, 
    Set anAccount = GetObject(DisplayName$)
    
    makes VB 4.0 crashing. (not nice)
    
    (I must admit, I cant tell yet if the used Oref Moniker part belonging
    to the .obr file does still point to a valid object / implementation.
    
    I would expect an exception not a VB crash.
    
    Sepp,
    
    
 | 
| 16.3 |  | NUTS2U::LITTLE | ATG/EOS/Object Infrastructure/me | Thu Mar 06 1997 03:49 | 7 | 
|  |     Sepp,
    
    I have a simple Visual Basic bank client that you could look at if you
    like.  It uses the GetObject function to access existing bank acounts.
    
    -tl
    
 | 
| 16.4 |  | EMNTAL::STADELMANN | Sepp @ZUO 760-2609 | Fri Mar 14 1997 03:26 | 5 | 
|  |     tl,
    
    Thank you for your offer! Where can I get it?
    
    Sepp,
 | 
| 16.5 | vb program to access bank11 | PAMSRC::PROCTOR | say it with objects | Thu Mar 20 1997 08:56 | 328 | 
|  |     Sorry for the delay.. It been real busy around here.  
    
    What follows is a mock health club billing program that works against
    the bank11 corba demo.  Just extract the following into club.frm and
    load into vb.
    
    good luck
    
    bob
    ---------------------------------------
VERSION 4.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "Form1"
   ClientHeight    =   7770
   ClientLeft      =   1380
   ClientTop       =   3690
   ClientWidth     =   7920
   ForeColor       =   &H00C00000&
   Height          =   8175
   Left            =   1320
   LinkTopic       =   "Form1"
   Picture         =   "Form1.frx":0000
   ScaleHeight     =   7770
   ScaleWidth      =   7920
   Top             =   3345
   Width           =   8040
   Begin VB.CommandButton ExitCommand 
      Caption         =   "Exit"
      BeginProperty Font 
         name            =   "Arial Black"
         charset         =   0
         weight          =   400
         size            =   12
         underline       =   0   'False
         italic          =   0   'False
         strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5880
      TabIndex        =   14
      Top             =   6720
      Width           =   1455
   End
   Begin VB.ListBox accounts 
      Height          =   2370
      ItemData        =   "Form1.frx":0446
      Left            =   360
      List            =   "Form1.frx":0453
      TabIndex        =   13
      Top             =   2520
      Width           =   2655
   End
   Begin VB.TextBox StatusText 
      BackColor       =   &H00C0C0C0&
      BeginProperty Font 
         name            =   "Arial"
         charset         =   0
         weight          =   700
         size            =   8.25
         underline       =   0   'False
         italic          =   0   'False
         strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   315
      Left            =   1320
      TabIndex        =   12
      Text            =   "Transaction Formulation"
      Top             =   6840
      Width           =   2895
   End
   Begin VB.CheckBox SquashCheck 
      Caption         =   "Squash"
      Height          =   375
      Left            =   4560
      TabIndex        =   10
      Top             =   4680
      Width           =   1335
   End
   Begin VB.CheckBox SwimCheck 
      Caption         =   "Swimming"
      Height          =   375
      Left            =   4560
      TabIndex        =   9
      Top             =   3960
      Width           =   1335
   End
   Begin VB.CheckBox WeightsCheck 
      Caption         =   "Weights"
      Height          =   375
      Left            =   4560
      TabIndex        =   8
      Top             =   3240
      Width           =   1455
   End
   Begin VB.CheckBox TennisCheck 
      Caption         =   "Tennis"
      Height          =   375
      Left            =   4560
      TabIndex        =   7
      Top             =   2520
      Width           =   1335
   End
   Begin VB.CommandButton Debit 
      Caption         =   "Post Debit"
      BeginProperty Font 
         name            =   "Haettenschweiler"
         charset         =   0
         weight          =   500
         size            =   20.25
         underline       =   0   'False
         italic          =   0   'False
         strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   480
      TabIndex        =   6
      Top             =   5400
      Width           =   2535
   End
   Begin VB.TextBox Total 
      Height          =   375
      Left            =   6120
      TabIndex        =   5
      Text            =   "0"
      Top             =   5760
      Width           =   1095
   End
   Begin VB.TextBox SquashEdit 
      Height          =   375
      Left            =   6120
      TabIndex        =   3
      Text            =   "0"
      Top             =   4680
      Width           =   1095
   End
   Begin VB.TextBox SwimEdit 
      Height          =   375
      Left            =   6120
      TabIndex        =   2
      Text            =   "0"
      Top             =   3960
      Width           =   1095
   End
   Begin VB.TextBox WeightsEdit 
      Height          =   375
      Left            =   6120
      TabIndex        =   1
      Text            =   "0"
      Top             =   3240
      Width           =   1095
   End
   Begin VB.TextBox TennisEdit 
      Height          =   375
      Left            =   6120
      TabIndex        =   0
      Text            =   "0"
      Top             =   2520
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "Member's Accounts"
      Height          =   255
      Left            =   360
      TabIndex        =   15
      Top             =   2280
      Width           =   2535
   End
   Begin VB.Label Label2 
      Caption         =   "Status:"
      BeginProperty Font 
         name            =   "Arial"
         charset         =   0
         weight          =   700
         size            =   12
         underline       =   0   'False
         italic          =   0   'False
         strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   11
      Top             =   6840
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Total:"
      BeginProperty Font 
         name            =   "MS Sans Serif"
         charset         =   0
         weight          =   700
         size            =   13.5
         underline       =   0   'False
         italic          =   0   'False
         strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4800
      TabIndex        =   4
      Top             =   5760
      Width           =   1095
   End
   Begin VB.Image Image2 
      Appearance      =   0  'Flat
      BorderStyle     =   1  'Fixed Single
      Height          =   1815
      Left            =   960
      Picture         =   "Form1.frx":0481
      Stretch         =   -1  'True
      Top             =   120
      Width           =   6135
   End
   Begin VB.Image Image1 
      Height          =   15
      Left            =   4680
      Picture         =   "Form1.frx":BE03
      Stretch         =   -1  'True
      Top             =   3120
      Width           =   15
   End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Public AccountsList
Private Sub List1_Click()
End Sub
Private Sub Option1_Click()
End Sub
Private Sub Option4_Click()
End Sub
Private Sub Check1_Click()
End Sub
Private Sub Debit_Click()
DisplayName = "@Digital.Obb.Bridge\ADAPTER\OBBObjects\Advertisements\" & accounts
StatusText.ForeColor = &HFF
StatusText.Text = "Transaction Pending"
Refresh
Set SelectedAccount = GetObject(DisplayName)
Dim NewBalance As Single
Dim funds As Single
funds = Int(Total)
SelectedAccount.Withdraw funds, NewBalance
StatusText.ForeColor = &HC00000
StatusText.Text = "Transaction Completed"
End Sub
Private Sub ExitCommand_Click()
End
End Sub
Private Sub Form_Activate()
accounts.ListIndex = 0
End Sub
Private Sub SquashCheck_Click()
If SquashCheck.Value = 0 Then SquashEdit = 0
If SquashCheck.Value = 1 Then SquashEdit = 15
StatusText = "Transaction Formulation"
Total.Text = Int(TennisEdit) + Int(WeightsEdit) + Int(SwimEdit) + Int(SquashEdit)
End Sub
Private Sub SwimCheck_Click()
If SwimCheck.Value = 0 Then SwimEdit = 0
If SwimCheck.Value = 1 Then SwimEdit = 35
StatusText = "Transaction Formulation"
Total.Text = Int(TennisEdit) + Int(WeightsEdit) + Int(SwimEdit) + Int(SquashEdit)
End Sub
Private Sub TennisCheck_Click()
If TennisCheck.Value = 0 Then TennisEdit = 0
If TennisCheck.Value = 1 Then TennisEdit = 65
StatusText = "Transaction Formulation"
Total.Text = Int(TennisEdit) + Int(WeightsEdit) + Int(SwimEdit) + Int(SquashEdit)
End Sub
Private Sub WeightsCheck_Click()
If WeightsCheck.Value = 0 Then WeightsEdit = 0
If WeightsCheck.Value = 1 Then WeightsEdit = 25
StatusText = "Transaction Formulation"
Total.Text = Int(TennisEdit) + Int(WeightsEdit) + Int(SwimEdit) + Int(SquashEdit)
End Sub
 |