|
-
May 17th, 2004, 06:18 AM
#1
Thread Starter
New Member
Passing Custom Com objects
Hope someone can help me!
I am resonabley new to COM / COM + and I am having problems passing com objects around.
I have created an ActiveX .dll call AXCLogger. This dll has two classes PhoneCall and PhoneCallAdmin.
Class PhoneCall has some private variables and the relevant property gets and lets and holds just string and intger info. Class: PhoneCallAdmin has a method called LogCall which will save the infomation within a sql database. I have no problems with the SQL/ado coding but I am cannot pass the PhoneCall object into the PhoneCallAdmin class.
I am using the following Sub declaration within my PhoneCallAdmin class.
Public Sub LogCall( myPhoneCall as AXCLogger.PhoneCall )
End Sub
I am testing the dll in a standard project as follows
Dim aPhoneCall as AXCLogger.PhoneCall
Dim aPhoneCallAdmin as AXCLogger.PhoneCallAdmin
Set aPhoneCall = New AXClogger.PhoneCall
Set aPhoneCallAdmin = New AXCLogger.PhoneCallAdmin
'put some random info in the object
aPhonCall.ContactName = "Mr Bob Fish"
aPhoneCall.CallDay = "WednesDay"
'etc.
PhoneCallAdmin.LogCall(aPhoneCall)
At this Point I get the error Object doesn't support the property or method. If I change the LogCall procedure to accept another type of varaible it works fine.
Hope someone can shed some light on this please
-
May 17th, 2004, 07:41 AM
#2
VB Code:
Call PhoneCallAdmin.LogCall(aPhoneCall)
'or
PhoneCallAdmin.LogCall aPhoneCall
'not sure if your need this
Public Sub LogCall( myPhoneCall as AXCLogger.PhoneCall )
try
Public Sub LogCall( myPhoneCall as PhoneCall )
-
May 17th, 2004, 08:37 AM
#3
Thread Starter
New Member
Thanks Dead Eyes. It seems obvoius now I now the answer.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|