OLE with byref sample (SOLVED)
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
OLE with byref sample (SOLVED)
Hi friends,
Anybody know if there are example of default XP OLE components that works by reference ?
Something like:
---cut---
local a1, a2
oOle = CreateOle()
oOle:Test( @a1, @a2 )
---cut---
The sample is needed to fix a bug in Harbour OLE.
Thanks and Best Regards,
Toninho.
Anybody know if there are example of default XP OLE components that works by reference ?
Something like:
---cut---
local a1, a2
oOle = CreateOle()
oOle:Test( @a1, @a2 )
---cut---
The sample is needed to fix a bug in Harbour OLE.
Thanks and Best Regards,
Toninho.
Last edited by toninhofwi on Thu Aug 13, 2009 11:51 am, edited 1 time in total.
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: OLE with byref sample
Antonio, do you have a sample please?
Viktor is asking me...
Regards,
Toninho.
Viktor is asking me...
Regards,
Toninho.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: OLE with byref sample
Toninho,
There are lots of examples for ole auto in these forums if you make a search for CreateObject.
But right now I can not remember any example that uses a parameter by reference
There are lots of examples for ole auto in these forums if you make a search for CreateObject.
But right now I can not remember any example that uses a parameter by reference
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: OLE with byref sample
I´ve same problem...
how solve it ?
we can change source of xharbour ?
how solve it ?
we can change source of xharbour ?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: OLE with byref sample
It has to be reported to the Harbour and xHarbour developers list (both).
Usually a test example (without using FWH) is required in order to check the problem and solve it.
Usually a test example (without using FWH) is required in order to check the problem and solve it.
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: OLE with byref sample
Antonio tu poderia usar meu exemplo como referencia a este problema,
yo no consegui passar p/ CreateObjecto pero tu pode hacer isto abaixo segue lo exemplo:
yo no consegui passar p/ CreateObjecto pero tu pode hacer isto abaixo segue lo exemplo:
Code: Select all
#include "fivewin.ch"
function main()
public oWnd,oCommandbar,oToolA
public Left:=Top:=Right:=Bottom:=0
define window ownd
oCommandBar:= TOleWevent():New("Codejock.CommandBars.13.0.0",Ownd)
oCommandBar:AttachToWindow( oWnd:hWnd )
cToolA:=oCommandBar:Add("ToolBar", 0)
cToolA:GetWindowRect( @Left, @Top, @Right, @Bottom ) // GPF
// Gpf yet here
MsgInfo(Left)
MsgInfo(Top)
MsgInfo(Right)
MsgInfo(Bottom)
activate window ownd
return
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: OLE with byref sample
Lailton,
You have to post an example to the Harbour and xHarbour developer list that does not use FWH and does not use a commercial ActiveX. You must use a Windows own ActiveX so other developers can test it.
No FWH, no CodeJock, got it ?
You have to post an example to the Harbour and xHarbour developer list that does not use FWH and does not use a commercial ActiveX. You must use a Windows own ActiveX so other developers can test it.
No FWH, no CodeJock, got it ?
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: OLE with byref sample
Toninho,
that activeX you to be using ? can send to antonio ?
Antonio,
if Toninho don´t have it, so think that us need create something in VB
to send for they
I will try create it in Visual Basic a ocx.
Thanks
that activeX you to be using ? can send to antonio ?
Antonio,
if Toninho don´t have it, so think that us need create something in VB
to send for they
I will try create it in Visual Basic a ocx.
Thanks
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: OLE with byref sample
Hi Antonio,
I posted this message in harbour dev list, but Viktor can't fix it because my sample need register a DLL...
Please download this: http://www.fwi.com.br/nfe.zip.
You need dotnetfx.exe 2.0 or above installed, and you need register dll, because is OLE. There
are a registraDLL.bat file in that package.
to test:
--cut---
local oOle, nRet := 0, QtdErros := 0, Mensagem := ""
oOle = Win_OleCreateObject( "NFe_Util_PL005a.Util" )
oOle:ValidaXMLXHarbour( "", 1, @Mensagem, @QtdErros, @nRet )
? Mensagem, QtdErros, nRet
---cut---
The result NEED be:
---cut---
Erro: Arquivo de Schema Inexistente
0
3
---cut---
Best regards,
Toninho.
I posted this message in harbour dev list, but Viktor can't fix it because my sample need register a DLL...
Please download this: http://www.fwi.com.br/nfe.zip.
You need dotnetfx.exe 2.0 or above installed, and you need register dll, because is OLE. There
are a registraDLL.bat file in that package.
to test:
--cut---
local oOle, nRet := 0, QtdErros := 0, Mensagem := ""
oOle = Win_OleCreateObject( "NFe_Util_PL005a.Util" )
oOle:ValidaXMLXHarbour( "", 1, @Mensagem, @QtdErros, @nRet )
? Mensagem, QtdErros, nRet
---cut---
The result NEED be:
---cut---
Erro: Arquivo de Schema Inexistente
0
3
---cut---
Best regards,
Toninho.
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: OLE with byref sample (SOLVED)
2009-08-12 18:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbwin/olecore.c
! fixed memory leak in PutParams()
! fixed parameters order in PutParams()
! fixed possible GPF due calling VariantClear() without VariantInit()
for C stack VARIANT item.
! fixed reverted #if condition - VT_I8 was not supported
+ implemented passing parameters by reference
Not tested at all - I do not have Windows and I'm not familiar
with OLE code/servers. I hope that Windows users can test it
and it Windows developers can update this code if necessary.
Regards,
Toninho.
* harbour/contrib/hbwin/olecore.c
! fixed memory leak in PutParams()
! fixed parameters order in PutParams()
! fixed possible GPF due calling VariantClear() without VariantInit()
for C stack VARIANT item.
! fixed reverted #if condition - VT_I8 was not supported
+ implemented passing parameters by reference
Not tested at all - I do not have Windows and I'm not familiar
with OLE code/servers. I hope that Windows users can test it
and it Windows developers can update this code if necessary.
Regards,
Toninho.
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: OLE with byref sample (SOLVED)
What i need change to use in xharbour ?
you can provide a sample toninho with it solved ?
thanks
you can provide a sample toninho with it solved ?
thanks
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: OLE with byref sample (SOLVED)
Hi Lailton.
I´m currently using Harbour, but xharbour works with OLE by reference too.
Do you have latest FWH ? There are a way to you test with Harbour to compare results ?
Regards,
Toninho.
I´m currently using Harbour, but xharbour works with OLE by reference too.
Do you have latest FWH ? There are a way to you test with Harbour to compare results ?
Regards,
Toninho.
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: OLE with byref sample (SOLVED)
Hi Toninho,
I have fivewin 902
i have this problem and i dont know how solve it.
thanks
I have fivewin 902
i have this problem and i dont know how solve it.
thanks
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: OLE with byref sample (SOLVED)
Lailton, please do a test with Harbour.
The problem that I posted here is for pure OLE, without ActiveX, but Harbour ActiveX as implemented in the same way, so maybe it can work for you.
Sorry, but I can´t test it in XHarbour for while.
Regards,
Toninho.
The problem that I posted here is for pure OLE, without ActiveX, but Harbour ActiveX as implemented in the same way, so maybe it can work for you.
Sorry, but I can´t test it in XHarbour for while.
Regards,
Toninho.
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: OLE with byref sample (SOLVED)
No Problem TOninho thanks
I have too this problem, but i´m using Activex too, when i send for ref
give-me erro. i no use harbour.
but thanks. i think that a day it will go solved =]
I have too this problem, but i´m using Activex too, when i send for ref
give-me erro. i no use harbour.
but thanks. i think that a day it will go solved =]