Search found 12 matches

by metro2
Mon Nov 15, 2021 1:24 pm
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

hi,

Antonio thanks for taking care of my problem ....

Yes, i tried this too, but it reports an error
o2:Invoke( "TestConnectionDll", "" )

Just today I intended to send a description of what was happening in the meantime.

On the forum https://stackoverflow.com/questions/6252334/singleton ...
by metro2
Mon Nov 15, 2021 6:32 am
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

Greeting,
I was away for a while.

If an o2 instance is called from BluetoothConnector,

How to call the TestConnectionDll method eg:

ret: = o2: TestConnectionDll ("") // -> error
ret: = o2: BluetoothConnector: TestConnectionDll ("") // -> error

In other words, no matter how I try to call the ...
by metro2
Wed Sep 29, 2021 1:26 pm
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

Ok, i'll try to call TestConnectionDLL with an argument ...

I will report the result ...
by metro2
Wed Sep 29, 2021 11:17 am
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

////////////////////////////////////////////
o1 := CreateObject( "PaymentService.BluetoothConnector" )
o2 := TOleAuto():New( o1:Invoke( "GetInstance" ) )

MsgInfo( ValType( o1 ) ) // -> "O"

MsgInfo( ValType( o2 ) ) // -> "O"


////////////////////////////////////////////
by metro2
Wed Sep 29, 2021 10:27 am
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

////////////////////////////////////////////
o1 := CREATEOBJECT("PaymentService.BluetoothConnector") // ok
MsgInfo( ValType( o1 ) ) // -> "O"

local22 := o1:Invoke( "GetInstance" )

MsgInfo( ValType( local22 ) ) // N

MsgInfo( str( local22 ) ) // 244252684

o2 := o1:GetInstance ...
by metro2
Wed Sep 29, 2021 10:21 am
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

prg:
////////////////////////////////////////////
o1 := CREATEOBJECT("PaymentService.BluetoothConnector") // ok
MsgInfo( ValType( o1 ) ) // -> "O"

o2 := o1:GetInstance() // error

MsgInfo( ValType( o2 ) )
////////////////////////////////////////////

error.log
Application
===========
Path ...
by metro2
Wed Sep 29, 2021 8:24 am
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

Yes, invoke is the last entry in the list

Image
by metro2
Tue Sep 28, 2021 12:40 pm
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

Re: ActiveX - CREATEOBJECT and singleton pattern

Thank you for the quick response

I hope that's what you were looking for

Image


Registry
Image
by metro2
Tue Sep 28, 2021 9:50 am
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2459

ActiveX - CREATEOBJECT and singleton pattern

I need to connect the POS device TPS900 to a POS application that is done with FWH / xHarbour. The TPS900 vendor has created a software interface as a COM component with functions to communicate with the TPS900 (C #).
So far, I have used the CREATEOBJECT function very successfully for account ...