tDosPrn

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

tDosPrn

Post by Jeff Barnes »

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

oPrn:=TDosPrn():New(cPrnCom)
This command works fine in FWH.

Any idea what I am missing?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: tDosPrn

Post by Richard Chidiak »

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


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
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: tDosPrn

Post by Jeff Barnes »

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?i ... ss_tdosprn
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
Post Reply