VB COM OBJECT (convert over to) --> ATL VC++ COM OBJECT 
Author Message
 VB COM OBJECT (convert over to) --> ATL VC++ COM OBJECT

To Whom It May Concern:

My name is Scott, and I have a question

Let's say you create reference a COM object created in VB from an ASP
page.  This is how you would reference it:

dim oCOM
set oCOM = server.createobject("Car.Customer")
oCOM.GetCustHistory(request.querystring("CustAcctNo"))
for x = 1 to oCOM.Count
    response.write oCOM.CustNum(x).HistoryRepairs
next

' where
'Public Property Get CustNum(vntIndexKey As Variant) As HistoryRepairs
'    Set CustNum = mCol(vntIndexKey)
'End Property in the VB COM object
'History Repairs is a seperate public Class Module inside the Car.vbp
and Customer is the 'base class of this VBP COM project.  Count is a
property set on an ADO.RecordCount 'based on the DB that it is getting
it's information from.  GetCustHistory is a class method that 'gets Cust
History for EVERY Customer...and hence HistoryRepairs for EVERY
'CUSTOMER is retrieved from the FOR Loop.

QUESTION:  HOW WOULD COULD I CREATE THIS VB COM OBJECT THE SAME CODE
USING THE ATL COM OBJECT APP WIZARD IN Visual C++??
The furthest I got was creating a Get Property using the ATL VC++
Wizard...but I don't know how to call a class so that when i call this
object from a VB App or an ASP, I know that i can also do a
"oCOM.Item(x).HistoryRepairs" in ATL VC++ too.

Sincerely Yours,

Help In Despair



Mon, 27 Oct 2003 03:16:08 GMT  
 VB COM OBJECT (convert over to) --> ATL VC++ COM OBJECT
To Whom It May Concern:

My name is Scott, and I have a question

Let's say you create reference a COM object created in VB from an ASP
page.  This is how you would reference it:

dim oCOM
set oCOM = server.createobject("Car.Customer")
oCOM.GetCustHistory(request.querystring("CustAcctNo"))
for x = 1 to oCOM.Count
    response.write oCOM.CustNum(x).HistoryRepairs
next

' where
'Public Property Get CustNum(vntIndexKey As Variant) As HistoryRepairs
'    Set CustNum = mCol(vntIndexKey)
'End Property in the VB COM object
'History Repairs is a seperate public Class Module inside the Car.vbp
and Customer is the 'base class of this VBP COM project.  Count is a
property set on an ADO.RecordCount 'based on the DB that it is getting
it's information from.  GetCustHistory is a class method that 'gets Cust
History for EVERY Customer...and hence HistoryRepairs for EVERY
'CUSTOMER is retrieved from the FOR Loop.

QUESTION:  HOW WOULD COULD I CREATE THIS VB COM OBJECT THE SAME CODE
USING THE ATL COM OBJECT APP WIZARD IN VISUAL C++??
The furthest I got was creating a Get Property using the ATL VC++
Wizard...but I don't know how to call a class so that when i call this
object from a VB App or an ASP, I know that i can also do a
"oCOM.Item(x).HistoryRepairs" in ATL VC++ too.

Sincerely Yours,

Help In Despair



Mon, 27 Oct 2003 03:17:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with scripting context when using VB com object inside VC com object

2. passing COM object pointers to another COM object in ATL

3. Convert variant to object (VB-COM used in VC)

4. ATL COM object can't get arrays from VB in VB/VC6

5. ATL COM object can't get arrays from VB in VB/VC6

6. Return a pointer to a nested COM object from a COM object method

7. Invoking COM object from COM object

8. COM Object returning COM Object Reference

9. passing objects from VB as VARIANT to COM server object failing

10. COM object in a COM object

11. Passing COM objects as parameters to other COM objects

12. C++ COM-Object with COM-Object as parameter

 

 
Powered by phpBB® Forum Software