by KRCNET » Fri Nov 06, 2009 12:35 pm
///////////////////////////////////////////////////////////////////////////////
//
// FastRepH.PRG
//
// Copyright:
// Spirin Sergey, Paritet Soft, (c) 1992-2008. All rights reserved.
//
// Contents:
// Source File for frReportManager and other classes for
// "FastReport for [x]Harbour"
//
///////////////////////////////////////////////////////////////////////////////
#pragma BEGINDUMP
#include "windows.h"
#include "hbapiitm.h"
#include "hbvm.h"
#include "hbapirdd.h"
#include "hbxvm.h"
typedef void *pointer;
typedef void (*proc_)(void);
typedef void (*proc_I)(long param1);
typedef void (*proc_IP) (int funcnum, pointer adr);
typedef void (*proc_C)(char * param);
typedef void (*proc_IC)(int param1, char * param2);
typedef void (*proc_CC)(char * param1, char * param2);
typedef void (*proc_CCC)(char * param1, char * param2, char * param3);
typedef void (*proc_IIII)(long param1, long param2, long param3, long param4);
typedef LONG (*func__I)(void);
typedef LONG (*func_I_I)(long param);
typedef LONG (*func_C_I)(char * param);
typedef LONG (*func_II_I)(long param1, long param2);
typedef LONG (*func_IC_I)(long param1, char * param2);
typedef LONG (*func_CC_I)(char * param1, char * param2);
typedef LONG (*func_CCC_I)(char * param1, char * param2, char * param3);
typedef LONG (*func_CCI_I)(char * param1, char * param2, long param3);
typedef LONG (*func_III_I)(long param1, long param2, long param3);
typedef LONG (*func_CIII_I)(char * param1, long param2, long param3, long param4);
typedef LONG (*func_CICCCCCCCC_I)(char * param1, long param2, char * param3, char * param4, char * param5,
char * param6, char * param7, char * param8, char * param9, char * param10);
HB_FUNC( FRLOAD )
{
hb_retnl((long)(HMODULE)LoadLibrary(hb_parc(1)));
}
HB_FUNC( GETFRPROCADDRESS )
{
hb_retnl((long)(FARPROC)GetProcAddress((HMODULE)hb_parnl(1) , hb_parc(2)));
}
HB_FUNC( FRUNLOAD )
{
FreeLibrary((HMODULE)hb_parnl(1));
}
HB_FUNC( CALL_PROC_ )
{
proc_ CurProc = (proc_)hb_parnl(1);
CurProc();
}
HB_FUNC( CALL_PROC_I )
{
proc_I CurProc = (proc_I)hb_parnl(1);
CurProc(hb_parnl(2));
}
HB_FUNC( CALL_PROC_C )
{
proc_C CurProc = (proc_C)hb_parnl(1);
CurProc(hb_parc(2));
}
HB_FUNC( CALL_PROC_IC )
{
proc_IC CurProc = (proc_IC)hb_parnl(1);
CurProc(hb_parnl(2), hb_parc(3));
}
HB_FUNC( CALL_PROC_CC )
{
proc_CC CurProc = (proc_CC)hb_parnl(1);
CurProc(hb_parc(2), hb_parc(3));
}
HB_FUNC( CALL_PROC_CCC )
{
proc_CCC CurProc = (proc_CCC)hb_parnl(1);
CurProc(hb_parc(2), hb_parc(3), hb_parc(4));
}
HB_FUNC( CALL_PROC_IIII )
{
proc_IIII CurProc = (proc_IIII)hb_parnl(1);
CurProc(hb_parnl(2), hb_parnl(3), hb_parnl(4), hb_parnl(5));
}
HB_FUNC( CALL_FUNC__I )
{
func__I CurFunc = (func__I)hb_parnl(1);
hb_retnl(CurFunc());
}
HB_FUNC( CALL_FUNC_I_I )
{
func_I_I CurFunc = (func_I_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parnl(2)));
}
HB_FUNC( CALL_FUNC_C_I )
{
func_C_I CurFunc = (func_C_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parc(2)));
}
HB_FUNC( CALL_FUNC_II_I )
{
func_II_I CurFunc = (func_II_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parnl(2), hb_parnl(3)));
}
HB_FUNC( CALL_FUNC_IC_I )
{
func_IC_I CurFunc = (func_IC_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parnl(2), hb_parc(3)));
}
HB_FUNC( CALL_FUNC_CC_I )
{
func_CC_I CurFunc = (func_CC_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parc(2), hb_parc(3)));
}
HB_FUNC( CALL_FUNC_CCC_I )
{
func_CCC_I CurFunc = (func_CCC_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parc(2), hb_parc(3), hb_parc(4)));
}
HB_FUNC( CALL_FUNC_CCI_I )
{
func_CCI_I CurFunc = (func_CCI_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parc(2), hb_parc(3), hb_parnl(4)));
}
HB_FUNC( CALL_FUNC_III_I )
{
func_III_I CurFunc = (func_III_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parnl(2), hb_parnl(3), hb_parnl(4)));
}
HB_FUNC( CALL_FUNC_CIII_I )
{
func_CIII_I CurFunc = (func_CIII_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parc(2), hb_parnl(3), hb_parnl(4), hb_parnl(5)));
}
HB_FUNC( CALL_FUNC_CICCCCCCCC_I )
{
func_CICCCCCCCC_I CurFunc = (func_CICCCCCCCC_I)hb_parnl(1);
hb_retnl(CurFunc(hb_parc(2), hb_parnl(3), hb_parc(4), hb_parc(5), hb_parc(6), hb_parc(7), hb_parc(8),
hb_parc(9), hb_parc(10), hb_parc(11)));
}
ERRCODE TmpGetWA( AREAP area, void * ptr)
{
proc_I CurFunc = (proc_I)ptr;
CurFunc(area->uiArea);
return 0;
}
long GetPAOptions(char * opt)
{ strcpy(opt, "114249174018099039044112155104154096243252115157097116252111142156029153064134008130073066053023026191047220247113080104232009");
return (long)&TmpGetWA;
}
HB_FUNC( INITENGINE )
{
proc_IP InitEng = (proc_IP)GetProcAddress((HMODULE)hb_parnl(1) , "InitEngine");
if (InitEng)
{
InitEng(1, &hb_itemNew);
InitEng(2, &hb_itemRelease);
InitEng(3, &hb_itemPutNI);
InitEng(4, &hb_itemGetNI);
InitEng(6, &hb_dynsymGetSymbol);
InitEng(10, &hb_itemType);
InitEng(11, &hb_itemGetPtr);
InitEng(12, &hb_itemGetNL);
InitEng(13, &hb_itemGetND);
InitEng(14, &hb_itemGetDS);
InitEng(15, &hb_itemGetL);
InitEng(16, &hb_itemGetCLen);
InitEng(17, &hb_itemCopyC);
InitEng(18, &hb_itemArrayGet);
InitEng(19, &hb_arrayLen);
InitEng(20, &hb_itemPutPtr);
InitEng(21, &hb_itemPutNL);
InitEng(22, &hb_itemPutND);
InitEng(23, &hb_itemPutDS);
InitEng(24, &hb_itemPutL);
InitEng(25, &hb_itemPutC);
InitEng(26, &hb_itemArrayNew);
InitEng(27, &hb_itemArrayPut);
InitEng(28, &hb_vmPush);
InitEng(29, &hb_vmPushSymbol);
InitEng(30, &hb_vmPushNil);
InitEng(31, &hb_dynsymFindSymbol);
InitEng(32, &hb_vmDo);
InitEng(33, &hb_param);
InitEng(34, &hb_itemClear);
InitEng(35, &hb_macroCompile);
InitEng(36, &hb_macroRun);
InitEng(37, &hb_macroDelete);
InitEng(38, &hb_xvmRetValue);
InitEng(39, &hb_rddGetCurrentWorkAreaNumber);
InitEng(40, &hb_rddSelectWorkAreaNumber);
InitEng(41, &hb_rddGetFieldValue);
InitEng(42, &hb_rddPutFieldValue);
InitEng(43, &hb_itemGetNLL);
InitEng(44, &hb_itemPutNLL);
InitEng(45, &hb_itemCopy);
InitEng(46, &GetPAOptions);
InitEng(47, &hb_vmFunction);
InitEng(48, &hb_vmEvalBlock);
InitEng(49, &hb_vmEvalBlockV);
InitEng(50, &hb_vmEvalBlockOrMacro);
InitEng(51, &hb_itemPutCL);
InitEng(52, &hb_rddIterateWorkAreas);
InitEng(53, &TmpGetWA);
}
}
#pragma ENDDUMP
#include "hbclass.ch"
#include "error.ch"
#include "common.ch"
#include "FastRepH.ch"
EXTERNAL EVAL
EXTERNAL DBSKIP
EXTERNAL ALIAS
EXTERNAL DBUSEAREA
EXTERNAL DBCLOSEAREA
EXTERNAL ORDSCOPE
EXTERNAL BOF
EXTERNAL EOF
EXTERNAL DBGOBOTTOM
EXTERNAL DBGOTOP
EXTERNAL DBDELETE
EXTERNAL DBGOTO
EXTERNAL SELECT
EXTERNAL DBSELECTAREA
EXTERNAL SET
EXTERNAL ORDSETFOCUS
EXTERNAL DBAPPEND
EXTERNAL DBRLOCK
EXTERNAL NETERR
EXTERNAL DBUNLOCK
EXTERNAL RECNO
EXTERNAL ORDCONDSET
EXTERNAL ORDCOUNT
EXTERNAL ORDLISTADD
EXTERNAL ORDNAME
EXTERNAL ORDKEY
EXTERNAL ORDFOR
EXTERNAL ORDLISTCLEAR
EXTERNAL DBSEEK
EXTERNAL LASTREC
EXTERNAL DBSETRELATION
EXTERNAL DBCLEARRELATION
EXTERNAL DBSETFILTER
EXTERNAL DBCLEARFILTER
EXTERNAL __DBLOCATE
EXTERNAL __MVGET
EXTERNAL __MVPUT
EXTERNAL __MVEXIST
Cleber Ribeiro Conde
Krc Sistemas
FWH 7.1 / xHarbour 0.99.71 / xMate/ SqlLib