Re: IA
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Apr 08, 2022 10:54 am
by Antonio Linares
Dear Jimmy,
I think CreateBinary() could be implemented like this:
HB_FUNC( CREATEBINARY )
{
hb_retclen( hb_parc( 1 ), hb_parclen( 1 ) );
}
or maybe we simply don't need it as Harbour strings can contain embedded zeroes
Re: IA
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Apr 08, 2022 11:06 am
by Antonio Linares
I may be wrong as according to these docs:
http://www.yaldex.com/fox_pro_tutorial/html/cad2893d-9c63-4899-83d8-e5d58f79a414.htmVisual FoxPro automatically converts binary data passed from an ActiveX control or automation object as an array of VT_UI1 type data to a Visual FoxPro character string. Visual FoxPro internally marks this character string as binary data passed from an ActiveX control or automation object. When the character string is passed back to an ActiveX control or automation object, Visual FoxPro automatically converts the character string to an array of VT_UI1 type data the ActiveX control or automation object expects.
We have examples of managing VT_UI1 type data in harbour/contrib/hbwin/olecore.c
look for VT_UI1 inside
Re: IA
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Sun Apr 10, 2022 8:01 am
by Antonio Linares
Maybe this:
#include "hbole.ch"
lsink = CreateBinary( hb_MemoRead( "test.isf" ) )
...
function CreateBinary( cBinary )
return __oleVariantNew( WIN_VT_UI1, cBinary )
Re: IA
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Apr 11, 2022 5:54 am
by Jimmy
hi Antonio,
thx for Tip.
it seems that i need to "save" in IPF_Base64GIF instead of IPF_GIF
it will NOT produce a valid "GIF89a" so i can´t "display" it
but i can "load" it into INK simple with
- Code: Select all Expand view
lsInk := hb_MemoRead( cFile )
oInkOvl:Enabled := 0
oInkOvl:ink:Load( lsInk )
oInkOvl:Enabled := 1
// draw it
oInkOvl:Draw( oInkrectangle )
it now "display" in "INK" and i can press "recognize"
![Smile :)](./images/smilies/icon_smile.gif)
Source ( HMG Syntax) can be found here
http://www.hmgforum.com/viewtopic.php?f=5&t=7219&p=68501![Image](http://www.hmgforum.com/download/file.php?id=11232)