tDosPrn

tDosPrn

Postby Jeff Barnes » Sat Jan 29, 2011 1:33 pm

Hi,

I am working on adding a bluetooth printer to my pocket pc app but when I try to compile I get the following:

┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for Pocket PC - October 2008 Harbour development power │▄
│ (c) FiveTech, 1993-2008 for Microsoft Windows Pocket PC │█
└────────────────────────────────────────────────────────────────────────────┘█
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Compiling...
Harbour 1.0.1dev Intl. (Rev. 9361)
Copyright (c) 1999-2008, http://www.harbour-project.org/
Compiling 'EzSatPPC.prg' and generating preprocessed output to 'EzSatPPC.ppo'...

Lines 3923, Functions/Procedures 40
Generating C source output to 'EzSatPPC.c'... Done.
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
Copyright (C) Microsoft Corp 1984-2002. All rights reserved.

EzSatPPC.c
EzSatPPC.obj : error LNK2001: unresolved external symbol HB_FUN_TDOSPRN
EzSatPPC.exe : fatal error LNK1120: 1 unresolved externals
* Linking errors *


It is this line that causes the problem:
Code: Select all  Expand view
oPrn:=TDosPrn():New(cPrnCom)


This command works fine in FWH.

Any idea what I am missing?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: tDosPrn

Postby Richard Chidiak » Tue Feb 01, 2011 11:30 am

Jeff

Tdosprn does not work with fw ppc

anyway bluetooth printing is similar to com printing , tdosprn will not be useful in this case

this is a sample code i use, you can find samples by searching this forum

you can also write to an ascii txt file and then use

Sendblue( MemoRead(cfile)) // function below

Hth

Richard
Code: Select all  Expand view


STATIC FUNCTION SENDBLUE(ctext)
LOCAL i, hOut

DPTCOM := "COM5:"   // you need to check the port on your ppc

hOut := CreateFile( DPTCOM,GENERIC_REWRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL )
IF hOut==-1
   MsgStop("xxxxxx error Port not found")
 ELSE
   FOR i = 1 TO Len( cText )
      WriteByte( hOut, Asc(SubStr( cText, i, 1 ) ) )
   NEXT
   CloseHandle( hOut )
ENDIF
return nil
 
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: tDosPrn

Postby Jeff Barnes » Tue Feb 01, 2011 1:19 pm

Hi Richard,

Thanks, I will give your solution a try. It might actually work better for me since I can build the text file as I go ... no need to go back and forth through my data at the end of collection :D

Just an FYI ...

I was able to get the tDosPrn working perfectly with the Bluetooth and FWH.
I thought tDosPrn was available on the Pocket PC because there is an entry on the Wiki for it :(

http://wiki.fivetechsoft.com/doku.php?id=fwppc_class_tdosprn
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 16 guests