win32ole.prg and Optional parameters
Publicado: Mié Dic 06, 2006 9:19 am
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)Â
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)Â