Link to home
Start Free TrialLog in
Avatar of indikad
indikad

asked on

class factory cannot supply requested class - VB6

I use a dll ( assume it is a c++ ) within my VB6 program.

I can use the class when I do early binding. But if I do late bind,

I get this error on the following line.

Set oOutPymnt = CreateObject("SAPbobsCOM.Payments")

"class factory cannot supply requested class"

I will be able to give more infor if needed.

Thanks in advance.

Indikad.
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of indikad
indikad

ASKER

I worked it out. But your comment made me think that I could be actually doing something wrong. points given. for your interest here is the code.

'early bind

Dim oOutPymnt As SAPbobsCOM.Payments
Set oOutPymnt = gObjCompany.GetBusinessObject(oVendorPayments)

'late bind
Dim oOutPymnt As Object
'---oVendorPayments = 46
Set oOutPymnt = gObjCompany.GetBusinessObject(46)

I do not know how to technically explain why but,
what I should not have is this following line.
Set oOutPymnt = CreateObject("SAPbobsCOM.Payments")

any ideas?

thanks,

as I said, I have awarded points.



that's mean you need to get object from them and cannot create object

which imples that their object is not public createable
Avatar of indikad

ASKER

thanks.