Antonio buenos dias
El valor de Msginfo( ::Fp )
regresa - 1
que es de error supongo ?
parece que no abre el puerto
gracias x todo
saludos
#define __TEST__
//definiciones para la pidion
#define BB_PRINTER_SEORO 0
#define BB_PRINTER_SEIKO 1
#define BB_PRINTER_NONE 2
#define BB_PRINT_DEFAULT 0
#define BB_PRINT_EMPHASIZE 1
#define BB_PRINT_CENTERALIGN 2
#define BB_PRINT_RIGHTALIGN 4
#define BB_PRINT_DOUBLEWIDTH 8
#define BB_PRINT_DOUBLEHEIGHT 16
#define BB_PRINT_DOUBLESIZE 24
#define BB_PRINT_UNDERLINE 32
#define BB_PRINT_DENSITY_60PERCENT 0
#define BB_PRINT_DENSITY_70PERCENT 1
#define BB_PRINT_DENSITY_80PERCENT 2
#define BB_PRINT_DENSITY_90PERCENT 3
#define BB_PRINT_DENSITY_100PERCENT 4
#define BB_PRINT_DENSITY_110PERCENT 5
#define BB_PRINT_DENSITY_120PERCENT 6
#define BB_PRINT_DENSITY_130PERCENT 7
#define BB_PRINT_DENSITY_140PERCENT 8
#define BB_PRINT_DENSITY_DEFAULT BB_PRINT_DENSITY_90PERCENT
#define BB_PRINT_DENSITY_MIN BB_PRINT_DENSITY_60PERCENT
#define BB_PRINT_DENSITY_MAX BB_PRINT_DENSITY_140PERCENT
#define BB_PRINT_LINESPACING_ONESIXTH 24
#define BB_PRINT_LINESPACING_DEFAULT 24
#define BB_PRINT_LINESPACING_MAX 255
#define BB_PRINT_BARCODE_UPCA 65
#define BB_PRINT_BARCODE_JAN13 67
#define BB_PRINT_BARCODE_JAN8 68
#define BB_PRINT_BARCODE_CODE39 69
#define BB_PRINT_BARCODE_ITF 70
#define BB_PRINT_BARCODE_CODABAR 71
#define BB_PRINT_BARCODE_CODE93 72
#define BB_PRINT_BARCODE_CODE128 73
#define BB_PRINT_BARCODE_CODE128A 73
#define BB_PRINT_BARCODE_CODE128B 74
#define BB_PRINT_BARCODE_CODE128C 75
#define BB_PRINT_BARCODE_WIDTH_THIN 2
#define BB_PRINT_BARCODE_WIDTH_NORMAL 3
#define BB_PRINT_BARCODE_WIDTH_THICK 4
#define BB_PRINT_BARCODE_WIDTH_MORETHICK 5
#define BB_PRINT_BARCODE_WIDTH_MOSTTHICK 6
#define BB_PRINT_BARCODE_ALIGN_LEFT 0
#define BB_PRINT_BARCODE_ALIGN_CENTER 2
#define BB_PRINT_BARCODE_ALIGN_RIGHT 4
#define BB_PRINT_BITMAP_NORMAL 0
#define BB_PRINT_BITMAP_DOUBLE_HEIGHT 1
#define BB_PRINT_BITMAP_DOUBLE_WIDTH 2
#define BB_PRINT_BITMAP_DOUBLE 3
#define BB_PRINT_BITMAP_ALIGN_CENTER 4
#define BB_PRINT_BITMAP_ALIGN_RIGHT 8
#define BB_PRINT_FONTTYPE_42 0
#define BB_PRINT_FONTTYPE_40 1
#define BB_PRINT_FONTTYPE_32 2
#define BB_PRINT_FONTSET_ASCII 0
#define BB_PRINT_FONTSET_HANGUL 1
#define BB_PRINT_FONTSET_SYMBOL 2
#define BB_PRINT_FONTSET_THAI 3
#include "FWCE.ch"
#include "vKey.ch"
#include "winapi.ch"
#include "DbInfo.ch"
#define SISTEMA "Jose-Pocket-Pc"
#define RDD_SISTEMA 'DbfCdx'
#ifdef __TEST__
Function Main
ProvaStampaPidion()
Return Nil
#endif
FUNCTION ProvaStampaPidion()
LOCAL i
//Prt_ProvaStampa()
Prt_Open()
Prt_Init()
Prt_PrintText( AnsiToWide( "Prova Riga 1" + CRLF ), BB_PRINT_DEFAULT )
Prt_PrintText( AnsiToWide( "Prova Riga 2" + CRLF ), BB_PRINT_CENTERALIGN )
Prt_PrintText( AnsiToWide( "Prova Riga 3" + CRLF ), BB_PRINT_RIGHTALIGN )
Prt_PrintText( AnsiToWide( "Prova Riga 4" + CRLF ), BB_PRINT_DOUBLEWIDTH )
Prt_PrintText( AnsiToWide( "Prova Riga 5" + CRLF ), BB_PRINT_DOUBLEHEIGHT )
Prt_PrintText( AnsiToWide( "Prova Riga 6" + CRLF ), BB_PRINT_DOUBLESIZE )
Prt_PrintText( AnsiToWide( "Prova Riga 7" + CRLF ), BB_PRINT_UNDERLINE )
Prt_PrintText( AnsiToWide( "Prova Riga 8" + CRLF ), BB_PRINT_CENTERALIGN + BB_PRINT_UNDERLINE )
/*
#define BB_PRINT_EMPHASIZE 1
#define BB_PRINT_CENTERALIGN 2
#define BB_PRINT_RIGHTALIGN 4
#define BB_PRINT_DOUBLEWIDTH 8
#define BB_PRINT_DOUBLEHEIGHT 16
#define BB_PRINT_DOUBLESIZE 24
#define BB_PRINT_UNDERLINE 32
*/
FOR i := 1 TO 4
Prt_PrintText( AnsiToWide( CRLF ), BB_PRINT_DEFAULT )
NEXT
//Sleep(100)
Prt_Close()
msginfo("Chiusa")
RETURN NIL
********
FUNCTION Prt_LineFeedByLine( nRighe )
********
LOCAL i
DEFAULT nRighe := 1
FOR i := 1 TO nRighe
Prt_PrintText( AnsiToWide( CRLF ), BB_PRINT_DEFAULT )
NEXT
RETURN NIL
/// programas para comunicarsze con la impresora de pidion
#pragma BEGINDUMP
#include "hbapi.h"
#include "windows.h"
#include "bbappapi.h"
#include "bberror.h"
static HBBPRINTER hPrinter;
HB_FUNC( PRT_OPEN )
{
hPrinter = BBPrinterOpen( 0 );
if ( !hPrinter )
{
return;
}
}
HB_FUNC( PRT_CLOSE )
{
DWORD dwRet = BBPrinterWaitUntilPrintEnd( hPrinter );
BBPrinterClose( hPrinter );
}
HB_FUNC( PRT_INIT )
{
BBPrinterSetLineSpacing( hPrinter, 8 ); // Set line spacing 1/18 inch.
BBPrinterSetDensity( hPrinter, BB_PRINT_DENSITY_100PERCENT ); // Set density 100%
BBPrinterInit( hPrinter );
}
HB_FUNC( PRT_PRINTBITMAP )
{
BBPrinterPrintBitmap( hPrinter, (LPCTSTR) hb_parc(1), BB_PRINT_BITMAP_NORMAL );
}
HB_FUNC( PRT_PRINTTEXT )
{
BBPrinterPrint( hPrinter, (LPCTSTR)hb_parc(1), (DWORD)hb_parnl(2) );
}
HB_FUNC( PRT_PROVASTAMPA )
{
HBBPRINTER hPrinter = BBPrinterOpen( 0 );
if ( !hPrinter )
{
return;
}
BBPrinterSetLineSpacing( hPrinter, 8 ); // Set line spacing 1/18 inch.
BBPrinterSetDensity( hPrinter, BB_PRINT_DENSITY_100PERCENT ); // Set density 100%
BBPrinterInit( hPrinter );
BBPrinterPrint( hPrinter, _T("LineSpacing 1/6, Density 60% \n"), BB_PRINT_DEFAULT );
BBPrinterPrint( hPrinter, _T("LineSpacing 1/6, Density 60% \n"), BB_PRINT_DEFAULT );
BBPrinterPrint( hPrinter, _T("LineSpacing 1/6, Density 60% \n"), BB_PRINT_DEFAULT );
BBPrinterPrint( hPrinter, _T("LineSpacing 1/6, Density 60% \n"), BB_PRINT_DEFAULT );
BBPrinterPrint( hPrinter, _T("LineSpacing 1/6, Density 60% \n"), BB_PRINT_DEFAULT );
DWORD dwRet = BBPrinterWaitUntilPrintEnd( hPrinter );
BBPrinterClose( hPrinter );
}
//LPCTSTR
//BBPrinterPrint( hPrinter, _T("LineSpacing 1/6, Density 60% \n"), BB_PRINT_DEFAULT );
//BBPrinterInit( hPrinter );
//BBPrinterWaitUntilPrintEnd( hPrinter );
//BBPrinterClose( hPrinter );
#pragma ENDDUMP
┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for Pocket PC - September 2006 Harbour development power │▄
│ (c) FiveTech, 1993-2006 for Microsoft Windows Pocket PC │█
└────────────────────────────────────────────────────────────────────────────┘█
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Compiling...
PER MOBITRON = NO
PER JUPITER = SI
Harbour Compiler Alpha build 46.2 (Flex)
Copyright 1999-2006, http://www.harbour-project.org/
Compiling 'prova1.prg' and generating preprocessed output to 'prova1.ppo'...
winapi.ch(128) Warning I0001 Redefinition or duplicate definition of #define CB
S_SIMPLE
winapi.ch(129) Warning I0001 Redefinition or duplicate definition of #define CB
S_DROPDOWN
winapi.ch(130) Warning I0001 Redefinition or duplicate definition of #define CB
S_DROPDOWNLIST
Lines 224, Functions/Procedures 3
Generating C source output to 'prova1.c'... Done.
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
Copyright (C) Microsoft Corp 1984-2002. All rights reserved.
prova1.c
Creating library prova1.lib and object prova1.exp
* Application successfully built 10.51.36,27
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Pocket PC - September 2006 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2006 for Microsoft Windows Pocket PC ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set mobitron=c:\lavwin\teve\mobitron
set jupiterpath=c:\wilson\cybercel\cypocket
set fwdir=c:\fwppc
set hdir=c:\harbour_ce
set vcdir=c:\vce
set include=%vcdir%\include\arm;%hdir%\include;%mobitron%\inc;%jupiterpath%;
set lib=%vcdir%\lib;%hdir%\lib;
ECHO PER MOBITRON = %CONMOBITRON%
ECHO PER JUPITER = %CONJUPITER%
IF %CONMOBITRON%==SI goto COMPMOBI
IF %CONJUPITER%==SI goto COMPJUPITER
%hdir%\bin\harbour %1 /w1 /n /i%fwdir%\include;%hdir%\include /p %2 %3 > clip.log
GOTO AVANTI
:COMPMOBI
%hdir%\bin\harbour %1 /w1 /n /dMOBITRONCOMPILA /i%fwdir%\include;%hdir%\include /p %2 %3 > clip.log
GOTO AVANTI
:COMPJUPITER
%hdir%\bin\harbour %1 /w1 /n /dJUPITERCOMPILA /i%fwdir%\include;%hdir%\include /p %2 %3 > clip.log
GOTO AVANTI
:AVANTI
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
%vcdir%\bin\clarm -TP -W3 -c /DARM /DUNICODE /I%hdir%\include /I%fwdir%\include /I"C:\Programmi\Windows CE Tools\wce400\STANDARDSDK\Mfc\Include" %1.c
:ENDCOMPILE
IF EXIST %1.rc %vcdir%\bin\rc -r -d_CE %1
IF EXIST menus.rc %vcdir%\bin\rc -r -d_CE menus.rc
echo %1.obj > msvc.tmp
echo %fwdir%\lib\FiveCE.lib %fwdir%\lib\FiveCEC.lib >> msvc.tmp
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
REM echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\codepage.lib >> msvc.tmp
echo %vcdir%\lib\arm\coredll.lib >> msvc.tmp
echo %vcdir%\lib\arm\corelibc.lib >> msvc.tmp
echo %vcdir%\lib\arm\aygshell.lib >> msvc.tmp
echo %vcdir%\lib\arm\ws2.lib >> msvc.tmp
echo %vcdir%\lib\arm\mfcce400.lib >> msvc.tmp
REM echo %vcdir%\lib\arm\ole32.lib >> msvc.tmp
echo %vcdir%\lib\arm\ceshell.lib >> msvc.tmp
echo %vcdir%\lib\arm\commctrl.lib >> msvc.tmp
echo %vcdir%\lib\arm\wininet.lib >> msvc.tmp
REM ZIP
REM echo \lavwin\teve\zlibce.lib >> msvc.tmp
REM MOBITRON - ECLIPSE
REM IF %MOBITRON%=="NO" GOTO :NOMOBITRON
REM Wilson echo \lavwin\teve\mobitron\lib\barcode.lib >> msvc.tmp
REM echo \lavwin\teve\mobitron\lib\printerNET.lib >> msvc.tmp
REM Wilson echo \lavwin\teve\mobitron\lib\printerAPI.lib >> msvc.tmp
REM Wilson echo \lavwin\teve\mobitron\lib\beep.lib >> msvc.tmp
REM Wilson echo \lavwin\teve\mobitron\lib\SerialLibrary.lib >> msvc.tmp
REM :NOMOBITRON
REM IF %JUPITER%=="NO" GOTO :NOJUPITER
echo bbappapi.lib >> msvc.tmp
echo bbsysapi.lib >> msvc.tmp
REM :NOJUPITER
IF EXIST %1.res echo %1.res >> msvc.tmp
IF EXIST menus.res echo menus.res >> msvc.tmp
IF %CONJUPITER%==SI goto LINKJUPITER
%vcdir%\bin\link @msvc.tmp /nologo /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:ARM
GOTO DOPOLINK
:LINKJUPITER
%vcdir%\bin\link @msvc.tmp /nologo /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:THUMB
:DOPOLINK
rem delete temporary files
@del %1.c
@del %1.obj
@del %1.exp
@del %1.lib
REM @del %1.ppo
@del msvc.tmp
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built %TIME%
GOTO EXIT
ECHO
:LINKERROR
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
:SINMOBITRON
echo NO MOBITRON
:EXIT
CLS
SET CONMOBITRON=NO
SET CONJUPITER=SI
call build2.bat jose_pok
rem ut\cecopy teve.exe "dev:\Storage Card\teve\teve.exe"
Return to FiveWin para Pocket PC
Users browsing this forum: No registered users and 9 guests