thanks, i see the examples.

byrpa

http://harbour.foroslatinos.net/



Viktor Szakáts wrote:
> 
> Hi Byron,
> 
> You're trying to call Windows API functions from .prg 
> code directly. Such functions don't exist in Harbour 
> on the .prg level.
> 
> You either need to create wrappers for them, or even 
> better try to use the COM functions in hbwin lib:
>    WIN_COMOPEN(), WIN_COMWRITE(), WIN_COMCLOSE().
> 
> (see examples in tests subdir in hbwin)
> 
> Viktor
> 
> On 2010 Apr 24, at 07:01, Byrpa wrote:
> 
>> 
>> Problem for printer, from pocket pc via bluetooth, i found the next
>> solution,
>> but i got one error of compilation, the code is:
>> 
>> *cText=file to print
>> 
>> static FUNCTION SendText( cText )
>> 
>> LOCAL i, hOut := CreateFile( "COM1:",GENERIC_WRITE, 0, 0, OPEN_EXISTING,
>> FILE_ATTRIBUTE_NORMAL )
>> IF hOut==-1
>> Mensaje("can not open port of printer")
>> ELSE
>> FOR i = 1 TO Len( cText )
>> WriteByte( hOut, Asc( SubStr( cText, i, 1 ) ) )
>> NEXT
>> CloseHandle( hOut )
>> ENDIF
>> RETURN NIL
>> 
>> this is the error, when compile
>> lecturas.o:lecturas.c:(.data+0x66c): undefined reference to
>> `HB_FUN_CREATEFILE'
>> lecturas.o:lecturas.c:(.data+0x67c): undefined reference to
>> `HB_FUN_WRITEBYTE'
>> lecturas.o:lecturas.c:(.data+0x6ac): undefined reference to
>> `HB_FUN_CLOSEHANDLE'
>> 
>> Thank you
>> 
>> How can print for COM9
>> Too try with COM_OPEN, COM_SEND and nothing
>> 
>> PD: CreateFile is native of harbour o not.
>> -- 
>> View this message in context:
>> http://old.nabble.com/Print-for-COM9-in-pocketPC-tp28348373p28348373.html
>> Sent from the Harbour - Dev mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> Harbour mailing list (attachment size limit: 40KB)
>> [email protected]
>> http://lists.harbour-project.org/mailman/listinfo/harbour
> 
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Print-for-COM9-in-pocketPC-tp28348373p28360998.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to