Search found 110 matches: getinstance

Return to advanced search

Re: Propuesta para que hagan un curso virtual FW

... sola instancia. Esto es útil cuando solo necesitas un único objeto para gestionar un recurso global. CLASS Singleton CLASSDATA oInstance METHOD getInstance() ENDCLASS METHOD getInstance() CLASS Singleton IF ::oInstance == NIL ::oInstance := Singleton():New() ENDIF RETURN ::oInstance Este ejemplo ...
by xmanuel
Tue Sep 10, 2024 8:37 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Propuesta para que hagan un curso virtual FW
Replies: 302
Views: 35498

Re: Traer al frente - primer plano

...   quitendif  Si, yo también uso esta manera. Pero incluso evito que modifiquen el fichero .EXE así: If IsExeRunning(cFileName(GetModuleFileName(GetInstance()))) // cFileName(HB_ARGV(0)) ... Muchas gracias,
by FiveWiDi
Sat Aug 10, 2024 4:47 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Traer al frente - primer plano
Replies: 7
Views: 1432

Re: ayuda para configurar entorno FWH2404 de 64 bits

no salia con los archivos cambiando de .a a .lib Proyecto: formatos, Entorno: fwh2404.64bcc77: [1]:harbour.Exe Source\menu.prg /m /n0 /gc1 /es2 /a /iE:\Tools64\Bcc7.7\include;E:\Tools64\Fwh2404\include;E:\Tools64\xharbour_bcc77\include /iE:\Tools64\xharbour_bcc77\Include /iE:\Tools64\Fwh2404\include...
by CARLOS ATUNCAR
Sat Jun 08, 2024 5:43 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: ayuda para configurar entorno FWH2404 de 64 bits
Replies: 24
Views: 2048

Re: RC to PRG generator

... and generate the code for it: simply rename your RC file as rctoprg.rc and build rctoprg.prg If you keep your dialogs inside a DLL then replace GetInstance() for LoadLibrary( "yourdll.dll" ) This example and the new C code listed at the bottom will be included in next FWH build. rctoprg.prg ...
by Antonio Linares
Tue Feb 13, 2024 11:20 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: RC to PRG generator
Replies: 23
Views: 2701

Re: how to get "Name" of App ?

hi,

thx for Answer

the Link point to
How to keep a appl. on top of the dlg on resize ? (solved)


---

i got 2 Solution
1.) GetModuleFileName( GetInstance() )
2.) GetAppName()
where 2nd point to 1St
by Jimmy
Sat Apr 15, 2023 9:13 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: how to get "Name" of App ?
Replies: 9
Views: 606

New Version of FiveWin 20.02

All, I just purchased a renew and received my copy of FiveWin 20.02 for Harbour. I am using Borland C++ 7.0. I tried using my mak file and got errors, I modified it based on build.bat and got errors. I replaced it with build.bat and got the following: Borland Resource Compiler Version 5.40 Copyright...
by byron.hopp
Thu Mar 31, 2022 8:18 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: New Version of FiveWin 20.02
Replies: 3
Views: 424

Re: ActiveX - CREATEOBJECT and singleton pattern

... is tricky and rarely necessary. From this I concluded that the classic way of using singleton technology, cannot be achieved by a direct call to GetInstance. The idea is to add a method, which I will call, internally raising the singleton instance. I made a test program with c #: class1.cs using ...
by metro2
Mon Nov 15, 2021 1:24 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

Re: ActiveX - CREATEOBJECT and singleton pattern

> oPOS := CREATEOBJECT("BluetoothConnector.GetInstance('TestConnectionDLL()' ) or something ?

o2 should be the oPOS you were looking for
by Antonio Linares
Wed Sep 29, 2021 12:20 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

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 11:17 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

Re: ActiveX - CREATEOBJECT and singleton pattern

Please try this:

local o1 := CreateObject( "PaymentService.BluetoothConnector" )
local o2 := TOleAuto():New( o1:Invoke( "GetInstance" ) )
by Antonio Linares
Wed Sep 29, 2021 11:03 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

Re: ActiveX - CREATEOBJECT and singleton pattern

... := CREATEOBJECT("PaymentService.BluetoothConnector") // ok MsgInfo( ValType( o1 ) ) // -> "O" local22 := o1:Invoke( "GetInstance" ) MsgInfo( ValType( local22 ) ) // N MsgInfo( str( local22 ) ) // 244252684 o2 := o1:GetInstance() // error MsgInfo( ValType( o2 ) ...
by metro2
Wed Sep 29, 2021 10:27 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

Re: ActiveX - CREATEOBJECT and singleton pattern

... o1 := CREATEOBJECT("PaymentService.BluetoothConnector") // ok MsgInfo( ValType( o1 ) ) // -> "O" o2 := o1:GetInstance() // error MsgInfo( ValType( o2 ) ) //////////////////////////////////////////// error.log Application =========== Path and name: G:\FWH_PRG\MetroTRG\metrotrg.exe ...
by metro2
Wed Sep 29, 2021 10:21 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

Re: ActiveX - CREATEOBJECT and singleton pattern

Also please try:

local o2 := o1:Invoke( "GetInstance" )
by Antonio Linares
Wed Sep 29, 2021 9:40 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

Re: ActiveX - CREATEOBJECT and singleton pattern

Please try this:

local o1 := CreateObject( "PaymentService.BuetoothConnector" )
local o2 := o1:GetInstance()

MsgInfo( ValType( o1 ) )
MsgInfo( ValType( o2 ) )
by Antonio Linares
Wed Sep 29, 2021 9:35 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176

ActiveX - CREATEOBJECT and singleton pattern

... they use a singleton pattern to manage and control instances of Bluetooth connections and suggest that I use the factory method BluetoothConnector.GetInstance (string serviceGuid) [ Mail ] Greeting, I am sending a reworked dll, it should work now. The problem was probably that COM registration ...
by metro2
Tue Sep 28, 2021 9:50 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: ActiveX - CREATEOBJECT and singleton pattern
Replies: 21
Views: 2176
Next

Return to advanced search