topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
lightweight navigation | Best regards,
Otto
Video
[url:dilseepa]http://www.atzwanger-software.com/fw/xbrowNavi/xbrowNavi.html[/url:dilseepa]
[img:dilseepa]http://www.atzwanger-software.com/fw/xbrowsnavi.jpg[/img:dilseepa] |
lightweight navigation | Good Mr Otto
can we have a small sample to try it ?
I have a win8 english |
like a rolling stone | Does someone like this song.
Here is a great Austrian cover of the song.
[url:2a08vdaj]https://www.youtube.com/watch?v=d08XVPZvRsA[/url:2a08vdaj]
Best regards,
Otto |
like a rolling stone | <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
like a rolling stone | <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
limiting the numbers of instance of Winword | I was just wondering is there a way, maybe in the Registry, to limit open instances of programs such as WinWord or Excel
I have at school computer with small memory and the boys founded the mode to block any pc opening many instances of winword
I want to be able to limit the amount of instances of each program they are allowed to open.
Thanks in advance for any help! |
limiting the numbers of instance of Winword | It could serve?
[code=fw:1f1p5eyw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aTasks = GetTasks<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:1f1p5eyw] |
limiting the numbers of instance of Winword | Yes Silvio
[quote:25w4bxvk]
c:\fwh\source\function\gettasks.prg
[/quote:25w4bxvk]
But do not think you need to serve |
limiting the numbers of instance of Winword | not in fwh |
limpiar buffer del teclado | compañeros:
para limpiar el buffer del teclado, tenemos en FWH algo parecido a "Clear Typeahead" de Clipper??
estuve buscando en \Samples\ pero no vi nada al respecto.
Mil gracias
LORENZO |
line (row) spacing in say/get system using text coordinates | Hello all,
i am new to fivewin/xharbour but programming in clipper for mopre than 20 years and now, for last few days, I am learning how to enter
in windows programming world.
As a beginner i have a lot of questions but try to find answers in documentation and samples. But for this one I cant find any answer.
Is there a way to set line (row) spacing in say/get system when coordinates is given in text mode.
Example:
@ 1,0 say "Row one"
@ 2,0 say "Row two"
Which is line spacing between row 1 and row 2, and/if is it possible to change that line spacing for selected window or dialog.
Thank you in advance,
Ivo |
line (row) spacing in say/get system using text coordinates | Hello Ipunis :
Some small changes needed of :
// @ 1,0 say "Row one"
// @ 2,0 say "Row two"
...
...
[color=#FF0000:chb3d2ph]Local oSay1, oSay2[/color:chb3d2ph]
// Optional using Vars :
Local [color=#4000FF:chb3d2ph]cVar1 := "Row one"[/color:chb3d2ph]
Local [color=#4000FF:chb3d2ph]cVar2 := "Row two"[/color:chb3d2ph]
@ 1,0 say [color=#FF0000:chb3d2ph]oSay1 PROMPT [/color:chb3d2ph]"Row one"
@ 2,0 say [color=#FF0000:chb3d2ph]oSay2 PROMPT [/color:chb3d2ph]"Row two"
or using Vars :
@ 1,0 say [color=#4000FF:chb3d2ph]oSay1 VAR cVar1 [/color:chb3d2ph]
@ 2,0 say [color=#4000FF:chb3d2ph]oSay2 VAR cVar2 [/color:chb3d2ph]
// Pixel optional
// -----------------
@ 15,10 say [color=#FF0000:chb3d2ph]oSay1 PROMPT [/color:chb3d2ph]"Row one" PIXEL // use Pixel optional
@ 30,10 say [color=#FF0000:chb3d2ph]oSay2 PROMPT [/color:chb3d2ph]"Row two" PIXEL
// a Button to change the given SAY-Positions
@ 140, 120 BTNBMP oBtn1 OF oDlg 2007 ;
SIZE 70 , 40 PROMPT "Move" ;
FONT oGetFont ;
LEFT ;
NOBORDER ;
FILENAME "Move.bmp" ;
ACTION ( [color=#FF0000:chb3d2ph]oSay1:nTop := 3.5, oSay1:nLeft := 10.5, oSay1:Refresh(), ;
oSay2:nTop := 4.5, oSay2:nLeft := 10.5, oSay2:Refresh()[/color:chb3d2ph] ) // Set to new Position
oBtn1:lTransparent := .T.
oBtn1:cTooltip := " Move "
oBtn1:lBorder := .F.
or change the Position on Dialog-Init
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( [color=#FF0000:chb3d2ph]oSay1:nTop := 3.5, oSay1:nLeft := 10.5, oSay1:Refresh(), ;
oSay2:nTop := 4.5, oSay2:nLeft := 10.5, oSay2:Refresh()[/color:chb3d2ph] )
define different Spaces, the way You want to do it from a Start-position
with a defined Font :
[img:chb3d2ph]http://www.pflegeplus.com/pictures/txtspace1.jpg[/img:chb3d2ph]
[code=fw:chb3d2ph]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oDlg, hDC<br /><span style="color: #B900B9;">// here I am able to change line space for SAY section that follow</span><br /><span style="color: #B900B9;">// 12 means that 12 PIXELS will be row spacing and I am going to multiply fun_lspac</span><br /><span style="color: #B900B9;">// with row number for every single row I want to use with SAY/GET system</span><br /><span style="color: #00C800;">LOCAL</span> oSayFont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Arial"</span>, ,<span style="color: #000000;">-12</span>,.F.,.T. , , , ,.T. <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// - 11 because the Font-height is defined in POINT</span><br /><span style="color: #00C800;">LOCAL</span> nstart1 := <span style="color: #000000;">0.1</span>, nspace1 := oSayFont:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">11</span> <br /><br /><span style="color: #B900B9;">// Pixel and Font-Height ( POINT ) are not the same, </span><br />You must find out the Space You need.<br /><span style="color: #00C800;">LOCAL</span> nstart2 := <span style="color: #000000;">100</span>, nspace2 := oSayFont:<span style="color: #000000;">nHeight</span> + <span style="color: #000000;">5</span> <br /><br />SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> TRANSPARENT ;<br /><span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialog"</span> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> WS_VISIBLE, WS_OVERLAPPEDWINDOW, WS_VSCROLL, WS_HSCROLL <span style="color: #000000;">)</span><br /><br />@ nstart1 + <span style="color: #000000;">1</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row one"</span> <br />@ nstart1 + <span style="color: #000000;">2</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row two"</span> <br />@ nstart1 + <span style="color: #000000;">3</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row three"</span> <br />@ nstart1 + <span style="color: #000000;">4</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row four"</span> <br />@ nstart1 + <span style="color: #000000;">5</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row five"</span> <br /><br /><br />@ nstart2 + <span style="color: #000000;">1</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"USING PIXEL"</span> <span style="color: #0000ff;">PIXEL</span><br />@ nstart2 + <span style="color: #000000;">2</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program ID"</span> <span style="color: #0000ff;">PIXEL</span><br />@ nstart2 + <span style="color: #000000;">3</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program name"</span> <span style="color: #0000ff;">PIXEL</span> <br />@ nstart2 + <span style="color: #000000;">4</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Licence owner"</span> <span style="color: #0000ff;">PIXEL</span> <br />@ nstart2 + <span style="color: #000000;">5</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Current year"</span> <span style="color: #0000ff;">PIXEL</span> <br />@ nstart2 + <span style="color: #000000;">6</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Epoch (SET EPOCH)"</span> <span style="color: #0000ff;">PIXEL</span> <br />@ nstart2 + <span style="color: #000000;">7</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Lokal hard drive"</span> <span style="color: #0000ff;">PIXEL</span> <br />@ nstart2 + <span style="color: #000000;">8</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Network/database drive"</span> <span style="color: #0000ff;">PIXEL</span> <br /> <br /> @ <span style="color: #000000;">15</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&End"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> D_GRADIENT<span style="color: #000000;">(</span> hDC, oDlg <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// ----- GRADIENT Dialog --------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> D_GRADIENT<span style="color: #000000;">(</span> hDC, oDlg <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> aColors := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.1</span>, <span style="color: #000000;">15778421</span>, <span style="color: #000000;">16512957</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.1</span>, <span style="color: #000000;">16512957</span>, <span style="color: #000000;">15778421</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <br /><br />GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aColors, .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:chb3d2ph]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
line (row) spacing in say/get system using text coordinates | Thanks Uwe,
I try first two solution (using text coordinates) but space between two lines remine same.
What I am talking about is free space between lines. Of course, if I do the same using PIXEL coordinates
then I am able to get controll over everything but I am courious if there is a way to change default
line spacing between rows when using text coordinates because using them it's simplfy my life <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
There is ad hoc solution I,ve made:
[code=fw:29mhnrey]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> fun_lspac:= <span style="color: #000000;">12</span> <span style="color: #B900B9;">// here I am able to change line space for SAY section that follow</span><br /> <span style="color: #B900B9;">// 12 means that 12 PIXELS will be row spacing and I am going to multiply fun_lspac</span><br /> <span style="color: #B900B9;">// with row number for every single row I want to use with SAY/GET system</span><br /><br /> @ <span style="color: #000000;">01</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program ID "</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">02</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program name "</span> <span style="color: #0000ff;">PIXEL</span> <br /> @ <span style="color: #000000;">03</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Licence owner "</span> <span style="color: #0000ff;">PIXEL</span> <br /> @ <span style="color: #000000;">04</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Current year "</span> <span style="color: #0000ff;">PIXEL</span> <br /> @ <span style="color: #000000;">05</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Epoch (SET EPOCH) "</span> <span style="color: #0000ff;">PIXEL</span> <br /> @ <span style="color: #000000;">06</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Lokal hard drive "</span> <span style="color: #0000ff;">PIXEL</span> <br /> @ <span style="color: #000000;">07</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Network/database drive "</span> <span style="color: #0000ff;">PIXEL</span> <br /><br /> </div>[/code:29mhnrey]
Maybe now is more clear what was my question <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
line (row) spacing in say/get system using text coordinates | Hello Ivo,
Welcome to the forums <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
If you review the source code of Class TSay (FWH\source\classes\say.prg) you will see that we use some constants to set the "simulated" text spacing on Windows:
[code=fw:jrb5kj4z]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ::<span style="color: #000000;">nTop</span> = nRow * SAY_CHARPIX_H + <span style="color: #000000;">2</span> <br /> ::<span style="color: #000000;">nLeft</span> = nCol * SAY_CHARPIX_W <br /> </div>[/code:jrb5kj4z]
SAY_CHARPIX_H and SAY_CHARPIX_W are defined in FWH\include\constant.ch. So if you modify constant.ch and recompile say.prg and link it to your app as another OBJ then you can modify the spacing the way you may need it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
The same technique applies for other FWH controls <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
lineas 185-194 de tmetafil.prg para corregir el zoon | Por favor, active lineas 185-194 de tmetafil.prg para corregir el zoon en la vista previa de un archivo de texto. Vi a este problema, ya fwh13.09 hasta fwh13.12.
[code=fw:2hvar1uk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">// /* ( aqui )</span><br /> SetWindowExt<span style="color: #000000;">(</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nVRatio</span> == <span style="color: #00C800;">nil</span><br /> ::<span style="color: #000000;">SetCoors</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> SetViewportExt<span style="color: #000000;">(</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">100</span> * ::<span style="color: #000000;">nXZoom</span>, <span style="color: #000000;">100</span> * <span style="color: #000000;">(</span> ::<span style="color: #000000;">nYZoom</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> * ::<span style="color: #000000;">nVRatio</span> * ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> nHStep = <span style="color: #000000;">(</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> * <span style="color: #000000;">(</span> ::<span style="color: #000000;">nXZoom</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">9.8</span> <br /> nVStep = <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> * ::<span style="color: #000000;">nXZoom</span> * ::<span style="color: #000000;">nVRatio</span> <span style="color: #000000;">)</span> - ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">10.3</span><br /> SetViewOrg<span style="color: #000000;">(</span> ::<span style="color: #000000;">hDC</span>, -::<span style="color: #000000;">nXorig</span> * nHStep, -::<span style="color: #000000;">nYorig</span> * nVStep <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// */ ( aqui )</span><br /> </div>[/code:2hvar1uk]
Gracias, |
lineas 185-194 de tmetafil.prg para corregir el zoon | Oscar,
Gracias, aún estamos haciendo pruebas en esa sección de código. |
lineas 185-194 de tmetafil.prg para corregir el zoon | Gracias. |
lineas en tTxtEdit | ¿como puedo o que habría que modificar para pintar líneas en un tTxtEdit?Lo que quiero es poner una línea a la derecha, de preferencia una línea de lineas pequeñas, para indicar un margen, y dos líneas, de preferencia punteadas, arriba y abajo en el renglón donde está posicionado el cursor |
lineas en tTxtEdit | Quique,Tendrias que modificar el método DrawLine( nLine, nRow, nClrBack ) ó modificar el método Paint() para que llame a otro distinto de DrawLine() en determinadas circunstancias |
lineas en tTxtEdit | Gracias antonio, lo que preguntaba era la manera de pintar la línea, o sea, si fivewin trae alguna función para ello, la respuesta que me diste me ayudo, porque me hizo reaccionar y ver por donde buscar, ya encontré una manera de hacerlo, pero digamos que es artesanal ¿fivewin trae alguna para hacerlo mas simple? |
lineas en tTxtEdit | Quique,En ultima instancia lo que hace FiveWin is llamar a las funciones de pintado de texto del API de Windows.Si quieres implementar un editor de codigo fuente profesional, existen soluciones (DLLs) que puedes usar desde FiveWin como <!-- m --><a class="postlink" href="http://www.scintilla.org">http://www.scintilla.org</a><!-- m --> |
lineas en tTxtEdit | voy a echarle un ojo a esa dirección porque si, eso es lo que estoy haciendo, y va mas o menos bien 99.9% FWH/xHarbour, la única librería de terceros es la mia <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> si quieres ver como va quedando puedes bajarlo de [url:26vnmixs]ftp://ftp.quiquesoft.com/qsvisual.zip[/url:26vnmixs]Aprovechando otra pregunta, no se si valga la pena abrir otro tópico ¿para que sirve el hDC? ¿por que en tTxtEdit.prg lo creas y lo eliminas cada vez que pintas una línea y no creas mejor uno al principio y lo utilizas todo el tiempo? |
lines | How can I print horizontal and vertical lines in the tickness I want?
Please a simple solution if it exists, I am a non professional...
Thanks |
lines | small sample
[code=fw:w3j4zewl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">function</span> ViewInvoice<span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oPrn,oPen<br /><br /><span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"INVOICE"</span> PREVIEW <br /><span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH <span style="color: #000000;">11</span><br /> <span style="color: #0000ff;">PAGE</span><br /> oPrn:<span style="color: #000000;">CmBox</span><span style="color: #000000;">(</span> <span style="color: #000000;">23.40</span>, <span style="color: #000000;">2.20</span>, <span style="color: #000000;">27.20</span>, <span style="color: #000000;">20.15</span>, oPen <span style="color: #000000;">)</span><br /> oPrn:<span style="color: #000000;">CmLine</span><span style="color: #000000;">(</span> <span style="color: #000000;">24.00</span>, <span style="color: #000000;">2.20</span>, <span style="color: #000000;">24.00</span>, <span style="color: #000000;">20.15</span>, oPen <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /> oPen:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:w3j4zewl]
to better construct an invoice I suggest you to use a graph paper with measures in millimeters ad this
[img:w3j4zewl]https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/EKG-Reto_002.svg/1200px-EKG-Reto_002.svg.png[/img:w3j4zewl]
I suggest to you to create it on winword
[img:w3j4zewl]https://www.aranzulla.it/wp-content/contenuti/2017/04/xkrGF1mcbhEI51.jpg.pagespeed.ic.Zi22UTFdYX.jpg[/img:w3j4zewl]
and then draw on it
[img:w3j4zewl]https://www.wikihow.com/images_en/thumb/0/05/Draw-a-Floor-Plan-to-Scale-Step-2.jpg/v4-728px-Draw-a-Floor-Plan-to-Scale-Step-2.jpg.webp[/img:w3j4zewl] |
lines | Thanks to Silvio ! |
link and open a mysql datafile in remote | Can I open a db mysql from fwh ?
the db is on a server and I use it with worpress.
I need to open a table to print and order
Wich lib I must use for link to this db from fwh ?
Can have a test sample run to try ? |
link and open a mysql datafile in remote | <!-- m --><a class="postlink" href="http://tdolphin.blogspot.com.ar/">http://tdolphin.blogspot.com.ar/</a><!-- m -->
Al bajar los fuentes veras una buena cantidad de samples
Lowering the sources you will see a lot of samples |
link error while compile testscan.prg and tscan.prg | Dear All,
I try to recompile Testscan.pr tscan.prg. It's shown the error message as following either harbour and xharbour.
This is sample error message
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'TWAIN_Acquire' referenced from D:\FWH\TSCAN32\TSCAN.OBJ
Error: Unresolved external 'TWAIN_FreeNative' referenced from D:\FWH\TSCAN32\TSCAN.OBJ
Error: Unresolved external 'TWAIN_SelectImageSource' referenced from D:\FWH\TSCAN32\TSCAN.OBJ
.....
What does it mean?
Regards,
Dutch |
link error while compile testscan.prg and tscan.prg | Sawasdee , dutch.
i think your problem are BAT Compiler and linker or Files *.cfg are wrong..
Show mw BAT compiler file to help you ok
Mauricio (BRAZIL) |
link error while compile testscan.prg and tscan.prg | Dear mauricio,
This is my batch fil.
Thanks in advance,
Dutch
@ECHO OFF
CLS
ECHO ฺฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฟ
ECHO ณ FiveWin for Harbour 2.5 - October 2004 Harbour development power ณ
ECHO ณ (c) FiveTech, 1993-2004 for Microsoft Windows 95/98/NT/2000/ME and XP ณ
ECHO ภฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤฤู
ECHO  ฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿฿
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=d:\harbour
set bcdir=d:\bcc55
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c @b32.bc
:ENDCOMPILE
%hdir%\bin\harbour tscan /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
echo -O2 -etscan.exe -I%hdir%\include tscan.c > b32.bc
%bcdir%\bin\bcc32 -M -c @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r %1
echo c0w32.obj + > b32.bc
echo %1.obj tscan.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo ..\lib\FiveH.lib ..\lib\FiveHC.lib + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtwin.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbfdbt.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
echo %hdir%\lib\codepage.lib + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib, >> b32.bc
IF EXIST %1.res echo %1.res >> b32.bc
rem uncomment this line to use the debugger and comment the next one
rem %bcdir%\bin\ilink32 -Tpe -s @b32.bc
%bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
rem delete temporary files
@del %1.c
@del %1.il?
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
GOTO EXIT
ECHO
:LINKERROR
rem if exist meminfo.txt notepad meminfo.txt
rem PAUSE * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensiขn PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT |
link error while compile testscan.prg and tscan.prg | SAWASDEE , DUTCH
I think this , your Bat Compile haven´t External reference for Functions.
post your code, Because TWAIN_... Functions are DLL external.
If you need SCANNER FUNCTION Check TWAIN class.
mauricio.. |
link error while compile testscan.prg and tscan.prg | Dear Mauricio
This is TSCAN.PRG code.
Thanks in advance,
Dutch
// Example scanner, Class TSCAN32 and Wrappers for [x]Harbour
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
// the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this software; see the file COPYING. If not, write to
// the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
// Boston, MA 02111-1307 USA (or visit the web site
// <!-- m --><a class="postlink" href="http://www.gnu.org/">http://www.gnu.org/</a><!-- m -->).
// The exception is that, if you link the class Tscan32 and Wrappers C
// with other files to produce an executable, this does not by itself cause the
// resulting executable to be covered by the GNU General Public License.
// Your use of that executable is in no way restricted on account of
// linking the Tscan32 and Wrappers library code into it.
// 2003(c)- Rafa Carmona( Thefull )
//
// interface to Dosadi EZTWAIN library by TheFull
// Interface para la libreria EZTWAIN de Dosadi por TheFull
// 32 bits
// ATENTION. THIS LICENSE NOT APLICATTE A EZTWAIN.
// YOUR VIEW LICENSE EZTW32.DLL IN <!-- w --><a class="postlink" href="http://WWW.DOSADI.COM">WWW.DOSADI.COM</a><!-- w -->
#INCLUDE "HBCLASS.CH"
// Returns the TWAIN Protocol State per the spec.
#define TWAIN_PRESESSION 1 // source manager not loaded
#define TWAIN_SM_LOADED 2 // source manager loaded
#define TWAIN_SM_OPEN 3 // source manager open
#define TWAIN_SOURCE_OPEN 4 // source open but not enabled
#define TWAIN_SOURCE_ENABLED 5 // source enabled to acquire
#define TWAIN_TRANSFER_READY 6 // image ready to transfer
#define TWAIN_TRANSFERRING 7 // image in transit
***************************************************************************
*
* CLASS TSCAN32
* 2003(c)- by Rafa Carmona ( TheFull )
* Beta 1.0
* Beta 2.0 New. Support Get ClipBoard to hDib.
* New. ClipboardToFile( cFile ) -> Save File Jpg into Clipboard.
*
* Beta 3.0 New. ReWrite Method End, conflict GPF's <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
*
*
****************************************************************************
CLASS TSCAN32
DATA hWnd
DATA cFile
DATA hDib
DATA lError INIT .F.
DATA nState
METHOD New( cFile, hWnd ) CONSTRUCTOR
METHOD End()
METHOD Register()
MESSAGE FreeNative METHOD End()
MESSAGE Close METHOD End()
METHOD DigiToFile( cFile )
METHOD DibToJpeg( cFile ) INLINE TW_DibWJpg( ::hDib, cFile )
METHOD DibToBmp( cFile ) INLINE TW_DibWBmp( ::hDib, cFile )
METHOD SetJpegQ( nQuality) INLINE TW_SetJpegQuality( nQuality )// 1..100 Default 75
METHOD Acquire() INLINE TW_Acquire( ::hWnd )
METHOD AcquireClipBoard() INLINE TW_AcquireToClipboard( ::hWnd , 0 )
METHOD OpenDefault()
METHOD OpenSource()
METHOD EnableSource() INLINE TW_EnableSource( ::hWnd )
METHOD Choose() INLINE TW_SelectImageSource()
// ********** Basic TWAIN Inquiries **********************************
METHOD IsAvailable() INLINE IIF( TW_Avail() = 1, .T. , .F. )
METHOD Version() INLINE ( Str( TW_EasyVersion() / 100 ) )
METHOD State() INLINE (::nState := TW_State() )
METHOD SourceName() INLINE TW_SourceName()
METHOD GetSourceName( cName ) INLINE TW_GetSourceName( cName )
//************ Global Options *****************************************
METHOD SetHide( lHide ) INLINE IIF( lHide , TW_SetHideUI(1), TW_SetHideUI(0) )
//-*********** High-level Capability Negotiation Functions **************
// These functions should only be called in State 4 (TWAIN_SOURCE_OPEN)
METHOD PixelType( nType ) INLINE ( ::State(),;
if( ::nState >= TWAIN_SOURCE_OPEN,;
TW_SetCurrentPixelType( nType ),0 ) )
METHOD SetRes( dRes ) INLINE ( ::State(),;
if( ::nState >= TWAIN_SOURCE_OPEN,;
TW_SetCurrentResolution( dRes ),0) )
METHOD SetXRes( dRes ) INLINE TW_SetXResolution( dRes )
METHOD SetYRes( dRes ) INLINE TW_SetYResolution( dRes )
METHOD SetUnits( nUnits ) INLINE TW_SETCURRENTUNITS( nUnits )
METHOD SetContrats( dContrats) INLINE TW_SETCONTRATS( dContrats )
METHOD SetBright( dBright ) INLINE TW_SETBRIGHTNESS( dBright )
METHOD SetPaper( nPaper ) INLINE TW_SETPAPERSIZE( nPaper )
METHOD GetResolution() INLINE TW_GETCURRENTRESOLUTION()
//******** Image Layout (Region of Interest) **********************
METHOD RegionSet( nLeft,nTop, nRigth, nBottom ) INLINE TW_SetImageLayout( nLeft,nTop, nRigth, nBottom )
METHOD RegionReset() INLINE TW_ResetImageLayout()
METHOD RegionGet( L,T,R,B ) INLINE TW_GetImageLayout(@L,@T,@R,@B)
METHOD RegionGetDefault( L,T,R,B ) INLINE TW_GetDefaultImageLayout(@L,@T,@R,@B)
METHOD ClipBoardToFile( cFile )
METHOD DIB_GetFromClipboard() INLINE TW_DIB_GetFromClipboard()
ENDCLASS
***********************************************************
***********************************************************
METHOD New( cFile, hWnd ) CLASS TSCAN32
IF Empty( hWnd )
::hWnd := GetActiveWindow()
ENDIF
IF Empty( cFile )
::cFile := "TestTscan32.jpg"
ELSE
::cFile := cFile
ENDIF
IF !::IsAvailable()
::lError := .T.
// MsgStop( "TWAIN no found","Attention!") // Only Fivewin
ENDIF
IF !::lError
::Register( 1,0,0,0,"1.0 Beta","by Rafa Carmona","Scan by Thefull","Scan For [x]Harbour" )
ENDIF
::OpenSource()
::OpenDefault()
RETURN Self
**********************************************************************
* Comprueba que esta disponible TWAIN y cargalo
**********************************************************************
METHOD OpenSource() CLASS TSCAN32
Local nResult := TW_LoadSourceManager()
DO CASE
CASE nResult = -1
::lError := .T.
// MsgStop("Error Driver TWAIN"," ฟ Insufficient Memory ?")
Return Self
ENDCASE
Return Self
***********************************************************************
* Abre TWAIN el ultimo que fue seleccionado desde Select ..Dialog
* Si no puede cargarlo solicita seleccionar Source.
***********************************************************************
METHOD OpenDefault() CLASS TSCAN32
Local nResult := TW_OpenDefaultSource()
DO CASE
CASE nResult = 0
::Choose()
CASE nResult = -1
::lError := .T.
OTHERWISE
::lError := .F.
ENDCASE
Return Self
**************************************************************************
* Liberamos hDib y cerramos el dispositivo
**************************************************************************
METHOD End() CLASS TSCAN32
if !Empty( ::hDib )
TW_Free( ::hDib )
endif
TW_CloseSourceManager( ::hWnd ) // Close para evitar GPF
Return NIL
***************************************************************************
* Registra la aplicacion
***************************************************************************
METHOD Register( nMajor ,nMinor,nLanguage,nCountry,cVersion,cName,cFamily,cProduct ) CLASS TSCAN32
TW_REGISTERAPP( nMajor ,nMinor,nLanguage,nCountry,;
cVersion,cName,cFamily,cProduct )
Return Self
***********************************************************
* Digitaliza hacia un fichero .jpg
***********************************************************
METHOD DigiToFile( cFile )
if EMPTY( cFile )
cFile := ::cFile
endif
IF !::lError
::hDib := ::Acquire() // Importar
ENDIF
IF !Empty( ::hDib )
IF TW_IsJpg() = 1 // Si puede hacer uso del JPG
::DibToJpeg( cFile )
ELSE
::DibToBmp( cFile ) // Si no hacemos uso de BMP
ENDIF
ENDIF
Return Self
************************************************************************
* Save content clipboard into to file.jpg
************************************************************************
METHOD ClipBoardToFile( cFile ) CLASS TSCAN32
Local hDib, nError
IF Empty( cFile )
::cFile := "TestTscan32.jpg"
ELSE
::cFile := cFile
ENDIF
hDib := ::DIB_GetFromClipboard()
IF !Empty( hDib )
IF TW_IsJpg() = 1 // Si puede hacer uso del JPG
TW_DibWJpg( hDib, ::cFile )
ELSE
TW_DibWBmp( hDib, ::cFile )
ENDIF
TW_Free( hDib )
ENDIF
RETURN Self
/* -----------------------------------------------------------------
Implementation Language C for [x]Harbour(WIN32)
2003(c)- by Rafa Carmona ( TheFull )
Wrappers for EZTW32.DLL the DosAdi.
-------------------------------------------------------------------- */
#pragma BEGINDUMP
#include <windows.h>
#include "eztwain.h"
#include "hbapi.h"
/*--------- Top-Level Calls -------------------------------------*/
HB_FUNC( TW_ACQUIRE ) // hWnd
{
hb_retnl( ( LONG )TWAIN_Acquire( ( HWND ) hb_parnl( 1 ) ) );
}
HB_FUNC( TW_FREE ) // hDib
{
TWAIN_FreeNative( ( HANDLE ) hb_parnl( 1 ) );
hb_ret();
}
HB_FUNC( TW_SELECTIMAGESOURCE ) // hWnd
{ ;
hb_retni( TWAIN_SelectImageSource( ( HWND ) hb_parnl( 1 ) ) );
}
HB_FUNC( TW_ACQUIRENATIVE ) // hWnd, nPixTypes
{
hb_retnl( ( LONG )TWAIN_AcquireNative( ( HWND ) hb_parnl( 1 ), (unsigned) hb_parni(2) ) );
}
HB_FUNC( TW_ACQUIRETOCLIPBOARD ) // hWnd, nPixTypes
{
hb_retni( TWAIN_AcquireToClipboard( ( HWND ) hb_parnl( 1 ), (unsigned) hb_parni(2) ) );
}
HB_FUNC( TW_ACQUIREMEMORY ) // hWnd
{
hb_retnl( ( LONG )TWAIN_AcquireMemory( ( HWND ) hb_parnl( 1 ) ) );
}
HB_FUNC( TW_ACQUIRETOFILENAME ) // hWnd, cFileName
{
hb_retni( TWAIN_AcquireToFilename( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ) ) );
}
HB_FUNC( TW_ACQUIREFILE ) // hWnd, nFF, cFileName
{
hb_retni( TWAIN_AcquireFile( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ) ,hb_parc( 3 ) ) );
}
//--------- Basic TWAIN Inquiries
HB_FUNC( TW_AVAIL )
{
hb_retni( TWAIN_IsAvailable() );
}
HB_FUNC( TW_EASYVERSION)
{
hb_retni( TWAIN_EasyVersion() );
}
HB_FUNC( TW_STATE )
{
hb_retni( TWAIN_State() );
}
HB_FUNC( TW_SOURCENAME )
{
hb_retc( TWAIN_SourceName() );
}
HB_FUNC( TW_GETSOURCENAME ) // pzName
{
TWAIN_GetSourceName( (LPSTR) hb_parc( 1 ) );
hb_ret();
}
//--------- DIB handling utilities ---------
HB_FUNC( TW_DIBWJPG ) // hDib, cName
{
hb_parni( DIB_WriteToJpeg( ( HANDLE ) hb_parnl(1), hb_parc( 2 ) ) );
}
HB_FUNC( TW_DIBWBMP ) // hDib, cName
{
hb_parni( DIB_WriteToBmp( ( HANDLE ) hb_parnl(1), hb_parc( 2 ) ) );
}
//--------- File Read/Write
HB_FUNC( TW_ISJPG )
{
hb_retni( TWAIN_IsJpegAvailable() );
}
HB_FUNC( TW_SETSAVEFORMAT )
{
hb_retni( TWAIN_SetSaveFormat( hb_parni( 1 ) ) );
}
HB_FUNC( TW_GETSAVEFORMAT )
{
hb_retni( TWAIN_GetSaveFormat() );
}
HB_FUNC( TW_SETJPEGQUALITY ) // nQuality 1...100
{
TWAIN_SetJpegQuality( hb_parni( 1 ) );
hb_ret();
}
HB_FUNC( TW_GETJPEGQUALITY )
{
hb_retni( TWAIN_GetJpegQuality() );
}
HB_FUNC( TW_WRITENATIVETOFILENAME )
{
hb_retni( TWAIN_WriteNativeToFilename( (HANDLE) hb_parnl(1), hb_parc(2) ));
}
HB_FUNC( TW_LOADNATIVEFROMFILENAME )
{
hb_retnl( (LONG) TWAIN_LoadNativeFromFilename( hb_parc( 1 ) ) );
}
//--------- Global Options ----------------------------------------------
HB_FUNC( TW_SETMULTITRANSFER )
{
TWAIN_SetMultiTransfer( hb_parni( 1 ) );
hb_ret();
}
HB_FUNC( TW_GETMULTITRANSFER )
{
hb_retni( TWAIN_GetMultiTransfer() );
}
HB_FUNC( TW_SETHIDEUI ) // nHide
{
TWAIN_SetHideUI( hb_parni( 1) );
hb_ret();
}
HB_FUNC( TW_GETHIDEUI )
{
hb_retni( TWAIN_GetHideUI() );
}
HB_FUNC( TW_DISABLEPARENT )
{
TWAIN_DisableParent( hb_parni( 1 ) );
hb_ret();
}
HB_FUNC( TW_GETDISABLEPARENT )
{
hb_retni( TWAIN_GetDisableParent() );
}
HB_FUNC( TW_REGISTERAPP )
{
TWAIN_RegisterApp( hb_parni(1),hb_parni(2),hb_parni(3),hb_parni(4),
hb_parc(5), hb_parc(6),
hb_parc(7), hb_parc(8) );
hb_ret();
}
HB_FUNC( TW_SETAPPTITLE )
{
TWAIN_SetAppTitle( hb_parc( 1 ) );
hb_ret();
}
//--------- TWAIN State Control ---------------------------------------
HB_FUNC( TW_LOADSOURCEMANAGER )
{
hb_retni( TWAIN_LoadSourceManager() );
}
HB_FUNC( TW_OPENSOURCEMANAGER ) // hWnd
{
hb_retni( TWAIN_OpenSourceManager( ( HWND ) hb_parnl( 1 ) ) );
}
HB_FUNC( TW_OPENDEFAULTSOURCE )
{
hb_retni( TWAIN_OpenDefaultSource() );
}
HB_FUNC( TW_GETSOURCELIST )
{
hb_retni( TWAIN_GetSourceList() );
}
HB_FUNC( TW_GETNEXTSOURCENAME )
{
hb_retni( TWAIN_GetNextSourceName( hb_parc( 1 ) ) );
}
HB_FUNC( TW_GETDEFAULTSOURCENAME )
{
hb_retni( TWAIN_GetDefaultSourceName( hb_parc( 1 ) ));
}
HB_FUNC( TW_OPENSOURCE )
{
hb_retni( TWAIN_OpenSource( hb_parc( 1 ) ) );
}
HB_FUNC( TW_ENABLESOURCE ) // hWnd
{
hb_retni( TWAIN_EnableSource( ( HWND ) hb_parnl( 1 ) ) );
}
HB_FUNC( TW_DISABLESOURCE )
{
hb_retni( TWAIN_DisableSource( ) );
}
HB_FUNC( TW_CLOSESOURCE )
{
hb_retni( TWAIN_CloseSource() );
}
HB_FUNC( TW_CLOSESOURCEMANAGER )
{
hb_retni( TWAIN_CloseSourceManager( (HWND) hb_parnl( 1 ) ) );
}
HB_FUNC( TW_UNLOADSOURCEMANEGER )
{
hb_retni( TWAIN_UnloadSourceManager() );
}
//--------- High-level Capability Negotiation Functions --------------
// These functions should only be called in State 4 (TWAIN_SOURCE_OPEN)
HB_FUNC( TW_GETCURRENTUNITS )
{
hb_retni( TWAIN_GetCurrentUnits() );
}
HB_FUNC( TW_SETCURRENTUNITS ) // nUnits
{
hb_retni( TWAIN_SetCurrentUnits( hb_parni( 1 ) ) );
}
HB_FUNC( TW_GETBITDEPTH )
{
hb_retni( TWAIN_GetBitDepth() );
}
HB_FUNC( TW_SETBITDEPTH )
{
hb_retni( TWAIN_SetBitDepth( hb_parni( 1 ) ) );
}
HB_FUNC( TW_GETPIXELTYPE )
{
hb_retni( TWAIN_GetPixelType() );
}
HB_FUNC( TW_SETCURRENTPIXELTYPE ) // nBits
{
hb_retni( TWAIN_SetCurrentPixelType( hb_parni( 1 ) ) );
}
HB_FUNC( TW_GETCURRENTRESOLUTION )
{
hb_retnd( TWAIN_GetCurrentResolution());
}
HB_FUNC( TW_GETYRESOLUTION )
{
hb_retnd( TWAIN_GetYResolution());
}
HB_FUNC( TW_SETCURRENTRESOLUTION ) // dRes
{
hb_retni( TWAIN_SetCurrentResolution( hb_parnd( 1 ) ) );
}
HB_FUNC( TW_SETXRESOLUTION )
{
hb_retni( TWAIN_SetXResolution( hb_parnd( 1 ) ) );
}
HB_FUNC( TW_SETYRESOLUTION )
{
hb_retni( TWAIN_SetYResolution( hb_parnd( 1 ) ) );
}
HB_FUNC( TW_SETCONTRATS ) //dCon
{
hb_retni( TWAIN_SetContrast( hb_parnd( 1 ) ) ); // -1000....+1000
}
HB_FUNC( TW_SETBRIGHTNESS ) //dBri
{
hb_retni( TWAIN_SetBrightness( hb_parnd( 1 ) ) ); // -1000....+1000
}
HB_FUNC( TW_SETTHRESHOLD )
{
hb_retni( TWAIN_SetThreshold( hb_parnd( 1 ) ) );
}
HB_FUNC( TW_GETCURRENTTHRESHOLD )
{
hb_retnd( TWAIN_GetCurrentThreshold() );
}
HB_FUNC( TW_SETXFERMECH )
{
hb_retni( TWAIN_SetXferMech( hb_parni( 1 ) ) );
}
HB_FUNC( TW_XFERMECH )
{
hb_retni( TWAIN_XferMech() );
}
HB_FUNC( TW_SUPPORTSFILEXFER )
{
hb_retni( TWAIN_SupportsFileXfer() );
}
HB_FUNC( TW_SETPAPERSIZE ) // nTypePaper
{
hb_retni( TWAIN_SetPaperSize( hb_parni( 1 ) ) );
}
//-------- Document Feeder ---------------------------------
HB_FUNC( TW_HASFEEDER )
{
hb_retl( TWAIN_HasFeeder() );
}
HB_FUNC( TW_ISFEEDERSELECTED )
{
hb_retl( TWAIN_IsFeederSelected() );
}
HB_FUNC( TW_SELECTFEEDER )
{
hb_retni( TWAIN_SelectFeeder( hb_parni( 1 ) ) );
}
HB_FUNC( TW_ISAUTOFEEDON )
{
hb_retl( TWAIN_IsAutoFeedOn() );
}
HB_FUNC( TW_SETAUTOFEDD )
{
hb_retni( TWAIN_SetAutoFeed( hb_parni( 1 ) ) );
}
HB_FUNC( TW_ISFEEDERLOADED )
{
hb_retl( TWAIN_IsFeederLoaded() );
}
//-------- Duplex Scanning ------------------------------------------
HB_FUNC( TW_GETDUPLEXSUPPORT )
{
hb_retni( TWAIN_GetDuplexSupport() );
}
HB_FUNC( TW_ENABLEDUPLEX )
{
hb_retni( TWAIN_EnableDuplex( hb_parni( 1 ) ) );
}
HB_FUNC( TW_ISDUPLEXENABLED )
{
hb_retl( TWAIN_IsDuplexEnabled() );
}
//--------- Other 'exotic' capabilities --------
HB_FUNC( TW_HASCONTROLLABLEUI )
{
hb_retni( TWAIN_HasControllableUI() );
}
HB_FUNC( TW_SETINDICATORS )
{
hb_retni( TWAIN_SetIndicators( hb_parl( 1 ) ) );
}
HB_FUNC( TW_COMPRESSION )
{
hb_retni( TWAIN_Compression() );
}
HB_FUNC( TW_SETCOMPRESSION )
{
hb_retni( TWAIN_SetCompression( hb_parni( 1 ) ) );
}
HB_FUNC( TW_TILED )
{
hb_retl( TWAIN_Tiled() );
}
HB_FUNC( TW_SETTILED )
{
hb_retni( TWAIN_SetTiled( hb_parl( 1 ) ) );
}
HB_FUNC( TW_PLANARCHUNKY )
{
hb_retni( TWAIN_PlanarChunky() );
}
HB_FUNC( TW_SETPLANARCHUNKY )
{
hb_retni( TWAIN_SetPlanarChunky( hb_parni( 1 ) ) );
}
HB_FUNC( TW_PIXELFLAVOR )
{
hb_retni( TWAIN_PixelFlavor() );
}
HB_FUNC( TW_SETPIXELFLAVOR )
{
hb_retni( TWAIN_SetPixelFlavor( hb_parni( 1 ) ) );
}
HB_FUNC( TW_SETLIGHTPATH )
{
hb_retni( TWAIN_SetLightPath( hb_parl( 1 ) ) );
}
HB_FUNC( TW_SETAUTOBRIGHT )
{
hb_retni( TWAIN_SetAutoBright( hb_parl( 1 ) ) );
}
HB_FUNC( TW_SETGAMMA )
{
hb_retni( TWAIN_SetGamma( hb_parnd( 1 ) ) );
}
HB_FUNC( TW_SETSHADOW )
{
hb_retni( TWAIN_SetShadow( hb_parnd( 1 ) ) );
}
HB_FUNC( TW_SETHIGHLIGHT )
{
hb_retni( TWAIN_SetHighlight( hb_parnd( 1 ) ) );
}
//--------- Image Layout (Region of Interest) --------
HB_FUNC( TW_SETIMAGELAYOUT ) // left, top, right, bottom
{
hb_retni( TWAIN_SetImageLayout( hb_parnd( 1 ),hb_parnd( 2 ),hb_parnd( 3 ),hb_parnd( 4 ) ) );
}
HB_FUNC( TW_RESETIMAGELAYOUT )
{
TWAIN_ResetImageLayout();
hb_ret();
}
HB_FUNC( TW_GETIMAGELAYOUT )
{
double L,T,R,B;
int nRet;
nRet = TWAIN_GetImageLayout( &L,&T,&R,&B );
hb_stornd( L, 1 );
hb_stornd( T, 2 );
hb_stornd( R, 3 );
hb_stornd( B, 4 );
hb_retni( nRet );
}
HB_FUNC( TW_GETDEFAULTIMAGELAYOUT )
{
double L,T,R,B;
int nRet;
nRet = TWAIN_GetDefaultImageLayout( &L, &T, &R, &B);
hb_stornd( L, 1 );
hb_stornd( T, 2 );
hb_stornd( R, 3 );
hb_stornd( B, 4 );
hb_retni( nRet );
}
//HANDLE EZTAPI DIB_GetFromClipboard(void);
HB_FUNC( TW_DIB_GETFROMCLIPBOARD )
{
hb_retnl( (LONG) DIB_GetFromClipboard() );
}
// para no depender de Five, y harbour poder el solito trabajar <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
HB_FUNC ( GETACTIVEWINDOW )
{
hb_retnl( ( LONG ) GetActiveWindow() );
}
#pragma ENDDUMP |
link error while compile testscan.prg and tscan.prg | Dear Mauricio,
This is testscan.prg
#INCLUDE "Fivewin.ch"
// BitDeph
#define TWPT_BW 0 /* Black and White */
#define TWPT_GRAY 1
#define TWPT_RGB 2
#define TWPT_PALETTE 3
//----- Unit of Measure
#define TWUN_INCHES 0
#define TWUN_CENTIMETERS 1
#define TWUN_PICAS 2
#define TWUN_POINTS 3
#define TWUN_TWIPS 4
#define TWUN_PIXELS 5
/* ----------------------------------------------------------------
Control de Pruebas de la Clase TSCAN32, Wrappers
para Scanners y WebCams.
- Soporta scanners Paralelo, USB y SCSI.
- WebCams
(c)2003.- by Rafa Carmona( TheFull )
Compiler & Libraries
- Harbour and Fivewin For Harbour v2.3
--------------------------------------------------------------- */
Static oScan, oWnd
Static X := 0
Static Y := 0
Static lChangeUnit := .F.
Function Main( cFile, nType, nRes, lHide, nPaper )
Local hDib := 0
Local oImage, oBar, oBtn, oFont, oCbx, oCbxU, oCbxR, oGet, oCheck
Local lSave := .F.
Local cType
Local aTypes := { "1-Scale Gray","2-Real Color","3-Palette Color" }
Local aResolutions := { "75","100","150","200","300" }
Local aUnits := { "0-Dpi","1-Cms","2-Picas","3-Points","4-Twips","6-Pixels"}
Local cUnit := aUnits[1]
Local nUnit := 0
// Default RGB
IF nType == NIL
nType := TWPT_GRAY
ELSEIF Val( nType ) <= 3
nType := Val( nType )
ELSEIF Val( nType ) > 3
MsgStop( "Not exist type." + CRLF+;
"Real Color by Default", "Atention" )
nType := TWPT_RGB
ENDIF
cType := aTypes[ nType ]
IF cFile = NIL
cFile := ""
ENDIF
//Default 150dpi
IF nRes = NIL
nRes := "150"
ENDIF
oScan := TScan32():New( cFile )
DEFINE FONT oFont NAME"Tahoma" SIZE 0,-10
DEFINE WINDOW oWnd TITLE "Fichero: "+ oScan:cFile FROM 1,1 TO 500,650 PIXEL
DEFINE BUTTONBAR oBar SIZE 50,32 3D OF oWnd
DEFINE BUTTON oBtn PROMPT "Exit" FONT oFont ;
ACTION oWnd:End() OF oBar
DEFINE BUTTON oBtn PROMPT "Grabar" FONT oFont ;
ACTION ( oScan:ClipBoardToFile( cFile ),;
SysRefresh() ) OF oBar
DEFINE BUTTON oBtn PROMPT "Scan" FONT oFont ;
ACTION IF( ScanFive( nType , nRes, nUnit ),;
( oImage:LoadFromClipboard(), oImage:Refresh()) ,) OF oBar
@5,175 CHECKBOX oCheck VAR lChangeUnit PROMPT "SetUnit" SIZE 70,20 OF oBar PIXEL
@3,250 COMBOBOX oCbxR VAR nRes SIZE 100,130 ;
ITEMS aResolutions OF oBar PIXEL ;
WHEN nUnit = 0 UPDATE
@3,350 COMBOBOX oCbx VAR cType SIZE 120,130 ;
ITEMS aTypes OF oBar PIXEL ;
ON CHANGE nType := Val( SubStr( cType,1,1 ) )
@3,470 COMBOBOX oCbxU VAR cUnit SIZE 100,130 ;
ITEMS aUnits OF oBar PIXEL ;
ON CHANGE nUnit := Val( SubStr( cUnit,1,1 ) ) ;
UPDATE
@7,570 GET oGet VAR X PICTURE "9999.99" SIZE 60,20 OF oBar ;
UPDATE PIXEL
@7,630 GET oGet VAR Y PICTURE "9999.99" SIZE 60,20 OF oBar ;
UPDATE PIXEL
@0,0 BITMAP oImage SCROLL OF oWnd
oWnd:oClient := oImage
oWnd:Center()
SET MESSAGE TO "(c)2003-Scan ClipBoard Beta 2 by Rafa Carmona" OF oWnd CENTER
// Vaciamos el Clipboard a la salida de la Aplicacion.
// Empty Clipboard to Exit aplicattion.
ACTIVATE WINDOW oWnd VALID( oFont:End(), oScan:End(),;
OpenClipBoard( oWnd:hWnd ),;
EmptyClipboard(),;
CloseClipBoard(),.T. )
Return NIL
// Scanner al Clipboard
// nType -> Tipo de Salida
// nRes -> Resolucion de salida
// nUnit -> Sistema de Medida
Static Func ScanFive( nType, nRes , nUnit )
if oScan:State() < 4
oScan:OpenDefault()
endif
if nUnit = 0
oScan:SetRes( Val( nRes ) )
endif
IF nUnit > 0
if lChangeUnit
oScan:SetUnits( nUnit ) // Sistema de Medida .Esto puede causar problema
endif
// Expresado en Dpi. Habria que convertir pero no tengo ni idea de como.
oScan:SetXRes( X )
oScan:SetYRes( Y )
ENDIF
oScan:SetHide( .T. ) // Oculto DS
oScan:PixelType( nType )
Return IF( oScan:AcquireClipBoard() = 1,.T.,.F.) |
link error while compile testscan.prg and tscan.prg | I think This , How Many Files have this Class , your bat files don´t have library to undefined Functions if external .. declare..
Extern ...
What Files have this class?
Mauricio (BRAZIL) |
link error while compile testscan.prg and tscan.prg | Dear Mauricio,
This classes come from <!-- w --><a class="postlink" href="http://www.dosadi.com">www.dosadi.com</a><!-- w --> EZTWAIN
Regards,
Dutch |
link error while compile testscan.prg and tscan.prg | DEAR DUTCH,
I THINK THIS , do you have Using Dll Via DLL32
i don´t get this classe , send me ..ok
<!-- e --><a href="mailto:mauricioajordao@msn.com">mauricioajordao@msn.com</a><!-- e -->
Together found Solutions OK
mauricio (BRAZIL) |
link error while compile testscan.prg and tscan.prg | Dutch
I am having the same problem that you are having when trying to compile the TSCAN.PRG:
[code:2sn5muqw]
xLINK: error: Unresolved external symbol '_TWAIN_Acquire'.
xLINK: error: Unresolved external symbol '_TWAIN_FreeNative'.
xLINK: error: Unresolved external symbol '_TWAIN_SelectImageSource'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireNative'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireToClipboard'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireMemory'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireToFilename'.
[/code:2sn5muqw]
Did you find a solution to this problem?
Regards,
George |
link error while compile testscan.prg and tscan.prg | Dear George,
This following code that I use.
Regards,
Dutch
[quote="George":6u855owo]Dutch
I am having the same problem that you are having when trying to compile the TSCAN.PRG:
[code:6u855owo]
xLINK: error: Unresolved external symbol '_TWAIN_Acquire'.
xLINK: error: Unresolved external symbol '_TWAIN_FreeNative'.
xLINK: error: Unresolved external symbol '_TWAIN_SelectImageSource'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireNative'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireToClipboard'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireMemory'.
xLINK: error: Unresolved external symbol '_TWAIN_AcquireToFilename'.
[/code:6u855owo]
Did you find a solution to this problem?
Regards,
George[/quote:6u855owo]
[code:6u855owo]
/*------------------------------------------------------------------------*
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Ûݳ ³
Ûݳ ProcName......: Scanner.prg ³
Ûݳ Pourpose......: TWAIN standard device Class interface ³
Ûݳ Date..........: 05-11-96 ³
Ûݳ Author........: (c),L.Gadaleta ³
Ûݳ ³
ÛÝÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
*------------------------------------------------------------------------*/
#include "FiveWin.ch"
#include "Image.ch"
#define STAND_ALONE
#define TWAIN_DLL "EZTw32.dll"
* #define TWAIN_DLL "DMTwain.dll"
#define CBM_INIT 4 // for freeimage.dll
#define DIB_RGB_COLORS 0 // for freeimage.dll
STATIC oWnd, oImage
STATIC hLib // for freeimage.dll
#ifdef STAND_ALONE
FUNCTION ScanMe(cFileRes)
LOCAL cFile, nRes, n
cFile := cFileRes
nRes := 100
if !cFileRes == NIL
if ( n:=AT(",",cFileRes) ) > 0
cFile := Alltrim(Substr(cFileRes,1,n-1))
nRes := Val(Alltrim(Substr(cFileRes,n+1)))
end
end
CursorWait()
DEFINE WINDOW oWnd FROM 1,1 TO 1,1
ACTIVATE WINDOW oWnd ON INIT (oWnd:Hide(), ;
RunScan(cFile,oWnd:hWnd,nRes))
if file( cFile )
SaveImage( cFile )
end
CursorArrow()
RETURN NIL
STATIC FUNCTION RunScan(cFile,hWnd,nRes)
LOCAL oScanner := Scanner():New(hWnd)
DEFAULT nRes := 100 // Scanner resolution in Dpi
oScanner:Choose()
oScanner:Set(.T.) // Set User Interface Off
oScanner:DigiToFile(cFile,nRes) // Acquires
oScanner:End()
oWnd:End()
RETURN NIL
#endif
CLASS Scanner
DATA hWnd AS NUMERIC // Handle of the window
DATA hDll AS NUMERIC // Handle of the DLL
DATA lLoad AS LOGICAL // .T. DLL & Driver Loaded
DATA hDib AS NUMERIC // Current Dib handle
*
METHOD New() CONSTRUCTOR
METHOD End()
METHOD Set() // Acquiring Dialog ON/OFF
METHOD Choose() // Select Image Device Source
METHOD DigiToFile() // Acquire Image and save to a file
METHOD DigiToClip() // Acquire Image and copy to ClipBoard
METHOD SetResolution() // Set Dpi for the scanner
*
PROTECTED :
METHOD Free() // Release Dib's handle
METHOD IsActive() // Twain Driver Loaded
METHOD Register() // Register my application into Twain application
METHOD DibToFile() // Write to file Dib's handle in BMP format
END CLASS
METHOD New(hWnd)
// Constructor
::hWnd := iif( ValType( hWnd ) == "N" , hWnd , 0 )
::lLoad := .T.
::hDLL := LoadLibrary( TWAIN_DLL )
::hDib := 0
if ::hDll <= 21
::lLoad := .F.
MsgAlert( BuildError(::hDll) , TWAIN_DLL )
RETU Self
end
if ( ::lLoad := ::IsActive() )
::Register()
end
RETU Self
METHOD End()
// Destructor
if ::hDib != 0
::Free( ::hDib )
end
FreeLibrary( ::hDll )
RETU NIL
METHOD DigiToFile( cFile , nRes )
// Acquire Document & save to file
LOCAL nPixType := 0
LOCAL cFarProc
DEFAULT nRes := 100
::SetResolution( nRes )
if ::lLoad
cFarProc := GetProcAddress( ::hDLL, "TWAIN_AcquireNative",.T., WORD,WORD,_INT )
::hDib := CallDLL( cFarProc,::hWnd,nPixType )
if ::hDib == 0
MsgInfo("Cannot Load Image, Scanner not found","")
else
::DibToFile(::hDib,cFile)
::Free( ::hDib )
end
end
RETU Self
METHOD DigiToClip()
// Acquire document & copy to ClipBoard
LOCAL nPixType := 0
LOCAL cFarProc
LOCAL nResult
if ::lLoad
cFarProc := GetProcAddress( ::hDLL, "TWAIN_AcquireToClipBoard",.T., _INT,WORD,_INT )
nResult := CallDLL( cFarProc,::hWnd,nPixType )
end
RETU Self
METHOD SetResolution( nDpi )
// NEW
LOCAL cFarProc
LOCAL uResult
DEFAULT nDpi := 100
if ::lLoad
cFarProc := GetProcAddress( ::hDLL, "TWAIN_SetResolution",.T., VOID,_DOUBLE )
uResult := CallDLL( cFarProc,nDpi )
end
RETU Self
METHOD Set(lShow)
// Show-Hide Scanner's Dialog Box
LOCAL nHide := 0 // Default: Shows Scanner's Dialog Box
LOCAL cFarProc
LOCAL uResult
DEFAULT lShow := .T.
if ::lLoad
nHide := iif(lShow,0,1)
cFarProc := GetProcAddress( ::hDLL, "TWAIN_SetHideUI",.T., VOID,_INT )
uResult := CallDLL( cFarProc,nHide )
end
RETU Self
METHOD Choose()
// Select Image Device Source
LOCAL cFarProc
LOCAL nResult
if ::lLoad
cFarProc := GetProcAddress( ::hDLL, "TWAIN_SelectImageSource",.T., _INT,WORD )
nResult := CallDLL( cFarProc,::hWnd )
end
RETU Self
//---------- Protected Methods
METHOD Free(hDib)
// Release Dib's Handle
LOCAL cFarProc
LOCAL uResult
cFarProc := GetProcAddress( ::hDLL, "TWAIN_FreeNative",.T., VOID,WORD )
uResult := CallDLL( cFarProc,hDib )
RETU NIL
METHOD DibToFile(hDib,cFile)
// Write to File From DIB's handle
LOCAL cFarProc
LOCAL nResult
LOCAL lRet
cFarProc := GetProcAddress( ::hDLL, "TWAIN_WriteNativeToFilename",.T., _INT,WORD,LPSTR)
lRet := ( (nResult:=CallDLL( cFarProc,hDib,cFile ))==0 )
DO CASE
CASE nResult == -1
MsgInfo("Annullato dall'utente","File non registrato")
CASE nResult == -2
MsgInfo("Errore durante la scrittura sul file "+cFile,"File non registrato")
CASE nResult == -3
MsgInfo("Errore interno sul file DIB","File non registrato")
CASE nResult == -4
MsgInfo("Errore durante la scrittura sul file "+cFile+", probabile spazio insufficiente sul disco !","File non registrato")
ENDCASE
RETU lRet
METHOD IsActive()
// Is Twain driver loaded ?
LOCAL cFarProc
LOCAL nResult
cFarProc := GetProcAddress( ::hDLL, "TWAIN_IsAvailable",.T., _INT )
if ! (nResult := CallDLL( cFarProc )) == 1
MsgAlert("Nessun driver per apparecchi TWAIN compatibili risulta disponibile !","Errore hardware")
// Messaggio inviato direttamente da TWAIN.DLL
end
RETU iif(nResult==1,.T.,.F.)
METHOD Register()
// Register my application into Twain application
LOCAL nMaiorNum := 1
LOCAL nMinorNum := 0 // Result -> 1.0
LOCAL nLanguage := 0
LOCAL nCountry := 0
LOCAL cVersion := "1.0"
LOCAL cManifact := "The Genius"
LOCAL cFamily := "Digitizer"
LOCAL cProduct := StrTran(cFileName(GetModuleFileName(GetInstance())),".EXE","")
LOCAL cFarProc
LOCAL uResult
cFarProc := GetProcAddress( ::hDLL, "TWAIN_RegisterApp",.T.,;
VOID,_INT,_INT,_INT,_INT,LPSTR,LPSTR,LPSTR,LPSTR )
uResult := CallDLL( cFarProc,nMaiorNum,nMinorNum,nLanguage,nCountry,cVersion,cManifact,cFamily,cProduct )
RETU NIL
//---------- END Protected Methods
STATIC FUNCTION BuildError(nError)
LOCAL cRet := "Errore nella libreria dinamica"
DO CASE
CASE nError == 0
cRet := "Memoria insufficiente ad eseguire il programma"
CASE nError == 2
cRet := "File non trovato"
CASE nError == 3
cRet := "Percorso non trovato"
CASE nError == 5
cRet := "Tentantivo di collegarsi dinamicamente ad un task o errore di condivisione"
CASE nError == 6
cRet := "La libreria richiede un segemento separato per ogni task"
CASE nError == 8
cRet := "Memoria insufficiente ad avviare l'applicazione"
CASE nError == 10
cRet := "Versione di MS Windows non corretta"
CASE nError == 11
cRet := "Libreria non valida oppure non Š un'applicazione MS Windows"
CASE nError == 12
cRet := "Applicazione disegnata per un sistema operativo diverso"
CASE nError == 13
cRet := "Applicazione disegnata per MS-DOS 4.0"
CASE nError == 14
cRet := "Tipo di file eseguibile sconosciuto"
CASE nError == 15
cRet := "Tentativo di caricare un'applicazione disegnata per funzionare in modalit… reale"
CASE nError == 16
cRet := "Tentativo di caricare una seconda istanza dell'applicazione contenente segmenti di dati multipli non marcati per la sola lettura"
ENDCASE
RETU OemToAnsi( cRet + "!" )
//------------------ Freeimage.dll ------------------------//
FUNCTION SaveImage( cFile )
LOCAL nFormat, hDib, hInfoH, hInfo, hBits, hWnd, hDC, hBmp, lOk
#ifdef __CLIPPER__
hLib = LOADLIB32( "freeimage.dll" )
#else
hLib = LOADLIBRARY( "freeimage.dll" )
#endif
if hLib <= 32
MsgStop( "Cannot load FreeImage.dll" )
return 0
endif
nFormat := FIGETFILETYPE( cFile, 0 )
hDib := FILOAD( nFormat, cFile, 0 )
hInfoH := FIGETINFOHEADER( hDib )
hInfo := FIGETINFO( hDib )
hBits := FIGETBITS( hDib )
hWnd := GETDESKTOPWINDOW()
#ifdef __CLIPPER__
hDC = GETDC32( hWnd )
#else
hDC = GETDC( hWnd )
#endif
lOk := fiSave( 2 , hDib, cFile )
hBmp = CREATEDIBITMAP( hDC, hInfoH, CBM_INIT, hBits, hInfo, DIB_RGB_COLORS )
#ifdef __CLIPPER__
RELEASEDC32( hWnd, hDC )
#else
RELEASEDC( hWnd, hDC )
#endif
FIUNLOAD( hDib )
#ifdef __CLIPPER__
FREELIB32( hLib )
#else
FREELIBRARY( hLib )
#endif
RETURN hBmp
DLL32 STATIC FUNCTION FIGETFILETYPE( cFileName AS LPSTR, nSize AS LONG ) AS LONG;
PASCAL FROM "_FreeImage_GetFileType@8" LIB hLib
DLL32 STATIC FUNCTION FILOAD( nFormat AS LONG, cFileName AS LPSTR, nFlags AS LONG ) AS LONG;
PASCAL FROM "_FreeImage_Load@12" LIB hLib
DLL32 STATIC FUNCTION FIUNLOAD( hDib AS LONG ) AS VOID;
PASCAL FROM "_FreeImage_Unload@4" LIB hLib
DLL32 STATIC FUNCTION FIGETINFOHEADER( hDib AS LONG ) AS LONG;
PASCAL FROM "_FreeImage_GetInfoHeader@4" LIB hLib
DLL32 STATIC FUNCTION FIGETINFO( hDib AS LONG ) AS LONG;
PASCAL FROM "_FreeImage_GetInfo@4" LIB hLib
DLL32 STATIC FUNCTION FIGETBITS( hDib AS LONG ) AS LONG;
PASCAL FROM "_FreeImage_GetBits@4" LIB hLib
DLL32 STATIC FUNCTION FISAVE( nFormat AS LONG, hDib AS LONG, cFileName AS LPSTR, nFlags AS LONG ) AS BOOL;
PASCAL FROM "_FreeImage_Save@16" LIB hLib
DLL32 STATIC FUNCTION FIROTATE( hDib AS LONG, nAngle AS _DOUBLE ) AS LONG;
PASCAL FROM "_FreeImage_RotateClassic@12" LIB hLib
DLL32 STATIC FUNCTION GETDC32( hWnd AS LONG ) AS LONG;
PASCAL FROM "GetDC" LIB "user32.dll"
DLL32 STATIC FUNCTION RELEASEDC32( hWnd AS LONG ) AS LONG;
PASCAL FROM "ReleaseDC" LIB "user32.dll"
DLL32 STATIC FUNCTION CREATEDIBITMAP( hDC AS LONG, hInfoH AS LONG, nFlags AS LONG, hBits AS LONG, hInfo AS LONG, nUsage AS LONG ) AS LONG;
PASCAL FROM "CreateDIBitmap" LIB "gdi32.dll"
DLL32 FUNCTION WOWHANDLE16( nHandle AS LONG, nHandleType AS LONG ) AS LONG;
PASCAL FROM "WOWHandle16" LIB "wow32.dll"
[/code:6u855owo] |
link error while compile testscan.prg and tscan.prg | Dutch,
Thanks for your fast response. I am using this same code, from L. Gadaleta, without problem; but I would like to try the Rafa Carmona TSCAN.PRG class.
The problem with Rafa Carmona TSCAN.PRG class is in the C wrappers and I don't know how to solved it.
Regards,
George |
link error while compile testscan.prg and tscan.prg | Dear George,
I'm sorry. I don't look in it.
Regards,
Dutch |
link error while compile testscan.prg and tscan.prg | [quote="dutch":16jtd29l]Dear George,
I'm sorry. I don't look in it.
Regards,
Dutch[/quote:16jtd29l]Sorry , I not view this message.You only have convert .DLL a .lib. // For create library, twain.lib : IMPLIB -a -f twain.lib EZTW32.dllYou have link twain.lib in your .batRegards.Rafa Carmona |
link error.... | Hi..
Compiling...
Harbour devel build 1.1-0 Intl.
Copyright 1999-2007, <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m -->
Compiling 'main.prg' and generating preprocessed output to 'main.ppo'...
..
Lines 5931, Functions/Procedures 34
Generating C source output to 'main.c'... Done.
main.c
Creating library main.lib and object main.exp
FiveHcm.lib(RICHEDIT.obj) : error LNK2001: unresolved external symbol _OleUIPasteSpecialA@4
main.exe : fatal error LNK1120: 1 unresolved externals
* There are errors |
link error.... | Yunbg,
You have to link MS OleDlg.lib |
link in my own library | Dear Antonio,
Can you please advise me on how I can link in my library or prg-files?
Should we link in compiled files or plain prg files?
Best regards,
Otto |
link in my own library | Dear Otto,
You have to include your PRGs (or libraries) filenames in modharbour.hbp
[url:333fth0n]https://github.com/FiveTechSoft/mod_harbour/blob/master/windows/modharbour.hbp[/url:333fth0n]
in apache.prg add your functions names as "extern"
[url:333fth0n]https://github.com/FiveTechSoft/mod_harbour/blob/master/source/apache.prg[/url:333fth0n]
Finally run go64.bat and you will get your mod_harbour with your extra PRGs (or libraries) built in
[url:333fth0n]https://github.com/FiveTechSoft/mod_harbour/blob/master/windows/go64.bat[/url:333fth0n] |
link in my own library | Dear Antonio,
Thank you so much. I understand. How do I only include an external file for a single project without changing APACHE?
Best regards,
Otto |
link in my own library | You may use:
#include "myfile.prg"
better place it at the bottom of your main PRG
we use this in our developments <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
link in my own library | Dear Antonio,
Thank you so much.
Best regards,
Otto |
link para subir archivos | despues de batallar aqui dejo algunos
<!-- m --><a class="postlink" href="http://www.zshare.net/">http://www.zshare.net/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.speedyshare.com/">http://www.speedyshare.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://d.turboupload.com/d/">http://d.turboupload.com/d/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.savefile.com/">http://www.savefile.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.4shared.com/">http://www.4shared.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.filelodge.com/">http://www.filelodge.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://hyperupload.com/">http://hyperupload.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.mooload.com/">http://www.mooload.com/</a><!-- m -->
70MB - 300MB
<!-- m --><a class="postlink" href="http://www.mooload.com/">http://www.mooload.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.uploading.com/">http://www.uploading.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://storeandserve.com/">http://storeandserve.com/</a><!-- m -->
salu2
paco |
link para subir archivos | Paco,
<!-- w --><a class="postlink" href="http://www.mediafire.com">www.mediafire.com</a><!-- w -->
<!-- w --><a class="postlink" href="http://www.megaupload.com">www.megaupload.com</a><!-- w --> |
link to cash register | a base class to link to cash register protocol xon xoff |
link to pc on a lan | Dear friends,
Can I see in a windows or dialog all pc there are in a lan ? How I can make it ?
Can I link to a pc and read and write a dbf or an ini file ? How I can make it ?
can I have a small test ?
I hope yoour help
------ |
link to pc on a lan | Here is how I do it.
1. I have a password security sign-on for my app that identifies the user, and refers to a members.dbf that contains the ID number assigned to each allowed user. Upon sign-on, that user ID # is copied into a file-wide static memvar.
2. Upon completion of launching the main app, the program accesses a USERS.DBF containing two fields and creates a temporary record there with the user's ID# and name. This file has only three fields, one for the ID, one for the user's name, and another for a memo field used to store any message to be sent to the user.
3. Each time the user activates a program module within the app, the program checks his/her temporary USERS.DBF record to see if there is a message waiting there.
4. The system administrator has access to a function with a dialog box that displays a list of all users currently online (by listing the people signed on from USERS.DBF). A button on this dialog box enables recording a message in the memo field of the USER.DBF record of the person selected from the list. Another button enables sending one message to all users currently on line (like "please sign-off ASAP"). Any user activity, as mentioned in #3 above, causes the user to see the message sent.
5. When a user signs off of the app, his/her temp record is blanked so it can be reused by the next person who signs on.
I hope this concept helps.
- Roger |
link to pc on a lan | In point #1 above, I forgot to mention that the program also picks up the user's name from the members.dbf file. |
link to pc on a lan | thanks roger but I trying to found a simply sample to working ... |
linkando varios PRGs | Hola. Uso FW 2.3c, harbour y bcc55. He modificado el fichero de ejemplo buildh.bat pero no consigo linkar varios PRGs como hacía antes con
blinker fi menu @linkados
cómo he de hacerlo ?
Gracias |
linkando varios PRGs | Chocochester:
Tenes que repetir las lineas donde se llama al compilador (harbour):
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
Y las lineas donde se genera b32.bc para el bcc32:
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
Repitiendolas por cada prg. Si no queres complicarte podes usar cualquiera de las aplicaciones que hay para compilar (frontend, xmate, ajmake, etc, etc) donde es mucho mas sencillo configurar todo.
Saludos, |
linking Class TActiveX from FWH instead of xHB comercial | Hello,
How can I link the Tactivex class from FWH instead of the one from xHB ?
Antonio |
linking Class TActiveX from FWH instead of xHB comercial | Antonio,
Link FiveHX.lib before xHarbour libraries |
linking Class TActiveX from FWH instead of xHB comercial | Antonio,
I get this error
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1266<<<
Antonio |
linking Class TActiveX from FWH instead of xHB comercial | It looks as you are using xHB builder, right ? |
linking Class TActiveX from FWH instead of xHB comercial | Right.
Antonio |
linking Class TActiveX from FWH instead of xHB comercial | Antonio,
Please include fwh/source/classes/activex.prg as a PRG of your application. So it will get linked before. |
linux gcc compiler error help me. | Hi Antonio.
This code is test.
The compiler the error petty to catch
Can you make a build.sh file ?
lib, include file send to email.
Can you library additional method and Build.sh which it will make the possibility of decreasing it is?
Thank you.
[code:32vvmsgw]
#include "FiveLinux.ch"
FUNC Main()
loca oWnd, oBrw
DEFINE WINDOW oWnd TITLE "Testing Browses" SIZE 522, 317
@ 28, 2 BUTTON "_Ok" OF oWnd ACTION msginfo(TTIME())
@ 28, 10 BUTTON "_Exit" OF oWnd ACTION oWnd:End()
@ 28, 28 BUTTON "_Test" OF oWnd ACTION OPEN_PORT1(oWnd:hWnd, "testtetetete")
@ 28, 46 BUTTON "_Port" OF oWnd ACTION TEST()
ACTIVATE WINDOW oWnd
RETU NIL
/*----------------------------------------*/
#pragma BEGINDUMP
#include <hbapi.h>
//#include <hbdefs.h>
#include <gtk/gtk.h>
#define _LARGEFILE64_SOURCE 1
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <termios.h>
#define _DEFINE_FMP_TYPES_
#include <fmp.h>
#define PLAYING 1
#define PAUSED 0
#define FMPE_OK 0x00000000 /* No error */
#define FMPF_DVD 6 /* DVD demux */
#define NO_DRIVE 0xFF /* No DVD-ROM drive */
int peek = -1;
struct termios orig, new;
HB_FUNC( TTIME )
{
struct tm *tm_ptr;
int i;
char sm[50];
time_t the_time;
(void) time(&the_time);
tm_ptr = gmtime(&the_time);
sprintf(sm, "%02d:%02d:%02d", tm_ptr->tm_hour, tm_ptr->tm_min, tm_ptr->tm_sec);
hb_retc(sm);
}
HB_FUNC( TEST )
{
int fd;
int streamtype;
int bytesread=1,rc=FMPE_OK;
int buf, playfile_state;
int b_stopit = 0, b_getoutofit = 0;
streamtype=FMPF_DVD;
MPEGDriverEntry(NO_DRIVE);
FMPOpen(streamtype,32*1024,10, NULL, 0);
FMPPlay();
hb_retc("OK");
}
HB_FUNC( OPEN_PORT1 )
{
GtkWidget * hWnd, * hWndParent = NULL;
hWnd = hb_parnl(1);
CheckGtkInit();
if( gtk_window_list_toplevels() )
hWndParent = gtk_window_list_toplevels()->data;
hWnd = gtk_message_dialog_new( GTK_WINDOW( hWndParent ),
GTK_DIALOG_MODAL,
GTK_MESSAGE_INFO, GTK_BUTTONS_OK, hb_parc(2) );
gtk_window_set_transient_for( GTK_WINDOW( hWnd ), GTK_WINDOW( hWndParent ) );
gtk_window_set_policy( GTK_WINDOW( hWnd ), FALSE, FALSE, FALSE );
gtk_window_set_position( GTK_WINDOW( hWnd ), GTK_WIN_POS_CENTER );
gtk_dialog_run( GTK_DIALOG( hWnd ) );
gtk_widget_destroy( hWnd );
}
#pragma ENDDUMP
[/code:32vvmsgw]
this code is RMPLAYFILE ->Makefile
[code:32vvmsgw]
CFLAGS+=-D_BARBADOS_=1 -Wall -D_REENTRANT
INCLUDEDIR+=-I../include
LIBDIR+=-L../lib
ifeq ($(COMPILKIND),release)
CDEBUG=-O2
LDEBUG=-O2
else
CDEBUG=-g
LDEBUG=-g
endif
CFLAGS+=$(CDEBUG) $(INCLUDEDIR)
LDFLAGS+=$(LDEBUG) $(LIBDIR) -lpthread
progs = playfile.o
playfile: $(progs) ../lib/libEM84xx.so
$(CC) $(LDFLAGS) -lEM84xx $(progs) -o $@
ifeq ($(COMPILKIND),release)
strip $@
endif
clean:
$(RM) $(progs) *~ playfile
[/code:32vvmsgw]
this code is RMPLAYFILE ->playfile.c code
[code:32vvmsgw]
#define _LARGEFILE64_SOURCE 1
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <termios.h>
#define _DEFINE_FMP_TYPES_
#include "fmp.h"
#define PLAYING 1
#define PAUSED 0
int peek = -1;
struct termios orig, new;
void open_port()
{
if (tcgetattr(0,&orig)==-1)
{
printf("Could not tcgetattr");
exit(1);
}
new = orig;
/* settings for raw mode */
new.c_lflag &= ~ICANON;
new.c_lflag &= ~ECHO;
new.c_lflag &= ~ISIG;
new.c_cc[VMIN] = 1;
new.c_cc[VTIME] = 0;
if (tcsetattr(0,TCSANOW,&new)==-1)
{
printf("Could not tcsetattr");
exit(1);
}
}
void close_port()
{
tcsetattr(0, TCSANOW, &orig);
}
int kbhit()
{
char ch;
int nread;
if(peek != -1) return 1;
new.c_cc[VMIN] = 0;
tcsetattr(0, TCSANOW, &new);
nread = read(0, &ch, 1);
new.c_cc[VMIN] = 1;
tcsetattr(0, TCSANOW, &new);
if(nread == 1)
{
peek = ch;
return 1;
}
return 0;
}
int readch()
{
char ch;
if(peek != -1)
{
ch = peek;
peek = -1;
return ch;
}
read(0, &ch, 1);
return ch;
}
DWORD setOutputMode(DWORD newvgatv)
{
DWORD vgatv;
vgatv = FMPGet(FMPI_VIDEOOUT);
vgatv = vgatv & (~FMPV_VIDEOOUT_MODE_MASK);
vgatv = vgatv | newvgatv;
return FMPSet(FMPI_VIDEOOUT, vgatv);
}
int main(int argc,char **argv)
{
int fd;
int streamtype;
int bytesread=1,rc=FMPE_OK;
int buf, playfile_state;
int b_stopit = 0, b_getoutofit = 0;
if (argc!=3) {
fprintf(stderr,
"Syntax is playfile <streamtype> <filename>\n"
"<streamtype -> t (transport) d (dvd) s (system)\n"
" p (program) v (video) m (mpeg audio) a (mpeg2 ac3)>\n"
"Example: ./playfile s /samplempeg/movie.mpg\n"
"During the file playing use your keyboard:\n"
" 'r' to rewind from the beginning,\n"
" 'q' to stop, close and exit propely.\n"
);
exit(1);
}
switch (argv[1][0]) {
case 't':
streamtype=FMPF_TRANSPORT;
break;
case 'd':
streamtype=FMPF_DVD;
break;
case 's':
streamtype=FMPF_SYSTEM;
break;
case 'p':
streamtype=FMPF_PROGRAM;
break;
case 'v':
streamtype=FMPF_VIDEO;
break;
case 'm':
streamtype=FMPF_MPEG_AUDIO;
break;
case 'a':
streamtype=FMPF_AC3;
break;
default:
fprintf(stderr,
"Syntax is playfile <streamtype> <filename>\n"
"<streamtype -> t (transport) d (dvd) s (system)\n"
" p (program) v (video) m (mpeg audio) a (mpeg2 ac3)>\n"
"Example: ./playfile s /samplempeg/movie.mpg\n"
"During the file playing use your keyboard:\n"
" 'r' to rewind from the beginning,\n"
" 'q' to stop, close and exit propely.\n"
);
exit(1);
}
MPEGDriverEntry(NO_DRIVE);
FMPOpen(streamtype,32*1024,10, NULL, 0);
FMPPlay();
fd=open(argv[2],O_RDONLY|O_LARGEFILE);
if (fd==-1) {
perror("open failed");
exit(1);
}
open_port();
playfile_state = PLAYING;
while (rc==FMPE_OK && !b_getoutofit) {
while (bytesread && !b_stopit) {
FMP_BUFFER FMPBuf;
static int count=0;
if(kbhit())
{
buf = readch();
switch(buf)
{
case 'r':
b_stopit = 1;
fprintf(stdout,">> Rewind ...\n");
break;
case 'q':
b_stopit = 1;
b_getoutofit = 1;
break;
default:
break;
}
}
// get a pointer to a free buffer
rc = FMPGetBuffer (&FMPBuf, TRUE);
if (rc != FMPE_OK) {
printf ("FMPError : %s\n", FMPGetLastError(rc));
break;
}
// signals can cause harmless EINTR
while (((bytesread=read(fd,FMPBuf.pBuffer,FMPBuf.dwBufferSize))==-1)
&&(errno==EINTR));
if (bytesread==-1) bytesread=0;
FMPBuf.dwDataSize=bytesread;
// the buffer is ready to be queued
FMPPush (&FMPBuf);
count++;
#define ONEEVERY 20
if (count%ONEEVERY==0) printf("PTS %ld / STC %ld\n",
FMPGet (FMPI_PTS),
FMPGet (FMPI_STC));
}
FMPStop();
FMPPlay();
if(!b_getoutofit)
b_stopit = 0;
lseek (fd,0,SEEK_SET);
bytesread=1;
}
fprintf(stdout,">>Exited from playing loop !\n");
close_port();
close (fd);
FMPStop();
setOutputMode(FMPV_VIDEOOUT_VGA);
FMPClose();
MPEGDriverUnload();
fprintf(stdout,">>Driver is closed !\n");
exit(0);
}
[/code:32vvmsgw]
FiveLinux User. |
linux gcc compiler error help me. | We are reviewing it,
we provide you an answer asap, |
linux gcc compiler error help me. | We need fmp.h, thanks |
linux gcc compiler error help me. | [quote="Antonio Linares":35otkmf4]We need fmp.h, thanks[/quote:35otkmf4]
[code:35otkmf4]
#ifndef __FMP_h__
#define __FMP_h__
#ifdef __cplusplus
extern "C"{
#endif
/*+-------------------------------------------------------------------------
*
* Sigma Designs
* Copyright 1998 Sigma Designs, Inc.
*
*--------------------------------------------------------------------------*/
#define _MAX_STRING_ 256
#ifdef _DEFINE_FMP_TYPES_
typedef unsigned long DWORD;
typedef long LONG;
typedef unsigned short WORD;
typedef unsigned char BYTE;
typedef int BOOL;
#ifndef TRUE
#define TRUE 1
#endif // TRUE
#ifndef FALSE
#define FALSE 0
#endif // FALSE
#ifdef _UNICODE_
typedef unsigned short TCHAR;
#else
typedef char TCHAR;
#endif // _UNICODE_
#ifdef _BARBADOS_
typedef unsigned long long ULONGLONG;
#endif
#endif // _DEFINE_FMP_TYPES_
// Callback definition
typedef DWORD (*PFMPCALLBACK) (DWORD dwContext, DWORD dwMsg, DWORD dwValue);
typedef struct tagFMP_BUFFER{
BYTE *pBuffer; // Address of the buffer
DWORD dwBufferSize; // Size of the buffer
DWORD dwDataSize; // Size of valid data in the buffer
DWORD dwFlags; // Flags
DWORD dwFlagsEx; // Extended flags
DWORD pReserved[8]; // Reserved
} FMP_BUFFER, *PFMP_BUFFER;
//@struct FMP_OPENSTRUCT | Parameter sent to the Graph Manager upon opening
typedef struct tagFMP_OPENSTRUCT{
DWORD dwStructSize; // @field Size of the structure
DWORD dwFlags; // @field Open Flag
// @flag FMPF_TRANSPORT | Transport stream demux
// @flag FMPF_SYSTEM | System stream demux
// @flag FMPF_PROGRAM | Program stream demux
// @flag FMPF_VIDEO | Video stream (MPEG1/MPEG2)
// @flag FMPF_MPEG_AUDIO | MPEG Audio stream
// @flag FMPF_AC3 | AC3 Audio stream
// @flag FMPF_DVD | DVD demux
// @flag FMPF_SVCD | VCD/SVCD demux
// @flag FMPF_DISCPLAYBACK 0xFFFFFFFF |
DWORD dwSize; // @field Size of buffers
DWORD dwCount; // @field Number of buffers
PFMPCALLBACK pCallback; // @field FMP Callback
DWORD dwContext; // @field Callback context
BYTE bDriverNumber; // @field Driver Number
TCHAR* sFileName; // @field File Name
BYTE bFileSystem; // @field disk data access method
// @flag SYS_ACCESS | using the OS function
// @flag UDF_ACCESS | using UDF
// @flag ISO_ACCESS | using ISO9660
BYTE bDiscContent; // @field Disc Content (returned by the driver)
// @flag FMPC_DVD_VIDEO | DVD Video Disc
// @flag FMPC_VCD | Video CD Disc
// @flag FMPC_SVCD | Super Video CD Disc
} FMP_OPENSTRUCT, *PFMP_OPENSTRUCT;
// FMP Message Structure
typedef struct tagFMPmsg{
DWORD dwCommand;
DWORD dwArg1;
DWORD dwArg2;
DWORD dwArg3;
DWORD dwArg4;
DWORD dwArg5;
BYTE pBuffer[sizeof (FMP_OPENSTRUCT) + _MAX_STRING_];
} FMP_MSG, *PFMP_MSG;
// Open flags
#define FMPF_TRANSPORT 0 /* Transport stream demux. */
#define FMPF_SYSTEM 1 /* System stream demux */
#define FMPF_PROGRAM 2 /* Program stream demux */
#define FMPF_VIDEO 3 /* Video stream (MPEG1/MPEG2) */
#define FMPF_MPEG_AUDIO 4 /* MPEG Audio stream */
#define FMPF_AC3 5 /* AC3 Audio stream */
#define FMPF_DVD 6 /* DVD demux */
#define FMPF_SVCD 7 /* SVCD/VCD demux */
#define FMPF_CDDA 8 /* CDDA demux */
#define FMPF_DRIVEPOLLING 9 /* minimum graphmanager for Drive polling only */
#define FMPF_PES 10 /* pes stream support */
#define FMPF_AAC_CELP 11 /* AAC CELP stream support */
#define FMPF_PES_MPEG4 12 /* MPEG4 PES stream support */
#define FMPF_DISCPLAYBACK 0xFFFFFFFF
// Disc Content flags
#define FMPC_DVD_VIDEO 0 /* DVD Video Disc */
#define FMPC_VCD 1 /* Video CD Disc */
#define FMPC_SVCD 2 /* Super Video CD Disc */
#define FMPC_CDDA 4 /* CD audio */
#define FMPC_UNSUPPORTED 0xFE /* namely, CDI and HQVCD */
#define FMPC_UNKNOWN 0xFF /* for error management purpose */
// Tray management constant
#define FMPT_TRAYCHECK 10
#define FMPT_TRAYCHANGE 11
#define FMPT_TRAYCLOSE 1
#define FMPT_TRAYOPEN 0
// Used to specify the method to acces the files
#define SYS_ACCESS 0x00
#define UDF_ACCESS 0x01
#define ISO_ACCESS 0x02
#define DONTCARE_ACCESS 0xFF
// Buffer flags
enum tagFMP_PROPERTY_FLAGS
{
FMP_DATADISCONTINUITY = 0x1, /* Data discontinuity : data loss */
FMP_TIMEDISCONTINUITY = 0x2, /* PTS discontinuity */
FMP_TRICKMODE_START = 0x4, /* Trick Mode Starts */
FMP_TYPECHANGED = 0x8, /* Type of data has changed */
FMP_TIMEVALID = 0x10, /* PTS is valid */
FMP_ENDOFSTREAM = 0x20, /* End of stream */
FMP_TRICKMODE_END = 0x40, /* Trick Mode Ends */
FMP_TRICKMODE_SAMPLE = 0x80, /* A Trick Mode Sample */
FMP_SVCD_TM_2X = 0x100, /* SVCD trick mode speed 2x */
FMP_SVCD_TM_3X = 0x200, /* SVCD trick mode speed 3x */
FMP_SVCD_TM_4X = 0x400, /* SVCD trick mode speed 4x */
// FMP_SVCD_FF = 0x800,
FMP_SVCD_FR = 0x1000,
FMP_SVCD_AUTOPAUSE = 0x2000,
FMP_SVCD_SEQ_HDR = 0x4000,
FMP_SVCD_UPDATE_PTS_REF = 0x8000,
FMP_TRICKMODE_DVD = 0x10000,
FMP_SEEKINGOP_DVD = 0x20000,
FMP_SVCD_CDDA_TRACK = 0x40000 /* CDDA track on the VCD disk */
};
// flags for the dwFlagsEx field in the FMP_BUFFER structure
enum tagFMP_PROPERTY_FLAGS_EX
{
FMP_VIDEO_PES = 0x1,
FMP_AUDIO_PES = 0x2,
FMP_DVD_AUDIO_PES = 0x4
};
#define FMP_SVCD_FLAGS (0x0000FF80)
#define FMP_DVD_FLAGS (0x00010000)
// DriverNumber :
#define PRIMARY_MASTER 0x00 /* Drive is primary master */
#define SECONDARY_MASTER 0x02 /* Drive is secondary master */
#define NO_DRIVE 0xFF /* No DVD-ROM drive */
DWORD MPEGPowerOn (BYTE bDriverNumber);
DWORD MPEGPowerOff (void);
// Init MPEG driver
DWORD MPEGDriverEntry (BYTE bDriverNumber);
// Prepare to Unload the driver
DWORD MPEGDriverUnload (void);
// Open the MPEG driver (Push Mode)
DWORD FMPOpen (DWORD dwflags, DWORD dwSize, DWORD dwCount, PFMPCALLBACK pCallback, DWORD dwContext);
// Open the MPEG driver (Disc Playback)
DWORD FMPOpenDiscPlayback (PFMP_OPENSTRUCT pFMPOpenStruct);
// Close the MPEG driver
DWORD FMPClose (void);
// Give version and copyright information
DWORD FMPAbout( TCHAR* sVersion, TCHAR* sDate, TCHAR *sCopyright );
// Close a MPEG file and get ready to play another one
DWORD FMPCloseFile(void);
// Stop playing a MPEG file and get ready to restart playing it at its beginning
DWORD FMPStopFile(void);
// Really play a MPEG file
DWORD FMPPlayFile(char *);
// Start MPEG playback
DWORD FMPPlay (void);
// Stop MPEG playback
DWORD FMPStop (void);
// Pause MPEG playback
DWORD FMPPause (void);
// Flush internal FIFOs of the driver
DWORD FMPFlush (BOOL bGDF);
// Get a buffer from the memory manager
DWORD FMPGetBuffer (PFMP_BUFFER pBuffer, BOOL bBlockingCall);
// Push buffer into driver
DWORD FMPPush (PFMP_BUFFER pBuffer);
// Get & Set
DWORD FMPGet (DWORD dwIndex);
DWORD FMPSet (DWORD dwIndex, DWORD dwValue);
// set,get properties for Hwlib using rm84cmn.h
#include "rm84cmn.h"
DWORD FMPProperty(DWORD dwFlags, DWORD dwPropSet, DWORD dwPropId, DWORD dwPropFlags, void* pPropData, DWORD dwPropSizeIn, DWORD* pdwPropSizeOut);
// change the video port output dimensions
DWORD FMPSetVideoPortDimensions (DWORD Width, DWORD Height);
// Queries for a specific interface
// this interface is valid between FMPOpen and FMPClose
DWORD FMPQueryInterface (DWORD InterfaceId, void **ppv);
#include "ifmp.h"
// Picture Placement
DWORD FMPSetSource (DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY);
DWORD FMPSetVisibleSource (DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY);
DWORD FMPSetDestination (DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY);
DWORD FMPEnableOverlay (DWORD dwEnable);
DWORD FMPEnableFullScreen (DWORD dwEnable);
// Bitmap operation
DWORD FMPEnableOSD (DWORD dwEnable);
DWORD FMPShowBitmap (DWORD dwBitMap, DWORD dwAlphaBlendingFactor, DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY);
// Disc operations
DWORD FMPEjectDisc (void);
DWORD FMPLoadDisc (void);
DWORD FMPIsDiscLoaded(void);
DWORD FMPTrayOperation( DWORD dwFMPTAction);
// Get Last Error
const char* FMPGetLastError (DWORD dwError);
/*******************************************************************************
* DVD Functions
*******************************************************************************/
//Play a Title by Title number
DWORD TitlePlay (DWORD dwTitleNumber);
//Play from the beginning of a chapter specified by the Title number and the chapter number
DWORD ChapterPlay(BYTE bTitleNumber, WORD wChapterNumber);
//Play from the specified position of the Title by the Title number and Time
DWORD TimePlay(BYTE bTitleNumber, TCHAR* sTime);
//This command stops the current presentation and starts presentation from the specified position
//of the title by Time within the same title.
DWORD TimeSearch(TCHAR* sTime);
//Stop the current presentation and start the presentation from the beginning of PTT (Part_of_Title)
//specified by PTT numbers within the same Title.
DWORD ChapterSearch(WORD wChapterNumber);
//Stop the execution of the current Program Chain and play the GoUp Program Chain
//(specified in the current Program Chain)
DWORD GoUp(void);
//Stop the current presentation and start the presentation from the beginning
//of previous Program within the same Program Chain (PGC).
DWORD PrevPGSearch(void);
//Stop the current presentation and start the presentation from the beginning
//of the current Program within the same PGC.
DWORD TopPGSearch (void);
//Stop the current presentation and start the presentation from the beginning
//of the next Program within the same PGC.
DWORD NextPGSearch (void);
//The operation to scan play at the specified Speed.
//This user function includes scan play and slow playback for forward navigation
//at any speed (expect normal speed).
DWORD ForwardScan (WORD wSpeed, BOOL bFast);
//The operation to scan play at the specified Speed.
//This user function includes scan play and slow playback for backward navigation
//at any speed (expect normal speed).
DWORD BackwardScan (WORD wSpeed, BOOL bFast);
//Call the Menu in the Program Chain (PGC).
DWORD MenuCall (BYTE bMenuID);
//This operation returns from the Menu-space
DWORD Resume(void);
//This operation stops play for later resume of play
DWORD StopForResume(void);
//DVD Query attributes
DWORD DVDQueryAttribute(DWORD dwFlag, DWORD dwArg);
//Select the Buttons on the Menu Screen.
DWORD UpperButtonSelect(void);
DWORD LowerButtonSelect(void);
DWORD LeftButtonSelect(void);
DWORD RightButtonSelect(void);
//Activate the current Highlighted Button.
DWORD ButtonActivate(void);
//Activate the specified Highlighted Button.
DWORD ButtonSelectAndActivate(BYTE bButton);
//Operation to release Still.
DWORD StillOff(void);
//Pause the presentation.
DWORD PauseOn(void);
//Set the stream number of the Sub-Picture and whether the sub-picture is displayed or not.
DWORD SubPictureStreamChange (BYTE bStreamNumber, BOOL bDisplayFlag);
//Set the Stream number of the Audio.
DWORD AudioStreamChange (BYTE bStreamNumber);
//Select the language for System Menu according to the Language Code
DWORD MenuLanguageSelect (WORD dwCode);
//In Angle Block, change the Angle
DWORD AngleChange (BYTE bAngleNumber);
//Set the Parental Level
DWORD ParentalLevelSelect (BYTE bParentalLevel);
//Set the Country Code for Parental Management
DWORD ParentalCountrySelect (DWORD dwCountryCode);
//Change the mode of Audio Mixing mode for Karaoke.
DWORD KaraokeAudioPresentationMode (DWORD dwMode);
//Start or stop title repeat
DWORD RepeatTitle(void);
//Start of stop chapter repeat
DWORD RepeatChapter(void);
//Start AB repeat
DWORD RepeatAB(void);
//Clear Repeat AB;
DWORD ClearRepeatAB(void);
//Store bookmark
DWORD StoreBookmark(void *pBookmark);
//Resume playback from bookmark
DWORD ResumeBookmark(void *pBookmark);
//Stop the current presentation and start the presentation from the beginning
//of the return play item.
DWORD ReturnPGSearch (void);
//Stop the current presentation and start the presentation from the beginning
//of the default play item.
DWORD DefaultPGSearch (void);
// For VCD button selection
DWORD NumericSelections (BYTE sel);
// Fastforward (VCD and DVD)
DWORD FastForward (BYTE bSpeed);
// Rewind (VCD and DVD)
DWORD Rewind (BYTE bSpeed);
// Step and pause MPEG playback
DWORD FMPStep (DWORD nFrames);
// Region Code Control
DWORD RegionCodeControl (BOOL bInit, DWORD dwArg1, DWORD dwArg2);
/*******************************************************************************
* CD-Audio Commands
*******************************************************************************/
DWORD CDDANextTrack( void );
DWORD CDDAPrevTrack( void );
DWORD CDDAFastForward( DWORD dwSpeed );
DWORD CDDARewind( DWORD dwSpeed );
#define CDDA_MODE_REPEAT_NONE 0
#define CDDA_MODE_REPEAT_TRACK 1
#define CDDA_MODE_REPEAT_DISC 2
DWORD CDDARepeat( DWORD dwMode );
DWORD CDDAGetNumberOfTracks( BYTE* pbTrackNumber );
DWORD CDDAGetTrackDuration( BYTE bTrackNumber, DWORD *pbSeconds );
DWORD CDDAGetStatus( DWORD *pdwMode, BYTE *pbTrack, DWORD *pdwSeconds );
DWORD CDDAPlayTrack( DWORD dwTrack, DWORD dwMinutes, DWORD dwSeconds);
/*******************************************************************************
* Local Storage of Settings Commands
*******************************************************************************/
DWORD FMPWriteProfileWord( DWORD dwKeyIndex /* key index */, DWORD wValue /* value */);
DWORD FMPGetProfileWord ( DWORD dwKeyIndex /* key index */);
// DVD Index Keys
#define RMREG_LANGUAGECODE 0x00
#define RMREG_MENU_LANGUAGECODE 0x01
#define RMREG_AUDIO_LANGUAGECODE 0x02
#define RMREG_SUBPICTURE_LANGUAGECODE 0x03
#define RMREG_SUBPICTURE_DISPLAY_MODE 0x04
#define RMREG_USER_ASPECT_RATIO 0x05
#define RMREG_USER_VIDEO_OUTPUT_MODE 0x06
#define RMREG_COUNTRYCODE 0x07
#define RMREG_PARENTALCONTROL 0x08
#define RMREG_PASSW_LOW_WORD 0x09
#define RMREG_PASSW_HIGH_WORD 0x0A
#define RMREG_PASSW_STATE 0x0B
#define RMREG_AUTOPLAY 0x0C
#define RMREG_PBC_OFF 0x0D
#define RMREG_MACROVISION 0x0E
#define RMREG_REGION_CODE 0x0F
#define RMREG_AUDIO_TYPE 0x10
#define RMREG_OUTPUTMODE 0x11
#define RMREG_HDTV_RES 0x12
#define RMREG_MAX 0x13
/*******************************************************************************
* FMP Commands
*******************************************************************************/
#define FMP_DRIVERUNLOAD 0xDD /* Unload the MPEG driver */
#define FMP_CLOSEFILE 0xCC /* Close the file and get ready to play another one */
#define FMP_STOPFILE 0xBB /* Stop Playing a File and get ready to replay at the beginning */
#define FMP_PLAYFILE 0xAA /* Really Play a File */
#define FMP_OPEN 0x01 /* Open New Stream */
#define FMP_CLOSE 0x02 /* Close Stream */
#define FMP_PLAY 0x03 /* Play Stream */
#define FMP_PAUSE 0x04 /* Pause Stream */
#define FMP_STOP 0x05 /* Stop Stream */
#define FMP_SEEK 0x06 /* Seek inside the stream */
#define FMP_STEP 0x07 /* Step a number of frames inside the stream */
#define FMP_SET 0x09 /* Driver Settings : set */
#define FMP_GET 0x0A /* Driver Settings : get */
#define FMP_PUSH 0x0B /* Push model : push one buffer*/
#define FMP_FLUSH 0x0C /* Flush all the data inside the driver */
#define FMP_GETBUFFER 0x0D /* Get a buffer from the driver */
#define FMP_EJECT_DISC 0x0E /* issue an eject command to the dvdrom */
#define FMP_LOAD_DISC 0x0F /* issue a load command to the dvdrom */
#define FMP_SHOW_BITMAP 0x10 /* show a bitmap on the screen */
#define FMP_ENABLE_OSD 0x11 /* enable osd functionality */
#define FMP_SET_SOURCE 0x12 /* set the source capture dimensions */
#define FMP_SET_VISIBLE_SOURCE 0x13 /* set the dimensions in source to be zoomed in destination*/
#define FMP_SET_DESTINATION 0x14 /* set the destination rectangle */
#define FMP_ENABLE_OVERLAY 0x15 /* enable overlay functionality */
#define FMP_ENABLE_FULLSCREEN 0x16 /* enable full screen functionality */
#define FMP_IS_DISC_LOADED 0x17 /* Test whether a Disc is present in the drive */
#define FMP_QUERY_INTERFACE 0x18 /* Query Specific interfaces*/
#define FMP_REGISTER_INTERFACE 0x19 /* Register external interface */
#define FMP_SET_VIDEOPORT_DIMENSIONS 0x1a /* set dimensions of the output video port */
#define FMP_PROPERTY_GET 0x1b /* get properties */
#define FMP_PROPERTY_SET 0x1c /* get properties */
#define FMP_PROPERTY 0x1d /* reference to the FMPProperty() function, I need that flag. (Pascal) */
#define FMP_REGIONCONTROL 0x1e /* Region Code Control */
#define FMP_NAV_EOS 0x0100 /* Simulate EOS (internal function) */
#define FMP_NAV_CHECK_EOS 0x0101 /* Check if EOS is needed (internal function) */
#define FMP_NAV_AUTOPAUSE 0x0102 /* auto pause sector (SVCD) has finished */
#define FMP_NAV_COMMAND 0x0103 /* general navigation command */
#define FMP_TITLEPLAY 0x0200 /* DVD Title Play */
#define FMP_TIME_PLAY 0x0205 /* Time Play */
#define FMP_TIME_SEARCH 0x0208 /* Time Search */
#define FMP_RESUME 0x0210 /* Resume */
#define FMP_PREV_PG_SEARCH 0x020A /* Previous Program Search */
#define FMP_NEXT_PG_SEARCH 0x020C /* Next Program Search */
#define FMP_AST_STREAM_CHANGE 0x021B /* Audio Stream Change */
#define FMP_QUERY_ATTRIBUTE 0x0223
#define FMP_FORWARD_SCAN 0x020D /* Forward Scan */
#define FMP_BACKWARD_SCAN 0x020E /* Backward Scan */
#define FMP_REPEAT_TITLE 0x0224 /* Repeat Title */
#define FMP_REPEAT_CHAPTER 0x0225 /* Repeat Chapter */
#define FMP_REPEAT_AB 0x0226 /* AB Repeat */
#define FMP_CLEAR_REPEAT_AB 0x0227 /* AB Repeat */
#define FMP_STORE_BOOKMARK 0x0228 /* Store bookmark */
#define FMP_RESUME_BOOKMARK 0x0229 /* Restore bookmark */
#define FMP_DVD_PTT_PLAY 0x0201 /* Chapter Play */
#define FMP_DVD_STOP 0x0206 /* Stop */
#define FMP_DVD_GO_UP 0x0207 /* Go Up */
#define FMP_DVD_PTT_SEARCH 0x0209 /* Chapter Search */
#define FMP_DVD_TOP_PG_SEARCH 0x020B /* Top Program Search */
#define FMP_DVD_MENU_CALL 0x020F /* Menu Call */
#define FMP_DVD_UPPER_BUTTON_SELECT 0x0211 /* Upper Button Select */
#define FMP_DVD_LOWER_BUTTON_SELECT 0x0212 /* Lower Button Select */
#define FMP_DVD_LEFT_BUTTON_SELECT 0x0213 /* Left Button Select */
#define FMP_DVD_RIGHT_BUTTON_SELECT 0x0214 /* Right Button Select */
#define FMP_DVD_BUTTON_ACTIVATE 0x0215 /* Button Activate */
#define FMP_DVD_BUTTON_SELECT_AND_ACTIVATE 0x0216 /* Button Select and Activate */
#define FMP_DVD_STILL_OFF 0x0217 /* Still Off */
#define FMP_DVD_MENU_LANGUAGE_SELECT 0x021A /* Menu Language Select */
#define FMP_DVD_SPST_STREAM_CHANGE 0x021C /* Subpicture Stream Change */
#define FMP_DVD_ANGLE_CHANGE 0x021D /* Angle Change */
#define FMP_DVD_PARENTAL_LEVEL_SELECT 0x021F /* Parental Level Change */
#define FMP_DVD_PARENTAL_COUNTRY_SELECT 0x0220 /* Parental Country Change*/
#define FMP_DVD_KARAOKE_AUDIO_PRESENTATION 0x0221 /* Karaoke Audio Presentation change */
#define FMP_DVD_VIDEO_PRESENTATION_MODE_CHANGE 0x0222 /* Video Presentation Mode Change */
#define FMP_VCD_STOP_FOR_RESUME 0x0300
#define FMP_VCD_RETURN_PG_SEARCH 0x0306 /* VCD Return Play Item Search */
#define FMP_VCD_DEFAULT_PG_SEARCH 0x0307 /* VCD Default Play Item Search */
#define FMP_VCD_NUMERIC_SELECTIONS 0x0308 /* VCD Numeric Selection */
#define FMP_VCD_FAST_FORWARD 0x0309 /* VCD Numeric Selection */
#define FMP_VCD_REWIND 0x030A /* VCD Numeric Selection */
#define FMP_CDDA_NEXT_TRACK 0x0400
#define FMP_CDDA_PREV_TRACK 0x0401
#define FMP_CDDA_TRACK_DURATION 0x0402
#define FMP_CDDA_PLAY_TRACK 0x0403
#define FMP_WRITE_PROFILE_WORD 0x0500
#define FMP_GET_PROFILE_WORD 0x0501
#define FMP_ANALOG_OVERLAY 0x10000000 /* Analog Overlay */
#define FMP_EXTENDED_CMD_MASK 0xF0000000 /* Extended commands mask */
#define FMP_EXTENDED_SUBCMD_MASK 0x0FFFFFFF /* Extended subcommands mask */
/*******************************************************************************
// FMP Errors
*******************************************************************************/
#define FMPE_OK 0x00000000 /* No error */
#define FMPE_ERROR 0xFFFFFFFF /* Error : use getLastError to get the Error code */
#define FMPE_DRIVER_OPEN 0x00000001 /* Driver Already Open (FMPOpen) */
#define FMPE_DRIVER_NOT_OPEN 0x00000002 /* Driver Not Open (FMPClose) */
#define FMPE_CANNOT_OPEN_DRIVER 0x00000003 /* Cannot open the MPEG driver */
#define FMPE_NOT_ENOUGH_MEMORY 0x00000004 /* No more memory available */
#define FMPE_NOT_IMPLEMENTED 0x00000005 /* This function is not implemented */
#define FMPE_INVALID_INDEX 0x00000006 /* Invalid Index (settings)*/
#define FMPE_READ_ONLY 0x00000007 /* Read Only settings */
#define FMPE_PUSH_WHILE_STOPPED 0x00000008 /* Pushing data in Stopped state */
#define FMPE_INVALID_PARAMETER 0x00000009 /* Invalid Parameter */
#define FMPE_NO_MPEG_SERVER 0x0000000A /* No MPEG Server is running*/
#define FMPE_NO_ANALOG_OVERLAY_CAPABILITY 0x0000000B /* No Analog Overlay */
#define FMPE_INVALID_STREAM_TYPE 0x0000000C /* This function does not support the current stream type */
#define FMPE_ENTRY_MOD_INIT_FAILED 0x0000000D /* MPEGDriverEntry Failed : Module loader failed to initialize */
#define FMPE_ENTRY_HWL_INIT_FAILED 0x0000000E /* MPEGDriverEntry Failed : Failed to create MPEG Hardware driver*/
#define FMPE_ENTRY_DVDDEV_INIT_FAILED 0x0000000F /* MPEGDriverEntry Failed : Failed to create DVD-ROM device driver*/
#define FMPE_CDDA_FAILURE 0x00000010 /* CDDANextTrack : Failure or end of disk has been reached (or beginning)*/
#define FMPE_UNEXPECTED 0x00000011 /* Unexpected unknown errors for VCD and SVCD */
#define FMPE_DISABLED 0x00000012 /* The function is currently is disabled */
#define FMPE_INVALIDARG 0x00000013 /* The list offset requested is out of range */
#define FMPE_TIMERACTIVATED 0x00000014 /* The timer has been activated */
#define FMPE_FAILURE 0x00000015 /* For VCD and SVCD failure */
/*******************************************************************************
* FMP Settings
*******************************************************************************/
#define FMPI_TRICKMODE 0x00000001
#define FMPI_STC 0x00000002
#define FMPI_PTS 0x00000003
#define FMPI_AUDIO_COUNT 0x00000004
#define FMPI_AUDIO_SELECT 0x00000005
#define FMPI_NPT_REFERENCE 0x00000006
#define FMPI_STC_REFERENCE 0x00000007
#define FMPI_BRIGHTNESS 0x00000008
#define FMPI_SATURATION 0x00000009
#define FMPI_CONTRAST 0x0000000A
#define FMPI_LEFT_VOLUME 0x0000000B
#define FMPI_RIGHT_VOLUME 0x0000000C
#define FMPI_MUTE 0x0000000D
#define FMPI_AUDIO_OUTPUT 0x0000000E
#define FMPI_AUDIO_MODE 0x0000000F
#define FMPI_AUDIO_VCXO 0x00000010
#define FMPI_VIDEOOUT 0x00000011
#define FMPI_SOURCE_WINDOW 0x00000012
#define FMPI_VISIBLE_SOURCE_WINDOW 0x00000013
#define FMPI_DESTINATION_WINDOW 0x00000014
#define FMPI_OVERLAY_FLAGS 0x00000015
#define FMPI_VIDEO_SPEED 0x00000016
#define FMPI_VIDEOPORT_WINDOW 0x00000017
#define FMPI_VIDEOASPECT 0x00000018
#define FMPI_AUDIO_SPEED 0x00000019
#define FMPI_DISC_TYPE 0x00001001
#define FMPI_ANGLES_AVAILABLE 0x00001002
#define FMPI_AUDIO_STREAMS_AVAILABLE 0x00001003
#define FMPI_BUTTONS_AVAILABLE 0x00001004
#define FMPI_CAN_SCAN 0x00001005
#define FMPI_CAN_SEEK 0x00001006
#define FMPI_CURRENT_ANGLE 0x00001007
#define FMPI_CURRENT_AUDIO_STREAM 0x00001008
#define FMPI_CURRENT_BUTTON 0x00001009
#define FMPI_CURRENT_CHAPTER 0x0000100A
#define FMPI_CURRENT_DOMAIN 0x0000100B
#define FMPI_CURRENT_POSITION 0x0000100C
#define FMPI_CURRENT_SUBPICT_STREAM 0x0000100D
#define FMPI_CURRENT_TIME 0x0000100E
#define FMPI_CURRENT_TITLE 0x0000100F
#define FMPI_SUBPICTURE_ON 0x00001010
#define FMPI_SUBPICTURE_STREAM_AVAILABLE 0x00001011
#define FMPI_TITLES_AVAILABLE 0x00001012
#define FMPI_TOTAL_TITLE_TIME 0x00001013
#define FMPI_CURRENT_SPEED 0x00001014
#define FMPI_SVCD_TRICK_MODE 0x00002000
#define FMPI_CURRENT_TRACK 0x00002001
#define FMPI_SVCD_DISCONTINUITY 0x00002002
#define FMPI_SVCD_CURRENT_VOLUME 0x00002003
#define FMPI_SVCD_VOLUMES_AVAILABLE 0x00002004
#define FMPI_TRACKS_AVAILABLE 0x00002005
#define FMPI_TOTAL_TRACK_TIME 0x00002006
#define FMPI_CDDA_REPEAT_MODE 0x00002007
/*******************************************************************************
* FMP Messages
*******************************************************************************/
#define FMPM_ERROR 0x00000001
#define FMPM_STARVATION 0x00000002
#define FMPM_EOS 0x00000003
#define FMPM_DVDROM_NOT_READY 0x00000004
#define FMPM_AUTOPAUSE 0x00000005
#define FMPM_REGION_MISMATCH 0x00000006
#define FMPM_TRICK_MODE_CHANGE 0x00000007
#define FMPM_DVD_ANGLE_CHANGE 0x00000100
#define FMPM_DVD_ANGLES_BLOCK 0x00000101
#define FMPM_DVD_AUDIO_STREAM_CHANGE 0x00000102
#define FMPM_DVD_BUTTONS_CHANGE 0x00000103
#define FMPM_DVD_BUTTON_CHANGE 0x00000104
#define FMPM_DVD_PROGRAM_START 0x00000105
#define FMPM_DVD_CURRENT_TIME 0x00000106
#define FMPM_DVD_DOMAIN_CHANGE 0x00000107
#define FMPM_DVD_NO_FP_PGC 0x00000108
#define FMPM_DVD_PARENTAL_LEVEL_CHANGE 0x00000109
#define FMPM_DVD_PLAYBACK_STOPPED 0x0000010A
#define FMPM_DVD_STILL_OFF 0x0000010B
#define FMPM_DVD_STILL_ON 0x0000010C
#define FMPM_DVD_SUBPICTURE_STREAM_CHANGE 0x0000010D
#define FMPM_DVD_TITLE_CHANGE 0x0000010E
#define FMPM_DVD_VALID_UOPS_CHANGE 0x0000010F
#define FMPM_DVD_CHAPTER_CHANGE 0x00000110
#define FMPM_DVD_PARENTAL_ERROR 0x00000111
#define FMPM_DVD_PARENTAL_CHECK 0x00000112
#define FMPM_DVD_TITLE_AUTHENTICATION_ERR 0x00000113
#define FMPM_DVD_DISC_AUTHENTICATION_ERR 0x00000114
#define FMPM_DVD_END_PLAYBACK 0x00000115
#define FMPM_DVDROM_ERR 0x00000116
#define FMPM_DVD_MACROVISION_LEVEL 0x00000117
#define FMPM_DVD_FATAL_ERROR 0x00000118
#define FMPM_SVCD_PSD_END 0x00000200
#define FMPM_CDDA_PSD_END 0x00000300
/*******************************************************************************
* FMP Values
*******************************************************************************/
#define FMPV_TRICKMODE_NOCHANGE 0x00000000
#define FMPV_TRICKMODE_START 0x00000001
#define FMPV_TRICKMODE_END 0x00000002
// FMPI_VIDEOOUT related values.
// They have to match values in mpegcmn.h used by hardware library:
// Bit7,Bit6 = COMPOSITE, COMPONENT_YUV, COMPONENT_RGB
// Bit4 = SET_TV_AS_SOURCE, SET_TV_AS_USER
// Bit2 = SET_ONETOONE, SET_SCALE
// Bit3,Bit1 = SET_NTSC, SET_PAL, SET_PAL60, SET_PALM
// Bit5,Bit0 = SET_VGA, SET_TV, SET_HDTV
#define FMPV_VIDEOOUT_COMPONENT_MASK 0x00C0
#define FMPV_VIDEOOUT_COMPOSITE 0x0000
#define FMPV_VIDEOOUT_COMPONENT_YUV 0x0080
#define FMPV_VIDEOOUT_COMPONENT_RGB 0x00C0
#define FMPV_VIDEOOUT_MODE_MASK 0x0021
#define FMPV_VIDEOOUT_VGA 0x0000
#define FMPV_VIDEOOUT_TV 0x0001
#define FMPV_VIDEOOUT_HDTV 0x0020
#define FMPV_VIDEOOUT_STANDARDTV_MASK 0x000A
#define FMPV_VIDEOOUT_NTSC 0x0000
#define FMPV_VIDEOOUT_PAL 0x0002
#define FMPV_VIDEOOUT_PAL60 0x0008
#define FMPV_VIDEOOUT_PALM 0x000A
#define FMPV_VIDEOOUT_ONETOONE 0x0000
#define FMPV_VIDEOOUT_SCALE 0x0004
#define FMPV_VIDEOOUT_TV_AS_SOURCE 0x0010
#define FMPV_VIDEOOUT_TV_AS_USER 0x0000
// FMPI_VIDEOASPECT related values - they should be in sync
// with KSPROPERTY_MPEG2VID enum defined in cgraphm.h
// FMPV_VIDEOASPECT_4x3_16x9_ZOOM_ON is not recommended for DVD because
// the subpicture is not visible
// Syntax of the setting name:
// FMPV_VIDEOASPECT_InputAspectRatio_OutputAspectRatio_UserDisplayOption
// InputAspectRatio - video material aspect ratio: 4x3 or 16x9
// OutputAspectRatio - output display device: 4x3=standardTV or 16x9=wide TV
// UserDisplayOption - user choice if the input and output aspect ratio are not
// the same and if video material permit
#define FMPV_VIDEOASPECT_4x3_4x3_NORMAL 0x0002 // normal
#define FMPV_VIDEOASPECT_4x3_16x9_ZOOM_ON 0x0003 // upscale video to fit width keeping 4:3 aspect ratio, cropping top and bottom
#define FMPV_VIDEOASPECT_4x3_16x9_ZOOM_OFF 0x0004 // video not scaled horizontally centered, black on sides
#define FMPV_VIDEOASPECT_16x9_16x9_NORMAL 0x0005 // normal
#define FMPV_VIDEOASPECT_16x9_4x3_PANSCAN 0x0006 // pan and scan
#define FMPV_VIDEOASPECT_16x9_4x3_LETTERBOX 0x0007 // letter box
// FMPI_AUDIO_MODE related values.
// They have to match values in mpegcmn.h used by hardware library:
#define FMPV_AUDIO_MODE_STEREO 0x0000
#define FMPV_AUDIO_MODE_RIGHT_ONLY 0x0001
#define FMPV_AUDIO_MODE_LEFT_ONLY 0x0002
#define FMPV_AUDIO_MODE_MONOMIX 0x0003
/*******************************************************************************
* DVD Error Messages
*******************************************************************************/
#define DVDE_HANDLE 0x2000
#define DVDE_ARG 0x2100
#define DVDE_TITLENUMBER 0x2200
#define DVDE_PTTNUMBER 0x2300
#define DVDE_UNAUTHORIZED 0x2400
#define DVDE_OUT_OF_MEM 0x2500
#define DVDE_INCORRECT_STRUCT 0x2600
#define DVDE_NORESUME 0x2700
#define DVDE_PARENTAL_LOCK 0x2800
/*******************************************************************************
* DVD Menu ID
*******************************************************************************/
#define DVD_TITLE_ID 0x02
#define DVD_ROOT_ID 0x03
#define DVD_AUDIO_ID 0x05
#define DVD_SUBPICTURE_ID 0x04
#define DVD_ANGLE_ID 0x06
#define DVD_PTT_ID 0x07
/*******************************************************************************
* DVD Index
*******************************************************************************/
#define FMPI_DVD_VTS_NS 0x0A01 // for internal use only
#define DVDI_TT_SRPTI 0x0001
#define DVDI_AST_ATR 0x0002
#define DVDI_SPST_ATR 0x0003
#define DVDI_SPRM 0x0004
#define DVDI_VIDEO_MODE 0x0005
#define DVDI_TIME 0x0006 // for internal use only
#define DVDI_UOP_CTL 0x0007 // for internal use only
#define DVDI_STATE 0x0008 // for internal use only
#define DVDI_REPEATMODE 0x0009 // for internal use only
#define DVDI_VATR 0x000A // video attribute
#define DVDI_CURRENT_UOPS 0x000B
/*******************************************************************************
* System Parameters (SPRMs)
*******************************************************************************/
// (VI4-157)
#define M_LCD 0
#define ASTN 1
#define SPSTN 2
#define AGLN 3
#define TTN 4
#define VTS_TTN 5
#define TT_PGCN 6
#define PTTN 7
#define HL_BTTN 8
#define NV_TMR 9
#define NV_TMR_TT_PGCN 10
#define P_AMXMD 11
#define CTY_CD 12
#define PTL_LVL 13
#define P_CFGV 14
#define P_CFGA 15
#define INI_LCD_AST 16
#define INI_LCD_EXT_AST 17
#define INI_LCD_SPST 18
#define INI_LCD_EXT_SPST 19
#define PRC 20
/*******************************************************************************
* Structures
*******************************************************************************/
#define MAX_AST 8 // 0..7
#define MAX_SP 32 // 0..31
#define MAX_TT 100 // 1..99
#define MAX_AGL 10 // 1..9
// TT_SRPTI
typedef struct {
BYTE bTT_SRP_Ns;
BYTE bALG_Ns [MAX_TT];
WORD wPTT_Ns [MAX_TT];
} TT_SRPTI, * PTT_SRPTI;
// AST_ATR
typedef struct {
BYTE bAST_Ns;
BOOL bAvailable [MAX_AST];
BYTE bAudioCodingMode [MAX_AST];
BOOL bMultichannelExtenstion [MAX_AST];
BYTE bAudioType [MAX_AST];
BYTE bAudioApplicationMode [MAX_AST];
BYTE bQuantization [MAX_AST];
BYTE bfs [MAX_AST];
BYTE bNumberOfAudioChannels [MAX_AST];
WORD wLanguageCode [MAX_AST];
WORD wLanguageCodeExtension [MAX_AST];
BYTE bApplicationExtension [MAX_AST];
} AST_ATR, *PAST_ATR;
// SPST_ATR
typedef struct {
BYTE bSPST_Ns;
BOOL bAvailable [MAX_SP];
BYTE bSubpictureType [MAX_SP];
WORD wLanguageCode [MAX_SP];
WORD wLanguageCodeExtension [MAX_SP];
} SPST_ATR, *PSPST_ATR;
// VIDEO_MODE
typedef struct {
BYTE bAspectRatio;
BYTE bDisplayMode;
} VIDEO_MODE, *PVIDEO_MODE;
#define CRMBookmark_SIZE 9400
/******************************************************************************
* CDDA Index
*******************************************************************************/
#define CDDAI_TOC 0x0010
/*******************************************************************************
* Structures
*******************************************************************************/
typedef DWORD CDDA_CONTENT[99];
typedef DWORD* PCDDA_CONTENT[99];
/*******************************************************************************
* FMPAnalogOverlay Functions
*******************************************************************************/
DWORD FMPAnalogOverlay(DWORD SubCommand,DWORD dwArg1,DWORD dwArg2,
DWORD dwArg3,DWORD dwArg4,DWORD dwArg5);
// FMPAnalogOverlay subcommand
#define FMP_ANALOG_OVERLAY_ACCESS 0x1000
// FMPAnalogOverlay subcommand
#define FMP_ANALOG_OVERLAY_GET 0x1001
#define FMP_ANALOG_OVERLAY_SET 0x1002
// General commands
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAKEY 0x202 // vgakey selection (dwArg2=R<<16+G<<8+B. indexed mode is not supported)
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_DISPLAYRESOLUTION 0x203 // send dwArg2=depth (8,16,24,32), dwArg3=physical display width, dwArg4=physical display height
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_MODE 0x204 // mode selection (dwArg2=0(none),1(rectangle),2(overlay))
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_OVERLAY_CABLE_PRESENT 0x205 // get only: 1=yes, 0=no
// fine-tuning
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_XOFFSET 0x301
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_YOFFSET 0x302
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGACORRECTION 0x303
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGARUPPER 0x304
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGARLOWER 0x305
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAGUPPER 0x306
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAGLOWER 0x307
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGABUPPER 0x308
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGABLOWER 0x309
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_FINEADJUSTMENT 0x30a
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_HFREQUENCY 0x30b
#define FMP_ANALOG_OVERLAY_ATTRIBUTE_JITTERADJUSTMENT 0x30c
// FMPAnalogOverlay subcommand
#define FMP_ANALOG_OVERLAY_AUTOCALIBRATION 0x1003
/* then dwArg2=0x88 YOffset autocalibration (horizontal at top pattern)
dwArg2=0x89 XOffset autocalibration (vertical at left pattern)
dwArg2=0x8a Correction autocalibration (vertical offset right pattern)
dwArg2=0x80 Color (WHITE) autocalibration (full white vertical bar pattern)
dwArg2=0x82 Color (GREY) autocalibration (half white vertical bar pattern) */
/*******************************************************************************
* Misc Values
*******************************************************************************/
#define FMP_MPEG_SERVER "REALmagic/MPEGsvr"
#define FMP_MPEG_CLIENT "REALmagic/MPEGclient"
#ifdef __cplusplus
}
#endif
#endif
[/code:35otkmf4]
Lib, include with email check please.....
thank. |
linux gcc compiler error help me. | [code:2ytjsj0q]
fmp.h:20: error: redefinition of typedef ‘LONG’
./../../harbour/include/hbdefs.h:190: error: previous declaration of ‘LONG’ was here
fmp.h:22: error: redefinition of typedef ‘BYTE’
./../../harbour/include/hbdefs.h:181: error: previous declaration of ‘BYTE’ was here
fmp.h:23: error: redefinition of typedef ‘BOOL’
./../../harbour/include/hbdefs.h:168: error: previous declaration of ‘BOOL’ was here
In file included from yunb.prg:37:
fmp.h:232:21: error: rm84cmn.h: No such file or directory
fmp.h:241:18: error: ifmp.h: No such file or directory
[/code:2ytjsj0q]
We also need those missing .h files: rm84cmn.h, ifmp.h
Besides them, there are conflicts for LONG, BYTE and BOOL definitions. We can solve the BOOL one, but not sure about LONG and BYTE. We need to try it. |
linux gcc compiler error help me. | Hi Antonio.
The next file is SDK.
Thank you.
<!-- m --><a class="postlink" href="http://www.bongku.net/down/Netstream2000-1.6.73.0.zip">http://www.bongku.net/down/Netstream2000-1.6.73.0.zip</a><!-- m -->
yunbg1.
Fivelinux USER |
linux gcc compiler error help me. | You need to modify these lines in fmp.h:
#ifdef _DEFINE_FMP_TYPES_
typedef unsigned long DWORD;
// typedef long LONG;
typedef unsigned short WORD;
// typedef unsigned char BYTE;
// typedef int BOOL;
Now it compiles fine |
lisdir() problem | Hi,
If I call this lisdir() returns FALSE, even when I use lfn2sfn.
[code:3qhpoxp4] local cValue := GetEnv( "USERPROFILE")
msginfo(lfn2sfn(cValue+'\Local Settings\Application Data'),cValue+'\Local Settings\Application Data')
msginfo(lisdir(lfn2sfn(upper(cValue+'\Local Settings\Application Data'))))
msginfo(lisdir(upper(cValue+'\Local Settings\Application Data')))
[/code:3qhpoxp4]
Is there an error in lisdir()?
Thanks,
Marc |
lisdir() problem | i dont think so...
here in my testes both returns .T. ( directory exists !!! )
[code:22sz37e8]
local cValue := GetEnv( "USERPROFILE")
local cDirec := '\Configurações locais\Application Data'
msginfo(lIsDir(lfn2sfn(upper(cValue+cDirec))))
msginfo(lIsDir(cValue+cDirec))
[/code:22sz37e8]
regards |
lisdir() problem | Marc,
lIsDir() is not working with hidden directories. Try this sample:
[code:2ghgwhq9]
function Main()
local cValue := GetEnv( "USERPROFILE")
msginfo( cValue )
msginfo( lIsDir( cValue + "\Documents" ) )
return nil
[/code:2ghgwhq9] |
lisdir() problem | Antonio,
That seems to be the problem.
In FW1.9.5 it was working <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Regards,
Marc |
lisdir() problem | Marc,
Fixed. Simply add this function to your main PRG:
[code:p0rxoopw]
function lIsDir( cDirName ) // Checks an existing directory
local aResult := Directory( cDirName, "DHS" )
return Len( aResult ) == 1 .and. "D" $ aResult[ 1 ][ 5 ]
[/code:p0rxoopw]
sample:
[code:p0rxoopw]
function Main()
local cValue := GetEnv( "USERPROFILE")
msginfo( cValue )
msginfo( lIsDir( cValue + "\Application Data" ) )
return nil
[/code:p0rxoopw] |
lisdir() problem | Thanks Antonio,
It's working fine now!!
Regards,
Marc |
lisdir() problem | [quote="Antonio Linares":2r6yowuk]
[code:2r6yowuk]function lIsDir( cDirName ) // Checks an existing directory
local aResult := Directory( cDirName, "DHS" )
return Len( aResult ) == 1 .and. "D" $ aResult[ 1 ][ 5 ]
[/code:2r6yowuk]
[/quote:2r6yowuk]
a trailing \ in cDirName makes DIRECTORY returning the CONTENT of cDirName
[code:2r6yowuk]function lIsDir( cDirName ) // Checks an existing directory
Local aResult
If Right(cDirName,1)="" ; cDirName:=Left(cDirName,Len(cDirName)-1) ; Endif
aResult := Directory( cDirName, "DHS" )
Return Len( aResult ) == 1 .and. "D" $ aResult[ 1 ][ 5 ]
[/code:2r6yowuk]
FWH 7.07 - xH 0.99.71
Hi,
Davide |
lisdir() problem | Davide,
Thanks! |
list with excel | transform a list or report in excel how it works |
list of bitmaps | I must show many buttons as btnbmp on a dialog but I wish scroll all easy
I need btnbmp because the user must click on each button to open a different pocedure
I thinked to insert them on tpanel but it is not run vertical scroll
how I can make ..exit a sample please |
list of bitmaps | Search MetroPnel sample or with xbrowse with images |
list of bitmaps | CNavarro ,
perhaps you not understood me I not Know How make it
pls I sent you a test |
list of sections | If I Have a file .INI
If on this INI I have many sections
for sample
[test1]
...
[test2]
...
...
[test3]
...
...
can I have an array with the name of sections to insert into a xbrowse object ? |
list of sections | [code=fw:15gvicjb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> crlf CHR<span style="color: #000000;">(</span><span style="color: #000000;">13</span><span style="color: #000000;">)</span>+CHR<span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span> cIni <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> i<br /><span style="color: #00C800;">LOCAL</span> aSections := count_sections<span style="color: #000000;">(</span> cIni <span style="color: #000000;">)</span><br /><span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> aSections <span style="color: #000000;">)</span><br /> ? aSections<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span><br /><span style="color: #00C800;">NEXT</span> i<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> COUNT_SECTIONS<span style="color: #000000;">(</span> cIni <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> cString := MEMOREAD<span style="color: #000000;">(</span> cIni <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nRows := MLCOUNT<span style="color: #000000;">(</span> cString <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> iR<br /><span style="color: #00C800;">LOCAL</span> cRow<br /><span style="color: #00C800;">LOCAL</span> nCounted := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> aSections := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">FOR</span> iR := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nRows<br /> cRow := MEMOLINE<span style="color: #000000;">(</span> cString , , iR <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">AT</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"["</span> , cRow <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> .AND. <span style="color: #00C800;">AT</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"]"</span> , cRow <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> AADD<span style="color: #000000;">(</span> aSections , ALLTRIM<span style="color: #000000;">(</span> cRow <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">NEXT</span> iR<br /><br /><span style="color: #00C800;">RETURN</span> aSections</div>[/code:15gvicjb] |
list of sections | This is better:
[code=fw:1dbozbeg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> GETPVPROFSECTIONS<span style="color: #000000;">(</span> cIni <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> cBuf := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">65536</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aSec := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> GETPRIVATEPROFILESECTIONNAMES<span style="color: #000000;">(</span> cBuf, <span style="color: #000000;">65536</span>, cIni <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">WHILE</span> <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">(</span> cBuf, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> != CHR<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aSec, <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">(</span> cBuf, <span style="color: #00C800;">AT</span><span style="color: #000000;">(</span> CHR<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, cBuf <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cBuf = <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span> cBuf, <span style="color: #00C800;">AT</span><span style="color: #000000;">(</span> CHR<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, cBuf <span style="color: #000000;">)</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /> <span style="color: #00C800;">RETURN</span> aSec<br /><br /><br />DLL <span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GETPRIVATEPROFILESECTIONNAMES<span style="color: #000000;">(</span> cRetBuf AS LPSTR, nSize AS LONG, cFileName AS LPSTR <span style="color: #000000;">)</span> AS DWORD;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"GetPrivateProfileSectionNamesA"</span> LIB <span style="color: #ff0000;">"kernel32.dll"</span></div>[/code:1dbozbeg]
<!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
list of sections | thanks to all. |
list of sections | [code=fw:3fmmb6w7]<div class="fw" id="{CB}" style="font-family: monospace;">hIniFile := HB_ReadIni<span style="color: #000000;">(</span> <span style="color: #ff0000;">"MyINIfile.INI"</span> <span style="color: #000000;">)</span><br />aCompany:=HGetKeys<span style="color: #000000;">(</span> hIniFile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Returns an array of Section names</span></div>[/code:3fmmb6w7]
Regards
[b:3fmmb6w7]Anser[/b:3fmmb6w7] |
list of sections | [quote="anserkk":2d6ri3vd][code=fw:2d6ri3vd]<div class="fw" id="{CB}" style="font-family: monospace;">hIniFile := HB_ReadIni<span style="color: #000000;">(</span> <span style="color: #ff0000;">"MyINIfile.INI"</span> <span style="color: #000000;">)</span><br />aCompany:=HGetKeys<span style="color: #000000;">(</span> hIniFile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Returns an array of Section names</span></div>[/code:2d6ri3vd]
Regards
[b:2d6ri3vd]Anser[/b:2d6ri3vd][/quote:2d6ri3vd]
[img:2d6ri3vd]http://img197.imageshack.us/img197/3809/e5v8.jpg[/img:2d6ri3vd]
give me the right array
but it insert also another string "Main" |
list of sections | [code=fw:1fekoism]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// The last parameter .F. in HB_ReadIni() eliminates the entry MAIN while using HGetKeys()</span><br />hIniFile := HB_ReadIni<span style="color: #000000;">(</span> <span style="color: #ff0000;">"MyINIfile.INI"</span>, , ,.F. <span style="color: #000000;">)</span> <br />aCompany:=HGetKeys<span style="color: #000000;">(</span> hIniFile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Returns an array of Section names</span><br /> </div>[/code:1fekoism]
Regards
[b:1fekoism]Anser[/b:1fekoism] |
list of zipped files with date time and size | How can I obtain also date, time and dimension of every file present in zip file?
In this way I have only name.
aFiles := hb_GetFilesInZip( cPar2 )
FOR i := 1 TO LEN( aFiles )
? aFiles[ i ]
NEXT i
Many Thanks
Marco |
list of zipped files with date time and size | [code=fw:2x1go1w2]<div class="fw" id="{CB}" style="font-family: monospace;">aFiles := hb_GetFilesInZip<span style="color: #000000;">(</span> cPar2, .t. <span style="color: #000000;">)</span><br />XBROWSER aFiles <br /> </div>[/code:2x1go1w2] |
list of zipped files with date time and size | <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Many Thanks
Marco |
listar estructura e indices | Buenas tardes. existe algun utilitario que permita imprimir la estructura de uns dbf y sus indices asociados? gracias |
listar estructura e indices | Holá, IMPSTRUC.PRG.
Download completo aqui:
[url:c2kt0uvb]https://mega.nz/file/cBN03bQZ#OZ9TzAqgepeyj18Qddyxcys0q46u9xmXvfIyqAO865g[/url:c2kt0uvb]
Original:
[url:c2kt0uvb]http://forums.fivetechsupport.com/viewtopic.php?f=2&t=21604[/url:c2kt0uvb]
Regards, saludos. |
listbox | @ 3, 1 LISTBOX alm_ListBox ; FIELDS almacen->descrip,; // Campos que contendr transform(almacen->preveneur,"99,999.99"),; // el TBrowse. transform(almacen->preproeur,"99,999.99"),; transform(almacen->preneteur,"99,999.99"),; substr(almacen->nomprov,1,20),; transform(almacen->stoact,"99999"),; transform(almacen->stomin,"99999"),; transform(almacen->stomax,"99999"),; transform(almacen->consumo,"9,999,999"); FIELDSIZES 250,50,50,50,90,50,50,50,50 ; // Dimensiones de c/campo (en pixeles) HEADERS "DESCRIPCION", "PVP ", "P.EMPRESA","P.NETO COMPRA","NOM.PROV.","STOACT","STOCKMIN","STOCKMAX","CONSUMO"; SIZE 380, 150; // Tama¤o del TBrowse ON LEFT DBLCLICK alm_bajoBuscar(alm_diaBuscar,almacen->descrip); // Al doble click se editar el registro OF alm_diaBuscarDado este codigo cuando haces doble click entonces se ejecuta alm_bajoBuscar pero COMO HACER PARA QUE SE EJECUTE HACIENDO TAMBIEN ENTERGRACIAS |
listbox | Hola., Añade la linea de colorON LEFT DBLCLICK alm_bajoBuscar(alm_diaBuscar,almacen->descrip); // Al doble click se editar el registro OF alm_diaBuscar [b:15jglfup]alm_ListBox:bKeyDown := { |nKey,nFlags|If(nKey=13,alm_bajoBuscar(alm_diaBuscar,almacen->descrip) }[/b:15jglfup]Salu2 |
listbox | Angel,Bienvenido a los foros! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
listbox | can someone tell me a simple way to search/scroll in a listbox/combobox by typing the first characters of an item that is part of the listbox?
kind regards
jds |
listbox | Dear JDS,
you can enable the incremental search..
oClass:lIncSearch := .T.
hope it works for you. |
listbox | Is it possible to modify directly data in the fields of a listbox without open a whole record |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.