alex 0c0abd6589 This commit was generated by cvs2svn to compensate for changes in r5942,
which included commits to RCS files with non-trunk default branches.

git-svn-id: svn://10.65.10.50/trunk@5943 c028cbd2-c16b-5b4b-a496-9718f37d4682
1998-01-15 16:39:02 +00:00

138 lines
2.4 KiB
C
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifdef FLL
#include "../foxlck/pro_ext.h"
#else
#include <windows.h>
#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