Dear developers!
I found that if I call any OLE object method, which have optional
parameters,
the program fails with GPF in the folowing cases:
oListview:ListItems:Add() - works OK, all parameters are omitted
oListview:ListItems:Add(1,'',cText) - works OK, last parameters are
omitted
oListview:ListItems:Add(,,cText) - fails with GPF, first parameters are
omitted
I fixed Win32Ole.prg and added special function EmplyOleParam() to support
passing empty parameters
in such cases (like EmptyParam constant in Delphi):
oListview:ListItems:Add(EmptyOleParam(),EmptyOleParam(),cTex t) - works OK,
first parameters are omitted
I attached my sample project with fixed Win32Ole.prg. My fixes are marked
with "// added by OM".
Maybe you will review it and if it is correct, patch Win32Ole.prg in
xHarbour CVS.
Regards, Oleg
Attached files test10.zip (23.2 KB)Â
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
win32ole.prg and Optional parameters
win32ole.prg and Optional parameters
Oleg,
> I found that if I call any OLE object method, which have optional
> parameters,
> the program fails with GPF in the folowing cases:
>
> oListview:ListItems:Add() - works OK, all parameters are omitted
> oListview:ListItems:Add(1,'',cText) - works OK, last parameters are
> omitted
> oListview:ListItems:Add(,,cText) - fails with GPF, first parameters are
> omitted
>
> I fixed Win32Ole.prg and added special function EmplyOleParam() to support
> passing empty parameters
> in such cases (like EmptyParam constant in Delphi):
> oListview:ListItems:Add(EmptyOleParam(),EmptyOleParam(),cTex t) - works
> OK,
> first parameters are omitted
>
> I attached my sample project with fixed Win32Ole.prg. My fixes are marked
> with "// added by OM".
> Maybe you will review it and if it is correct, patch Win32Ole.prg in
> xHarbour CVS.
Thank you very much. We apreciate your help.
However, I'm not sure about your fix; I need to study it in deepth.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
> I found that if I call any OLE object method, which have optional
> parameters,
> the program fails with GPF in the folowing cases:
>
> oListview:ListItems:Add() - works OK, all parameters are omitted
> oListview:ListItems:Add(1,'',cText) - works OK, last parameters are
> omitted
> oListview:ListItems:Add(,,cText) - fails with GPF, first parameters are
> omitted
>
> I fixed Win32Ole.prg and added special function EmplyOleParam() to support
> passing empty parameters
> in such cases (like EmptyParam constant in Delphi):
> oListview:ListItems:Add(EmptyOleParam(),EmptyOleParam(),cTex t) - works
> OK,
> first parameters are omitted
>
> I attached my sample project with fixed Win32Ole.prg. My fixes are marked
> with "// added by OM".
> Maybe you will review it and if it is correct, patch Win32Ole.prg in
> xHarbour CVS.
Thank you very much. We apreciate your help.
However, I'm not sure about your fix; I need to study it in deepth.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
win32ole.prg and Optional parameters
Oleg,
> I found that if I call any OLE object method, which have optional
> parameters,
> the program fails with GPF in the folowing cases:
>
> oListview:ListItems:Add() - works OK, all parameters are omitted
> oListview:ListItems:Add(1,'',cText) - works OK, last parameters are
> omitted
> oListview:ListItems:Add(,,cText) - fails with GPF, first parameters are
> omitted
>
> I fixed Win32Ole.prg and added special function EmplyOleParam() to support
> passing empty parameters
> in such cases (like EmptyParam constant in Delphi):
> oListview:ListItems:Add(EmptyOleParam(),EmptyOleParam(),cTex t) - works
> OK,
> first parameters are omitted
>
> I attached my sample project with fixed Win32Ole.prg. My fixes are marked
> with "// added by OM".
> Maybe you will review it and if it is correct, patch Win32Ole.prg in
> xHarbour CVS.
Thank you very much. We apreciate your help.
However, I'm not sure about your fix; I need to study it in deepth.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
> I found that if I call any OLE object method, which have optional
> parameters,
> the program fails with GPF in the folowing cases:
>
> oListview:ListItems:Add() - works OK, all parameters are omitted
> oListview:ListItems:Add(1,'',cText) - works OK, last parameters are
> omitted
> oListview:ListItems:Add(,,cText) - fails with GPF, first parameters are
> omitted
>
> I fixed Win32Ole.prg and added special function EmplyOleParam() to support
> passing empty parameters
> in such cases (like EmptyParam constant in Delphi):
> oListview:ListItems:Add(EmptyOleParam(),EmptyOleParam(),cTex t) - works
> OK,
> first parameters are omitted
>
> I attached my sample project with fixed Win32Ole.prg. My fixes are marked
> with "// added by OM".
> Maybe you will review it and if it is correct, patch Win32Ole.prg in
> xHarbour CVS.
Thank you very much. We apreciate your help.
However, I'm not sure about your fix; I need to study it in deepth.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
win32ole.prg and Optional parameters
Jose,
> However, I'm not sure about your fix; I need to study it in deepth.
Ok. You may provide your own fix. I just want you or some
other xHarbour developer to confirm and fix this problem with optional
parameters by some way.
Regards, Oleg.
> However, I'm not sure about your fix; I need to study it in deepth.
Ok. You may provide your own fix. I just want you or some
other xHarbour developer to confirm and fix this problem with optional
parameters by some way.
Regards, Oleg.
win32ole.prg and Optional parameters
Jose,
> However, I'm not sure about your fix; I need to study it in deepth.
Ok. You may provide your own fix. I just want you or some
other xHarbour developer to confirm and fix this problem with optional
parameters by some way.
Regards, Oleg.
> However, I'm not sure about your fix; I need to study it in deepth.
Ok. You may provide your own fix. I just want you or some
other xHarbour developer to confirm and fix this problem with optional
parameters by some way.
Regards, Oleg.