#ifdef FLL #include "../foxlck/pro_ext.h" #else #include #ifdef _MSC_VER #define _BreakPoint() __asm \ { \ int 3h \ } #endif #endif #include "hlapi_c.h" #define MODULE 26952 #define REFKEY "CAMPOKEY" #define VERKEY "ìpÙˆ¬cê<" unsigned int getser(); int CGetAut(int); #ifdef FLL int FAR Fox_HL_LOGIN() { #ifdef DBG _BreakPoint(); #endif /* Questa riga e' solo temporanea! 11.3.1996, per ovviare a problemi sul alcuni PC */ /* con la parallela non compatibile */ HL_LOGIN(MODULE, DONT_CARE, REFKEY, VERKEY); getser(); return 1; } int FAR Fox_HL_LOGOUT() { /* Questa riga e' solo temporanea! 11.3.1996, per ovviare a problemi sul alcuni PC */ /* con la parallela non compatibile */ HL_LOGOUT(); return 1; } long getlong(ParamBlk FAR *parm, int pos) { long val = 0; if (pos < parm->pCount && parm->p[pos].val.ev_type == 'I') val = parm->p[pos].val.ev_long; return val; } int FAR Fox_getser() { int r; /* Questa riga e' solo temporanea! 11.3.1996, per ovviare a problemi sul alcuni PC */ /* con la parallela non compatibile */ /*r = 1;*/ r = getser(); _RetInt(r, 10); return r; } int FAR Fox_CGetAut(ParamBlk FAR *parm) { int module = getlong(parm, 0); int ok; /* Questa riga e' solo temporanea! 11.3.1996, per ovviare a problemi sul alcuni PC */ /* con la parallela non compatibile */ /*if (module == 21 || module == 22) ok = 1;*/ ok = CGetAut(module); _RetLogical(ok); return ok; } FoxInfo hardlockFoxInfo[] = { { "HL_LOGIN", (FPFI)Fox_HL_LOGIN, CALLONLOAD, "" }, { "HL_LOGOUT", (FPFI)Fox_HL_LOGOUT, CALLONUNLOAD, "" }, { "HL_GETSER", (FPFI)Fox_getser, 0, "" }, { "HL_GETAUT", (FPFI)Fox_CGetAut, 1, "I" } }; FoxTable _FoxTable = { (FoxTable FAR *)0, sizeof(hardlockFoxInfo)/sizeof(FoxInfo), hardlockFoxInfo }; #else int far pascal _export h_login() { #ifdef DBG _BreakPoint(); #endif return HL_LOGIN(MODULE, DONT_CARE, REFKEY, VERKEY); } int far pascal _export h_logout() { HL_LOGOUT(); return 0; } int far pascal _export h_getser() { int a ; a = getser(); return a; } int far pascal _export h_getaut(int module) { int ok = CGetAut(module); return ok; } int CALLBACK LibMain (HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine) { int rt = h_login(); return rt == STATUS_OK; } int CALLBACK WEP (int nExitType) { if (nExitType == WEP_FREE_DLL) h_logout(); return 1; } #endif