Help needed for compiling .c in VS2010?

Help needed for compiling .c in VS2010?

Postby Horizon » Thu Jun 20, 2013 7:50 am

Hi

I can compile xPPP.c in xHB Commercial. I am trying to compile it with VS2010 but I gives some errors.

Can anyone help me about that?

Thanks.

Errors:
Code: Select all  Expand view
Copyright (C) Microsoft Corporation.  All rights reserved.

xPPP.c
xPPP.c(19) : warning C4244: 'initializing' : conversion from 'double' to 'long',
 possible loss of data
xPPP.c(20) : warning C4244: 'initializing' : conversion from 'double' to 'long',
 possible loss of data
xPPP.c(21) : warning C4244: 'initializing' : conversion from 'double' to 'long',
 possible loss of data
xPPP.c(23) : error C2664: 'pp_adddays' : cannot convert parameter 1 from 'long'
to 'long *'
        Conversion from integral type to pointer type requires reinterpret_cast,
 C-style cast or function-style cast
xPPP.c(34) : warning C4244: 'initializing' : conversion from 'double' to 'long',
 possible loss of data
xPPP.c(41) : warning C4244: 'initializing' : conversion from 'double' to 'long',
 possible loss of data
xPPP.c(43) : error C2664: 'pp_bitclear' : cannot convert parameter 1 from 'long'
 to 'long *'
        Conversion from integral type to pointer type requires reinterpret_cast,
 C-style cast or function-style cast
xPPP.c(59) : warning C4244: 'initializing' : conversion from 'double' to 'long',
 possible loss of data
xPPP.c(61) : error C2664: 'pp_bitset' : cannot convert parameter 1 from 'long' t
o 'long *'



xPPP.c
Code: Select all  Expand view

/*

2010.02.05 - xHarbourBuilder-Professional-January2010-build11
   - Change hb_parc() ==> (char*) hb_parc()


*/




#include "hbapi.h"
#include "hbapiitm.h"

#include "KeyLib.h"

HB_FUNC(PP_ADDDAYS)
{
   LONG month = hb_parnd(1);
   LONG day = hb_parnd(2);
   LONG year = hb_parnd(3);
   LONG days = hb_parnl(4);
   PP_ADDDAYS( month, day, year, days );
   hb_ret();
}
HB_FUNC(PP_INITLIB)
{
   HINSTANCE hInstance = hb_parnl(1);
   PP_INITLIB( hInstance );
   hb_ret();
}
HB_FUNC(PP_ERRORSTR)
{
   LONG number = hb_parnd(1);
   LPSTR buffer = (char*) hb_parc(2);
   PP_ERRORSTR( number, buffer );
   hb_ret();
}
HB_FUNC(PP_BITCLEAR)
{
   LONG bit_field = hb_parnd(1);
   LONG bit_number = hb_parnl(2);
   hb_retnl(PP_BITCLEAR( bit_field, bit_number ));
}
HB_FUNC(PP_NDECRYPT)
{
   LONG number = hb_parnl(1);
   LONG seed = hb_parnl(2);
   hb_retnl(PP_NDECRYPT( number, seed ));
}
HB_FUNC(PP_NENCRYP)
{
   LONG number = hb_parnl(1);
   LONG seed = hb_parnl(2);
   hb_retnl(PP_NENCRYPT( number, seed ));
}
HB_FUNC(PP_BITSET)
{
   LONG bit_field = hb_parnd(1);
   LONG bit_number = hb_parnl(2);
   hb_retnl(PP_BITSET( bit_field, bit_number ));
}
HB_FUNC(PP_BITTEST)
{
   LONG bit_field = hb_parnl(1);
   LONG bit_number = hb_parnl(2);
   hb_retnl(PP_BITTEST( bit_field, bit_number ));
}

HB_FUNC(PP_CHECKSUM)
{
   LPSTR filename = (char*) hb_parc(1);
   LONG checksum = hb_parnd(2);
   hb_retnl(PP_CHECKSUM( filename, checksum ));
}
HB_FUNC(PP_LFOPEN)
{
   LPSTR filename = (char*) hb_parc(1);
   LONG flags = hb_parnl(2);
   LONG type = hb_parnl(3);
   LPSTR password = (char*) hb_parc(4);
   LONG ret_handle;
   hb_retnl(PP_LFOPEN( filename, flags, type, password, &ret_handle ));
   hb_stornl(ret_handle,5);
}
HB_FUNC(PP_LFCREATE)
{
   LPSTR filename = (char*) hb_parc(1);
   LONG flags = hb_parnl(2);
   LONG type = hb_parnl(3);
   LPSTR password = (char*) hb_parc(4);
   LONG attrib = hb_parnl(5);
   hb_retnl(PP_LFCREATE( filename, flags, type, password, attrib ));
}
HB_FUNC(PP_LIBTEST)
{
   LONG testnum = hb_parnl(1);
   hb_retnl(PP_LIBTEST( testnum ));
}
HB_FUNC(PP_LANACTIVE)
{
   LONG handle = hb_parnl(1);
   hb_retnl(PP_LANACTIVE( handle ));
}
HB_FUNC(PP_LANCHECK)
{
   LONG handle = hb_parnl(1);
   hb_retnl(PP_LANCHECK( handle ));
}
HB_FUNC(PP_LFCLOSE)
{
   LONG handle = hb_parnl(1);
   hb_retnl(PP_LFCLOSE( handle ));
}
HB_FUNC(PP_LFLOCK)
{
   LONG mem_handle = hb_parnl(1);
   hb_retnl(PP_LFLOCK( mem_handle ));
}
HB_FUNC(PP_LFUNLOCK)
{
   LONG mem_handle = hb_parnl(1);
   hb_retnl(PP_LFUNLOCK( mem_handle ));
}
HB_FUNC(PP_NETCLOSE)
{
   LONG mem_handle = hb_parnl(1);
   //hb_retnl(PP_NETCLOSE( mem_handle ));
}
HB_FUNC(PP_SEMCLOSE)
{
   LONG handle = hb_parnl(1);
   hb_retnl(PP_SEMCLOSE( handle ));
}
HB_FUNC(PP_SEMTEST)
{
   LONG sem_handle = hb_parnl(1);
   //hb_retnl(PP_SEMTEST( sem_handle ));
}
HB_FUNC(PP_SYSINFO)
{
   LONG flags = hb_parnl(1);
   //hb_retnl(PP_SYSINFO( flags ));
}
HB_FUNC(PP_VALDATE)
{
   LONG handle = hb_parnl(1);
   hb_retnl(PP_VALDATE( handle ));
}
HB_FUNC(PP_EXPIRED)
{
   LONG handle = hb_parnl(1);
   hb_retnl(PP_EXPIRED( handle ));
}

HB_FUNC(PP_CHKVARCHAR)
{
   LONG type = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   hb_retnl(PP_CHKVARCHAR( type, var_no ));
}
HB_FUNC(PP_CHKVARDATE)
{
   LONG type = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   hb_retnl(PP_CHKVARDATE( type, var_no ));
}
HB_FUNC(PP_CHKVARNUM)
{
   LONG type = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   hb_retnl(PP_CHKVARNUM( type, var_no ));
}
HB_FUNC(PP_COMPNO32DRIVERS)
{
   LONG driver = hb_parnl(1);
   LONG flags = hb_parnl(2);
   //hb_retnl(PP_COMPNO32DRIVERS( driver, flags ));
}
HB_FUNC(PP_COPYADD)
{
   LONG handle = hb_parnl(1);
   LONG flags = hb_parnl(2);
   LONG value = hb_parnl(3);
   hb_retnl(PP_COPYADD( handle, flags, value ));
}
HB_FUNC(PP_COMPNO)
{
   LONG cnotype = hb_parnl(1);
   LPSTR filename = (char*) hb_parc(2);
   LPSTR hard_drive = (char*) hb_parc(3);
   hb_retnl(PP_COMPNO( cnotype, filename, hard_drive ));
}
HB_FUNC(PP_COPYCHECK)
{
   LONG handle = hb_parnl(1);
   LONG action = hb_parnl(2);
   LONG comp_num = hb_parnl(3);
   hb_retnl(PP_COPYCHECK( handle, action, comp_num ));
}
HB_FUNC(PP_COPYCHECKTH)
{
   LONG handle = hb_parnl(1);
   LONG action = hb_parnl(2);
   LONG comp_num = hb_parnl(3);
   LONG threshold = hb_parnl(4);
   //hb_retnl(PP_COPYCHECKTH( handle, action, comp_num, threshold ));
}
HB_FUNC(PP_COPYDELETE)
{
   LONG handle = hb_parnl(1);
   LONG comp_num = hb_parnl(2);
   hb_retnl(PP_COPYDELETE( handle, comp_num ));
}
HB_FUNC(PP_COUNTDEC)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   hb_retnl(PP_COUNTDEC( handle, var_no ));
}
HB_FUNC(PP_COUNTINC)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   hb_retnl(PP_COUNTINC( handle, var_no ));
}

HB_FUNC(PP_NPDATE)
{
   LONG month = hb_parnl(1);
   LONG day = hb_parnl(2);
   LONG year = hb_parnl(3);
   LONG dop = hb_parnl(4);
   PP_NPDATE( month, day, year, dop );
   hb_ret();
}
HB_FUNC(PP_SETVARDATE)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   LONG month_hours = hb_parnl(3);
   LONG day_minutes = hb_parnl(4);
   LONG year_seconds = hb_parnl(5);
   hb_retnl(PP_SETVARDATE( handle, var_no, month_hours, day_minutes, year_seconds ));
}
HB_FUNC(PP_GETVARDATE)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   LONG month_hours;
   LONG day_minutes;
   LONG year_seconds;
   hb_retnl(PP_GETVARDATE( handle, var_no, &month_hours, &day_minutes, &year_seconds ));
   hb_stornl(month_hours,3);
   hb_stornl(day_minutes,4);
   hb_stornl(year_seconds,5);
}
HB_FUNC(PP_SETVARNUM)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   LONG value = hb_parnl(3);
   hb_retnl(PP_SETVARNUM( handle, var_no, value ));
}
HB_FUNC(PP_SETVARCHAR)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   LPSTR buffer = (char*) hb_parc(3);
   hb_retnl(PP_SETVARCHAR( handle, var_no, buffer ));
}
HB_FUNC(PP_GETVARCHAR)
{
   LONG handle = hb_parnl(1);
   LONG var_no = hb_parnl(2);
   char buffer[255] = {0};
   hb_retnl(PP_GETVARCHAR( handle, var_no, buffer ));
   hb_storc(buffer,3);
}
HB_FUNC(PP_TCODE)
{
   LONG number = hb_parnl(1);
   LONG cenum = hb_parnl(2);
   LONG computer = hb_parnl(3);
   LONG seed = hb_parnl(4);
   hb_retnl(PP_TCODE( number, cenum, computer, seed ));
}
HB_FUNC(PP_TIMERCHECK)
{
   LONG timestamp = hb_parnl(1);
   LONG minutes = hb_parnl(2);
   hb_retnl(PP_TIMERCHECK( timestamp, minutes ));
}
HB_FUNC(PP_UPDDATE)
{
   LONG handle = hb_parnl(1);
   LONG flag = hb_parnl(2);
   hb_retnl(PP_UPDDATE( handle, flag ));
}
HB_FUNC(PP_GET4108MAC)
{
   //hb_retnl(PP_GET4108MAC());
}
HB_FUNC(PP_CENUM)
{
   hb_retnl(PP_CENUM());
}
 


KeyLib.h
Code: Select all  Expand view
/*****************************************************************************
 *
 *    File Name:     $Workfile: Keylib.h $
 *
 *    Function:      
 *
 *    Description:    
 *
 *    Author:        $Author: Kduke $
 *
 *    Revision:      $Revision: 1 $
 *
 *    $History: Keylib.h $
 *
 * *****************  Version 1  *****************
 * User: Kduke        Date: 8/15/07    Time: 2:41p
 * Created in $/SWKey/KeyLib/Source
 * BugzID: 31823
 *
 * Rebuilt for fix make in SKeyli32.lib related to lfpermset on a folder
 * and the semopen terminal services problem
 *
 * *****************  Version 80  *****************
 * User: Apousada     Date: 4/11/07    Time: 3:46p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * BugzID: 27987
 * * Added new Server/Remote Host MAC Address Computer ID algorithm
 *
 * *****************  Version 79  *****************
 * User: Woz          Date: 12/14/06   Time: 4:16p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * BugzID: 10175
 *
 * Added flag LFOPEN_OPENALWAYS.
 *
 * *****************  Version 78  *****************
 * User: Dheinz       Date: 10/17/06   Time: 4:35p
 * Updated in $/SWKey/PLUS/KeyLib/SOURCE
 * Added PP_TANSFER_ENHANCED flag
 *
 * *****************  Version 77  *****************
 * User: Dheinz       Date: 9/27/06    Time: 12:49p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * First addition of new CompIDs
 *
 * *****************  Version 76  *****************
 * User: Bmetzler     Date: 6/13/06    Time: 5:19p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added NetBroadcast MultiStart Error code
 *
 * *****************  Version 75  *****************
 * User: Bmetzler     Date: 5/08/06    Time: 5:52p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Removed unneeded define for COMPNO_NETWORK
 *
 * Added define LFALIAS_NOCACHE to be compatible with LFOPEN_NOCACHE
 * implemented previously.
 *
 * Added NET_DO_NOT_UPDATE and NET_ALWAYS_CONNECTED flags for PP_NETOPEN.
 *
 * Added new Error Defines for new NetOpen flags.
 *
 * Added Defines for PP_NETOPEN, PP_NETTEST, and PP_NETCLOSE
 *
 *
 * *****************  Version 74  *****************
 * User: Bmetzler     Date: 1/31/06    Time: 6:20p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * BugzID: 7540
 * Added Version function
 * Added SysInfo function
 *
 * *****************  Version 73  *****************
 * User: Danh         Date: 1/13/06    Time: 9:33a
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added a few more errors for the new compids
 *
 * *****************  Version 72  *****************
 * User: Bmetzler     Date: 11/15/05   Time: 4:54p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added COMPNO_BIOS64 for support of Machnm64.sys.
 *
 * *****************  Version 71  *****************
 * User: Bmetzler     Date: 11/09/05   Time: 6:03p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added COMPNO_MACADDR4200 flag for backwards compatibility with versions
 * previous to 4.2
 *
 * Added LFOPEN_NOCACHE flag for use with lower level Ex functions to fix
 * caching issue from Win98 to WinXP
 *
 * *****************  Version 70  *****************
 * User: Bmetzler     Date: 5/06/05    Time: 10:46a
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added flag to suppress the message boxes returned from pp_compno
 *
 * *****************  Version 69  *****************
 * User: Bmetzler     Date: 3/02/05    Time: 12:18p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * BETA
 * added error codes to the current list of error codes for the NET
 * Broadcast functionality.
 *
 * *****************  Version 67  *****************
 * User: Bmetzler     Date: 1/27/04    Time: 3:35p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * redefined LFALIAS_SCATTER to 16 for Visual FoxPro and
 * LFALIAS_SCATTER_BACK for backwards compatibility
 *
 * *****************  Version 66  *****************
 * User: Danh         Date: 12/26/03   Time: 1:40p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * 1st implementation of cd protect
 *
 * *****************  Version 65  *****************
 * User: Bmetzler     Date: 11/13/03   Time: 3:30p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * updated flags for COMPNO_BIOS32 to be able to give descriptive returns
 *
 * *****************  Version 63  *****************
 * User: Danh         Date: 10/27/03   Time: 10:08a
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added EZTrigger Flag to pp_importactfile.  Changed string parameters in
 * this function from char* to LPSTR
 *
 * *****************  Version 62  *****************
 * User: Bmetzler     Date: 10/03/03   Time: 10:49a
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added Compno32driver line in function prototypes section.
 *
 * *****************  Version 60  *****************
 * User: Bmetzler     Date: 9/11/03    Time: 3:36p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 *  Added flags for 16bit only and 32bit only BIOS algorithms.
 * COMPNO_BIOS goes from 32bit, if it fails calls 16bit
 *
 * *****************  Version 58  *****************
 * User: Bmetzler     Date: 8/10/03    Time: 3:33p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added Defines for pp_compno32drivers
 *
 * *****************  Version 57  *****************
 * User: Danh         Date: 7/08/03    Time: 3:57p
 * Updated in $/SWKey/PLUS/KeyLib/Source
 * Added ActFile defines
 *
 * *****************  Version 56  *****************
 * User: Heinzd       Date: 5/20/03    Time: 4:05p
 * Updated in $/SWKey/PLUS/KeyLib/SOURCE
 * Added declares for file activation
 * Added flag for scatter function
 *
 * *****************  Version 55  *****************
 * User: Heinzd       Date: 12/10/02   Time: 2:37p
 * Updated in $/SWKey/PLUS/KeyLib/SOURCE
 * Added EZTrial1Ex function
 *
 * *****************  Version 54  *****************
 * User: Heinzd       Date: 6/06/02    Time: 10:29a
 * Updated in $/SWKey/PLUS/KeyLib/SOURCE
 * Added Definition for pp_get4108Mac function.
 *
 * *****************  Version 53  *****************
 * User: Wozniakm     Date: 10/15/01   Time: 8:17p
 * Updated in $/PPP/KeyLib/Source
 * Added prototype for PP_SETREGPERM().
 *
 * *****************  Version 52  *****************
 * User: Wozniakm     Date: 2/06/01    Time: 4:06p
 * Updated in $/PPP/KeyLib/Source
 * Added support for pp_gotourl().
 *
 * *****************  Version 51  *****************
 * User: Wozniakm     Date: 10/15/00   Time: 1:20p
 * Updated in $/PPP/KeyLib/Source
 * Added define for COMPNO_IPADDR and EZTRIAL1 return codes.
 *
 * *****************  Version 50  *****************
 * User: Wozniakm     Date: 7/16/00    Time: 11:42a
 * Updated in $/PPP/KeyLib/Source
 * Added prototype for pp_eztrial2.
 *
 * *****************  Version 49  *****************
 * User: Wozniakm     Date: 5/10/00    Time: 11:38a
 * Updated in $/PPP/KeyLib/Source
 * Added define for WINAPI which makes this file no longer dependant on
 * windows.h?
 *
 * *****************  Version 48  *****************
 * User: Wozniakm     Date: 2/05/00    Time: 1:20p
 * Updated in $/PPP/KeyLib/Source
 * Added define for error code ERR_INVALID_REGKEY2_ENTERED and variables
 * VAR_LICENSEID, VAR_LICENSEPW, and VAR_CUSTOMERID.
 *
 * *****************  Version 47  *****************
 * User: Wozniakm     Date: 10/21/99   Time: 3:38p
 * Updated in $/PPP/KeyLib/Source
 * Added the prototype for pp_semtest() although it is not implemented
 * yet.
 *
 * *****************  Version 46  *****************
 * User: Wozniakm     Date: 8/24/99    Time: 11:37p
 * Updated in $/PPP/KeyLib/Source
 * Added define for COMPNO_MACADDR2, but not sure if we will actually use
 * it.
 *
 * *****************  Version 45  *****************
 * User: Wozniakm     Date: 8/07/99    Time: 4:40p
 * Updated in $/PPP/KeyLib/SOURCE
 * Added support for VAR_EZTRIAL_COMPNO_FILE and VAR_EZTRIG_COMPNO_FILE.
 * Added the prototype for pp_eztrial1test.
 *
 * *****************  Version 44  *****************
 * User: Wozniakm     Date: 7/12/99    Time: 4:26p
 * Updated in $/PPP/KeyLib/Source
 * Added defines for Automation Client strings in EZTrial data structure.
 *
 * *****************  Version 43  *****************
 * User: Wozniakm     Date: 6/08/99    Time: 10:11p
 * Updated in $/PPP/KeyLib/Source
 * Added prototype for pp_semused().
 *
 * *****************  Version 42  *****************
 * User: Wozniakm     Date: 5/17/99    Time: 2:35p
 * Updated in $/PPP/KeyLib/Source
 * Added two more COMPNO defines.
 *
 * *****************  Version 41  *****************
 * User: Wozniakm     Date: 4/06/99    Time: 6:10p
 * Updated in $/PPP/KeyLib/Source
 * Added another FAKE ERR line to make FoxProW work properly.
 *
 * *****************  Version 40  *****************
 * User: Wozniakm     Date: 4/06/99    Time: 3:36p
 * Updated in $/PPP/KeyLib/Source
 * Added more EZTrial variable definitions.
 *
 * *****************  Version 39  *****************
 * User: Wozniakm     Date: 3/30/99    Time: 5:56p
 * Updated in $/PPP/KeyLib/Source
 * Added fake error number to make KEYFOXW.FLL to generate the write BIOS
 * number.
 *
 * *****************  Version 38  *****************
 * User: Wozniakm     Date: 3/26/99    Time: 5:47p
 * Updated in $/PPP/KeyLib/Source
 * Changed HWND parameters to LONG.
 *
 * *****************  Version 37  *****************
 * User: Wozniakm     Date: 3/16/99    Time: 8:15p
 * Updated in $/PPP/KeyLib/Source
 * Added the flag LFOPEN_NOLOOP.
 *
 * *****************  Version 36  *****************
 * User: Wozniakm     Date: 3/09/99    Time: 7:37p
 * Updated in $/PPP/KeyLib/Source
 * Added the lfhandleret parameter to pp_eztrial1().
 *
 * *****************  Version 35  *****************
 * User: Wozniakm     Date: 3/08/99    Time: 10:15p
 * Updated in $/PPP/KeyLib/Source
 * Added the user-defined string labels parameter to pp_eztrig1dlg()
 * prototype.
 *
 * *****************  Version 34  *****************
 * User: Wozniakm     Date: 3/06/99    Time: 1:13p
 * Updated in $/PPP/KeyLib/Source
 * Changed number for LF_INTERNET.  Added variables and errors for EZTrial
 * and EZTrigger.
 *
 * *****************  Version 33  *****************
 * User: Wozniakm     Date: 2/13/99    Time: 3:14p
 * Updated in $/PPP/KeyLib/Source
 * Added definition for LF_INTERNET and error codes specific to WINSOCK
 * communication.
 *
 * *****************  Version 32  *****************
 * User: Wozniakm     Date: 2/01/99    Time: 7:20p
 * Updated in $/PPP/KeyLib/Source
 * Added additional define for ERR_INVALID_LFHANDLE.
 *
 * *****************  Version 31  *****************
 * User: Wozniakm     Date: 11/10/98   Time: 10:33a
 * Updated in $/PPP/KeyLib/Source
 * Added prototype for pp_daysleft().  Renamed ACTION_STRICT to
 * COPYCHK_STRICT.
 *
 * *****************  Version 30  *****************
 * User: Wozniakm     Date: 11/08/98   Time: 4:05p
 * Updated in $/PPP/KeyLib/Source
 * Added the define ACTION_STRICT for pp_copycheck().
 *
 * *****************  Version 29  *****************
 * User: Wozniakm     Date: 11/05/98   Time: 4:23p
 * Updated in $/PPP/KeyLib/Source
 * Added the two constants UPDDATE_NOTIME and UPDDATE_FORCE which are used
 * in pp_upddate().
 *
 * *****************  Version 28  *****************
 * User: Wozniakm     Date: 4/05/98    Time: 12:13p
 * Updated in $/PPP/KeyLib/Source
 * Added prototype for pp_lfdelete().
 *
 * *****************  Version 27  *****************
 * User: Wozniakm     Date: 1/07/98    Time: 2:55p
 * Updated in $/PPP/KeyLib/Source
 * Changed most pp_ function names to PP_ so the LIBRARY_CLIPPER library
 * can call the pp_ function names as documented in the manual.
 * Previously, we had to use p_ because there was a conflict in the main
 * library code and the CLIPPER wrapper functions.
 *
 * *****************  Version 26  *****************
 * User: Wozniakm     Date: 12/29/97   Time: 6:19p
 * Updated in $/PPP/KeyLib/Source
 * Added definition for new error ERR_DEMO_HAS_EXPIRED.
 *
 * *****************  Version 25  *****************
 * User: Wozniakm     Date: 8/13/97    Time: 12:45a
 * Updated in $/PPP/KeyLib/Source
 * Changed prototype for pp_nencryptx()/decyptx().  Changed processor
 * directive for DOS library definitions.
 *
 * *****************  Version 24  *****************
 * User: Wozniakm     Date: 8/11/97    Time: 11:10p
 * Updated in $/PPP/KeyLib/Source
 * Added definitions for HINSTANCE and HWND so they can compile in DOS
 * libraries.
 *
 * *****************  Version 23  *****************
 * User: Wozniakm     Date: 8/10/97    Time: 11:34a
 * Updated in $/PPP/KeyLib/Source
 * Removed the IFDEF that took out pp_getcode() and pp_initlib().  Change
 * the return type for pp_ndecryptx().
 *
 * *****************  Version 22  *****************
 * User: Wozniakm     Date: 6/04/97    Time: 10:10p
 * Updated in $/PPP/KeyLib/Source
 * Added functions for pp_nencryptx() and pp_ndecryptx().
 *
 * *****************  Version 21  *****************
 * User: Wozniakm     Date: 4/08/97    Time: 6:21p
 * Updated in $/PPP/KeyLib/Source
 * Defined needed data types for C/DOS library.
 *
 * *****************  Version 20  *****************
 * User: Wozniakm     Date: 2/25/97    Time: 5:40p
 * Updated in $/PPP/KeyLib/Source
 * Initial changes to "C" library to get it to compile.
 *
 * *****************  Version 19  *****************
 * User: Wozniakm     Date: 1/05/97    Time: 4:40p
 * Updated in $/PPP/KeyLib/Source
 * The function prototype for pp_password() was added since it was
 * missing.  The define for VAR_LF_CHECKSUM was added.
 *
 * *****************  Version 18  *****************
 * User: Wozniakm     Date: 12/15/96   Time: 7:03p
 * Updated in $/PPP/KeyLib/Source
 * Changed prototype of pp_chkvarxxx() functions to reflect the first
 * parameter name change.
 *
 * *****************  Version 17  *****************
 * User: Wozniakm     Date: 12/15/96   Time: 2:08p
 * Updated in $/PPP/KeyLib/Source
 * Added define for COMPNO_MACADDR.
 *
 * *****************  Version 16  *****************
 * User: Wozniakm     Date: 12/12/96   Time: 11:09p
 * Updated in $/PPP/KeyLib/Source
 * Added an error code to list.  Added prototypes for pp_chkvarxxx()
 * functions.
 *
 * *****************  Version 15  *****************
 * User: Wozniakm     Date: 11/05/96   Time: 9:43p
 * Updated in $/PPP/KeyLib/Source
 * Added the variable TCODE_MAX for Mark.
 *
 * *****************  Version 14  *****************
 * User: Wozniakm     Date: 11/02/96   Time: 5:40p
 * Updated in $/PPP/KeyLib/Source
 * Added support for Crypto-Box Versa and 560.
 *
 * *****************  Version 13  *****************
 * User: Wozniakm     Date: 10/25/96   Time: 12:13a
 * Updated in $/PPP/KeyLib/Source
 * Added definitions for SEM_ options.
 *
 * *****************  Version 12  *****************
 * User: Wozniakm     Date: 10/07/96   Time: 9:30p
 * Updated in $/PPP/KeyLib/Source
 * Added #ifdef for C++ so the function prototypes are not mangled.
 *
 * *****************  Version 11  *****************
 * User: Wozniakm     Date: 9/28/96    Time: 10:28p
 * Updated in $/PPP/KeyLib/Source
 * Added error codes for Registry functions.  Added prototype to
 * pp_initlib().
 *
 * *****************  Version 10  *****************
 * User: Wozniakm     Date: 9/22/96    Time: 4:36p
 * Updated in $/PPP/KeyLib/Source
 * Added missing prototype for pp_npdate() and changed pp_lfopen() to
 * accept a flags parameter.
 *
 * *****************  Version 9  *****************
 * User: Wozniakm     Date: 9/16/96    Time: 10:12a
 * Updated in $/PPP/KeyLib/Source
 * Changed function prototypes of pp_lfcreate() and pp_copyadd() - they
 * both got <flags> parameters.  Added #defines for the various flag bit
 * definitions.
 *
 * *****************  Version 8  *****************
 * User: Wozniakm     Date: 9/01/96    Time: 2:58a
 * Updated in $/PPP/KeyLib/Source
 * Added LF checksum failure error flag.
 *
 * *****************  Version 7  *****************
 * User: Wozniakm     Date: 8/31/96    Time: 5:14p
 * Updated in $/PPP/KeyLib/Source
 * Added one more global error code.
 *
 * *****************  Version 6  *****************
 * User: Wozniakm     Date: 8/26/96    Time: 12:25p
 * Updated in $/PPP/KeyLib/Source
 * Reorganized error numbers again since when I implemented pp_errorstr()
 * realized they have to be sequential numbers.
 *
 * *****************  Version 5  *****************
 * User: Wozniakm     Date: 8/31/96    Time: 11:41a
 * Updated in $/PPP/KeyLib/Source
 * Added a few result codes and re-numbered them all.  Added definitions
 * for more user-defined fields.  Made a few changes to the prototypes.  
 *
 * *****************  Version 4  *****************
 * User: Wozniakm     Date: 8/25/96    Time: 11:06p
 * Updated in $/PPP/KeyLib/Source
 *
 * *****************  Version 3  *****************
 * User: Wozniakm     Date: 8/25/96    Time: 10:18p
 * Updated in $/PPP/KeyLib/Source
 *
 *    Copyright (c) 1996 Concept Software, Inc.  All rights reserved.
 *
 ****************************************************************************/


#ifndef KEYLIB_H
#define KEYLIB_H

#ifdef __cplusplus     /* Assume C declarations for C++ */
extern "C" {
#endif  /* __cplusplus */

/*pp_compno32drivers flags*/
#define CHECK_DRIVER_STATUS      0
#define INSTALL_DRIVER           1
#define UNINSTALL_DRIVER         2

/*pp_compno32drivers driver*/
#define COMPNO32_BIOS            0x0001
#define COMPNO64_BIOS            0x0002

/* computer number defines */
#define COMPNO_BIOS              0x0001
#define COMPNO_HDSERIAL          0x0002
#define COMPNO_HDLOCK            0x0004
#define COMPNO_HDTYPE            0x0008
#define COMPNO_NETNAME           0x0010
#define COMPNO_MACADDR           0x0020
#define COMPNO_FILESTART         0x0040
#define COMPNO_WINPRODID         0x0080
#define COMPNO_IPADDR            0x0100
#define COMPNO_MACADDR_WIN98     0x0200
#define COMPNO_BIOS16            0x0400
#define COMPNO_BIOS32            0x0800
#define COMPNO_MACADDR_WINNB     0x1000
#define COMPNO_BIOS64            0x2000 
#define COMPNO_MACADDR_4200      0x4000
/* to suppress the MessageBoxes relating to Machnm1.exe */
#define SUPPRESS_ERRORS          0x8000
#define COMPNO_ENHANCED          0x10000    //use new compid algs
#define COMPNO_SERVER_MACADDR    0x20000



/* pp_copycheck() action codes */
#define ACTION_MANUAL            0x0000
#define ACTION_AUTOADD           0x0001
#define COPYCHK_STRICT           0x0002
#define COPYCHK_ENHANCED         0x0004


/* pp_copyadd() flags */
#define COPYADD_ADDDUPE          0x0001
#define COPYADD_ERASEALL         0x0002
#define COPYADD_ENHANCED         0x0004

/* pp_copydelete() flags */
#define COPYDEL_ALL             -1
#define COPYDEL_ENHANCED        -2

//pp_copyget flags (slot)
#define COPYGET_ENHANCED        -1

/* license file type defines */
#define LF_FILE                  1
#define LF_REGISTRY              2
#define LF_CRYPTO_BOX_VERSA      3
#define LF_CRYPTO_BOX_560        4
#define LF_INTERNET              5


/* pp_lfopen() flag defines */
#define LF_CREATE_NORMAL         0x0000
#define LF_CREATE_RDONLY         0x0001
#define LF_CREATE_HIDDEN         0x0002
#define LF_CREATE_SYSTEM         0x0004
#define LF_CREATE_MISSING        0x0008
#define LFOPEN_NOLOOP            0x0010
#define LFOPEN_NOCACHE           0x0020
#define LFOPEN_OPENALWAYS        0x0040  /* used in pp_semopen to create file if not there */

/* pp_exportfile and import file flag define */
#define PPP_NOURLENCODE         0x0001

#define PPP_EZTRIGPROCESS       0x0001

                               
/* pp_lfcreate() flags */
#define LFCREATE_OVERWRITE       0x0001


/* pp_semopen() flags */
#define SEM_FILE                    0
#define SEM_TCPIP                   1


/* pp_upddate() flags */
#define UPDDATE_FORCE               1
#define UPDDATE_NOTIME              2


/* pp_lfalias() flags */
#define LFALIAS_VERIFY_CHECKSUM     1
#define LFALIAS_FIND_RECENT         2
#define LFALIAS_OVERWRITE_OLDER     4
#define LFALIAS_CREATE_MISSING      8
#define LFALIAS_SCATTER             16
#define LFALIAS_SCATTER_BACK      0x80000000    //high bit
//placeholder for LFOPEN_NOCACHE flag
#define LFALIAS_NOCACHE             32  

/* pp_eztrig1dlg() flags */
#define EZTRIG1DLG_PROCESS          1
#define EZTRIG1DLG_DELAYED          2


/* return codes for pp_eztrial1() */
#define EZTRIAL1_ERROR              0
#define EZTRIAL1_RETAIL             1
#define EZTRIAL1_DEMO               2
#define EZTRIAL1_BINDING_FAILED     3
#define EZTRIAL1_EXPIRED            4
#define EZTRIAL1_CLOCKTURNEDBACK    5
#define EZTRIAL1_PERIODIC           6
#define EZTRIAL1_EXCEEDED_USERS     7

/* flags for pp_eztrial1ex() */
#define EZTRIAL1EX_NO_NET           0x0001


/* flags for pp_gotourl() */
#define GOTOURL_BUYNOW              1

/* flags for pp_importactfile */
#define PP_EZTRIGPROCESS 1

/* flags for PP_NETOPEN*/
#define NET_SINGLE           0x0000
#define NET_DO_NOT_UPDATE    0x0001
#define NET_ALWAYS_CONNECTED 0x0002

/* flags for PP_SYSINFO*/
#define PP_TERMSERV     0x000001
#define PP_VMWARE       0x000002
#define PP_VIRTUALPC    0x000004
#define PP_64BIT        0x000008

//flags for pp_transfer()
#define PP_TRANSFER_ENHANCED    -1

/* miscellaneous defines */
#define TCODE_MAX                   50
#define PP_MAX_UDEF_STRINGS         10
#define PP_MAX_UDEF_NUMBERS         5
#define PP_MAX_UDEF_DATES           5




/* result codes */
#define PP_FAILURE                              0
#define PP_FALSE                                0
#define PP_SUCCESS                              1
#define PP_TRUE                                 1

#define ERR_INVALID_ATTRIBUTES                  2
#define ERR_CANNOT_CHANGE_ATTRIBS               3
#define ERR_HFILE_ERROR                         4
#define ERR_CANNOT_WRITE_FILE                   5
#define ERR_CANNOT_CLOSE_FILE                   6
#define ERR_CANNOT_OPEN_FILE                    7
#define ERR_CANNOT_READ_FILE                    8
#define ERR_CANNOT_CREATE_FILE                  9
#define ERR_CANNOT_DELETE_FILE                  10
#define ERR_FILE_WAS_CREATED                    11
#define ERR_INVALID_PASSWORD                    12
#define ERR_WRONG_PASSWORD                      13
#define ERR_INCORRECT_PARAMETERS                14
#define ERR_FILE_MISSING                        15
#define ERR_MEMORY_ALLOCATION                   16
#define ERR_MEMORY_FREE                         17
#define ERR_INVALID_LFHANDLE                    18
#define ERR_MEMORY_LOCK                         18
#define ERR_SLOT_NUM_INVALID                    19
#define ERR_SLOT_EMPTY                          20
#define ERR_SLOTS_FULL                          21
#define ERR_SLOT_ALREADY_ASSIGNED               22
#define ERR_NET_LIC_FULL                        23
#define ERR_COMPNO_NOT_FOUND                    24
#define ERR_VAR_NO_INVALID                      25
#define ERR_SOFT_EXPIRATION                     26
#define ERR_EXPTYPE_INVALID                     27
#define ERR_EXP_DATE_EMPTY                      28
#define ERR_STRING_TOO_LONG                     29
#define ERR_CURRENT_DATE_OLDER                  30
#define ERR_CANNOT_LOCK_FILE                    31
#define ERR_WRONG_LF_VERSION                    32
#define ERR_CORRUPT_LICENSE_FILE                33
#define ERR_SEM_FILE_LOCKED                     34
#define ERR_CORRUPT_CONTROL_FILE                35
#define ERR_WRONG_CF_SERIAL_NUM                 36
#define ERR_LF_LOCKED                           37
#define ERR_LF_CHECKSUM_INVALID                 38
#define ERR_NOT_APPLICABLE                      39
#define ERR_NOT_IMPLEMENTED_YET                 40
#define ERR_FILE_EXISTS                         41
#define ERR_REGISTRY_OPEN                       42
#define ERR_REGISTRY_QUERY                      43
#define ERR_REGISTRY_CLOSE                      44
#define ERR_REGISTRY_READ                       45
#define ERR_REGISTRY_SET                        46
#define ERR_CBOX_NOT_PRESENT                    47
#define ERR_CBOX_WRONG_TYPE                     48
#define ERR_CBOX_READ_RAM1_ERROR                49
#define ERR_CBOX_READ_RAM2_ERROR                50
#define ERR_CBOX_WRITE_RAM1_ERROR               51
#define ERR_CBOX_WRITE_RAM2_ERROR               52
#define ERR_CBOX_ID1_ERROR                      53
#define ERR_CBOX_ID2_ERROR                      54
#define ERR_CBOX_ID3_ERROR                      55
#define ERR_VAR_NOT_AVAILABLE                   56
#define ERR_DEMO_HAS_EXPIRED                    57
#define ERR_WINSOCK_STARTUP_ERROR               58
#define ERR_WINSOCK_CANNOT_RESOLVE_HOST         59
#define ERR_WINSOCK_CANNOT_CREATE_SOCKET        60
#define ERR_WINSOCK_CANNOT_CONNECT_TO_SERVER    61
#define ERR_WINSOCK_CANNOT_SEND_DATA            62
#define ERR_WINSOCK_CANNOT_READ_DATA            63
#define ERR_NO_MORE_SOFTWARE_KEYS_AVAILABLE     64
#define ERR_INVALID_SERVER_RESPONSE             65
#define ERR_CANNOT_ALLOCATE_MEMORY              66
#define ERR_WINSOCK_CANNOT_RESOLVE_PROXY        67
#define ERR_ALIAS_FILE_DOES_NOT_MATCH           68
#define ERR_INVALID_CODE_ENTERED                69
#define ERR_INVALID_REGKEY2_ENTERED             70
#define ERR_ACCESS_DENIED                       71
#define ERR_NON_WIN32_OS                        72
#define ERR_DRIVER_CORRUPT                      73
#define ERR_MARKED_FOR_DELETE                   74
//#define ERR_FAKE_FOR_FOXPRO
#define ERR_INVALID_NETHANDLE                   75
#define ERR_NO_MESSAGES                         76
#define ERR_ALREADY_OPEN                        77
#define ERR_INVALID_NETWORK_ADDRESS             78
#define ERR_NON_WIN64_OS                        79
#define ERR_NOT_SUPPORTED_BY_OS                 80
#define ERR_COULD_NOT_LOAD_DLL                  81
#define ERR_FUNCTION_NOT_AVAILABLE              82
#define ERR_NO_DRIVES_FOUND                     83
#define ERR_INTERNAL_BROADCAST                  84
#define ERR_BIND_FAILED                         85
#define ERR_CANNOT_CREATE_THREAD                86
#define ERR_NETWORK_CONNECTIVITY                87
#define ERR_COULD_NOT_INSTALL_DRIVER            88
#define ERR_NETWORK_RECONNECTED                 89
#define ERR_NET_MULTI_STARTUP                   90
#define ERR_COMPNO_ENHANCED                     91

#define ERR_FILE_SIZE_MISMATCH                  100
#define ERR_FILE_INCORRECT                      101


/* compno returns for COMPNO_BIOS32*/
#define ERR_ACCESS_DENIED_BIOS32                -71
#define ERR_NON_WIN32_OS_BIOS32                 -72
#define ERR_DRIVER_CORRUPT_BIOS32               -73
#define ERR_MARKED_FOR_DELETE_BIOS32            -74



/* file attributes defines */
#define PP_NORMAL                0x0000
#define PP_RDONLY                0x0001
#define PP_HIDDEN                0x0002
#define PP_SYSTEM                0x0004

//standard threshhold - used internally only
#define PP_STD_THRESHOLD        20


/* expiration types */
#define EXP_NONE                 "N"
#define EXP_EXE_LIMIT            "E"
#define EXP_SHAREWARE_VER        "S"
#define EXP_PAYMENT_LIMIT        "P"
#define EXP_DEMO_VERSION         "D"


/* getvar / setvar definitions - character fields */
#define VAR_COMPANY                 1
#define VAR_NAME                    2
#define VAR_ADDRESS1                3
#define VAR_ADDRESS2                4
#define VAR_ADDRESS3                5
#define VAR_PHONE1                  6
#define VAR_PHONE2                  7
#define VAR_SERIAL_TEXT             8
#define VAR_EXPIRE_TYPE             9
#define VAR_UDEF_CHAR_1             10
#define VAR_UDEF_CHAR_2             11
#define VAR_UDEF_CHAR_3             12
#define VAR_UDEF_CHAR_4             13
#define VAR_UDEF_CHAR_5             14
#define VAR_UDEF_CHAR_6             15
#define VAR_UDEF_CHAR_7             16
#define VAR_UDEF_CHAR_8             17
#define VAR_UDEF_CHAR_9             18
#define VAR_UDEF_CHAR_10            19
#define VAR_EZTRIAL_COMPNO_DRIVE    20
#define VAR_EZTRIAL_SYSDIR_FILENAME 21
#define VAR_EZTRIG_COMPNO_DRIVE     22
#define VAR_EZTRIAL_REG_ALIAS1      23
#define VAR_EZTRIAL_REG_ALIAS2      24
#define VAR_EZTRIG_DLG_LABELS       25
#define VAR_AUTOCL_PROXY_ADDR       26
#define VAR_AUTOCL_URL_VISIT        27
#define VAR_AUTOCL_URL_BUYNOW       28
#define VAR_AUTOCL_URL_UNLOCK       29
#define VAR_AUTOCL_URL_REGISTER     30
#define VAR_EZTRIAL_COMPNO_FILE     31
#define VAR_EZTRIG_COMPNO_FILE      32
#define VAR_LICENSEPW               33


/* getvar / setvar definitions - numeric fields */
#define VAR_SERIAL_NUM                 1
#define VAR_EXP_COUNT                  2
#define VAR_EXP_LIMIT                  3
#define VAR_LAN_COUNT                  4
#define VAR_LAN_LIMIT                  5
#define VAR_INSTALL_COUNT              6
#define VAR_INSTALL_LIMIT              7
#define VAR_AUTHORIZED_COMPS           8
#define VAR_UDEF_NUM_1                 9
#define VAR_UDEF_NUM_2                 10
#define VAR_UDEF_NUM_3                 11
#define VAR_UDEF_NUM_4                 12
#define VAR_UDEF_NUM_5                 13
#define VAR_LF_CHECKSUM                14
#define VAR_EZTRIAL_SOFT_BINDING       15
#define VAR_EZTRIAL_HARD_BINDING       16
#define VAR_EZTRIAL_COMPNO_THRESHOLD   17
#define VAR_EZTRIAL_CONVERT_COPIES     18
#define VAR_EZTRIAL_UPDATE_LAST_TIME   19
#define VAR_EZTRIAL_COMPNO_ALGORITHMS  20
#define VAR_EZTRIAL_FILE_VERSION       21
#define VAR_EZTRIG_FLAGS               22
#define VAR_EZTRIG_COMPNO_ALGORITHMS   23
#define VAR_EZTRIG_SEED                24
#define VAR_EZTRIG_REGKEY2SEED         25
#define VAR_EZTRIAL_DAYS_TO_RUN        26
#define VAR_EZTRIAL_TIMES_TO_RUN       27
#define VAR_LICENSEID                  28
#define VAR_CUSTOMERID                 29
   


/* getvar / setvar definitions - date fields */
#define VAR_EXP_DATE_SOFT        1
#define VAR_EXP_DATE_HARD        2
#define VAR_LAST_DATE            3
#define VAR_LAST_TIME            4
#define VAR_UDEF_DATE_1          5
#define VAR_UDEF_DATE_2          6
#define VAR_UDEF_DATE_3          7
#define VAR_UDEF_DATE_4          8
#define VAR_UDEF_DATE_5          9


/* for compatibility with previous versions */
#define VAR_PRODUCT              VAR_UDEF_CHAR_2
#define VAR_DISTRIBUTOR          VAR_UDEF_CHAR_3
#define VAR_USER_DEF_1           VAR_UDEF_CHAR_1
#define VAR_USER_DEF_2           VAR_UDEF_NUM_1
#define VAR_USER_DEF_3           VAR_UDEF_NUM_2
#define VAR_USER_DEF_4           VAR_UDEF_DATE_1


#ifndef PPPEXPORT
#define PPPEXPORT
#endif

#ifndef WINAPI
#define WINAPI __stdcall
#endif

/* for the C/DOS library */
#ifndef _WINDOWS

#ifndef LONG
#define LONG long int
#endif
#ifndef LPLONG
#define LPLONG long int *
#endif
#ifndef WINAPI
#define WINAPI pascal
#endif
#ifndef VOID
#define VOID void
#endif
#ifndef LPSTR
#define LPSTR char *
#endif
#ifndef LPDWORD
#define LPDWORD long int *
#endif
#ifndef HINSTANCE
#define HINSTANCE long int
#endif
#ifndef HWND
#define HWND unsigned short
#endif

#endif

#ifndef LIBRARY_CLIPPER
#define PP_ADDDAYS pp_adddays
#define PP_BITCLEAR pp_bitclear
#define PP_BITSET pp_bitset
#define PP_BITTEST pp_bittest
#define PP_CDPROTECT pp_cdprotect
#define PP_CEDATE pp_cedate
#define PP_CHECKSUM pp_checksum
#define PP_CENUM pp_cenum
#define PP_CHKVARCHAR pp_chkvarchar
#define PP_CHKVARDATE pp_chkvardate
#define PP_CHKVARNUM pp_chkvarnum
#define PP_COMPNO pp_compno
#define PP_COMPNO32DRIVERS pp_compno32drivers
#define PP_CONVERTV3 pp_convertv3
#define PP_COPYADD pp_copyadd
#define PP_COPYCHECK pp_copycheck
#define PP_COPYCHECKTH pp_copycheckth
#define PP_COPYDELETE pp_copydelete
#define PP_COPYGET pp_copyget
#define PP_COUNTDEC pp_countdec
#define PP_COUNTINC pp_countinc
#define PP_CTCODES pp_ctcodes
#define PP_DAYSLEFT pp_daysleft
#define PP_DECRYPT pp_decrypt
#define PP_ENCRYPT pp_encrypt
#define PP_ERRORSTR pp_errorstr
#define PP_EXPIRED pp_expired
#define PP_EXPORTACTFILE pp_exportactfile
#define PP_EZTRIAL1 pp_eztrial1
#define PP_EZTRIAL1EX pp_eztrial1ex
#define PP_EZTRIAL1TEST pp_eztrial1test
#define PP_EZTRIAL2 pp_eztrial2
#define PP_EZTRIG1 pp_eztrig1
#define PP_EZTRIG1DLG pp_eztrig1dlg
#define PP_EZTRIG1EX pp_eztrig1ex
#define PP_FILEDELETE pp_filedelete
#define PP_GETCODE pp_getcode
#define PP_GETDATE pp_getdate
#define PP_GETTIME pp_gettime
#define PP_GETVARCHAR pp_getvarchar
#define PP_GETVARDATE pp_getvardate
#define PP_GETVARNUM pp_getvarnum
#define PP_GOTOURL pp_gotourl
#define PP_HDSERIAL pp_hdserial
#define PP_IMPORTACTFILE pp_importactfile
#define PP_INITLIB pp_initlib
#define PP_LASTDAY pp_lastday
#define PP_LANACTIVE pp_lanactive
#define PP_LANCHECK pp_lancheck
#define PP_LIBTEST pp_libtest
#define PP_LFALIAS pp_lfalias
#define PP_LFCLOSE pp_lfclose
#define PP_LFCOPY pp_lfcopy
#define PP_LFCREATE pp_lfcreate
#define PP_LFDELETE pp_lfdelete
#define PP_LFLOCK pp_lflock
#define PP_LFOPEN pp_lfopen
#define PP_LFUNLOCK pp_lfunlock
#define PP_NDECRYPT pp_ndecrypt
#define PP_NDECRYPTX pp_ndecryptx
#define PP_NENCRYPT pp_nencrypt
#define PP_NENCRYPTX pp_nencryptx
#define PP_NETCLOSE pp_netclose
#define PP_NETOPEN pp_netopen
#define PP_NETTEST pp_nettest
#define PP_NPDATE pp_npdate
#define PP_PASSWORD pp_password
#define PP_REDIR pp_redir
#define PP_SEMCLOSE pp_semclose
#define PP_SEMCOUNT pp_semcount
#define PP_SEMOPEN pp_semopen
#define PP_SEMTEST pp_semtest
#define PP_SEMUSED pp_semused
#define PP_SETREGPERM pp_setregperm
#define PP_SETVARCHAR pp_setvarchar
#define PP_SETVARDATE pp_setvardate
#define PP_SETVARNUM pp_setvarnum
#define PP_SYSINFO pp_sysinfo
#define PP_TCODE pp_tcode
#define PP_TIMERCHECK pp_timercheck
#define PP_TIMERSTART pp_timerstart
#define PP_TRANSFER pp_transfer
#define PP_UPDDATE pp_upddate
#define PP_VALDATE pp_valdate
#define PP_LIBVERSION pp_libversion
#define PP_GET4108MAC pp_get4108mac

#endif

 
/* function prototypes follow */
VOID PPPEXPORT WINAPI PP_ADDDAYS( LPLONG month, LPLONG day, LPLONG year, LONG days );
LONG PPPEXPORT WINAPI PP_BITCLEAR( LPDWORD bit_field, LONG bit_number );
LONG PPPEXPORT WINAPI PP_BITSET( LPDWORD bit_field, LONG bit_number );
LONG PPPEXPORT WINAPI PP_BITTEST( LONG bit_field, LONG bit_number );
LONG PPPEXPORT WINAPI PP_CDPROTECT( LONG flags, LPSTR filename, LONG sectorsize, LONG numsectors, LONG validations, LONG seed1, LONG seed2, LONG seed3, LONG seed4);
VOID PPPEXPORT WINAPI PP_CEDATE( LONG cenum, LPLONG month, LPLONG day, LPLONG year );
LONG PPPEXPORT WINAPI PP_CHECKSUM( LPSTR filename, LPLONG checksum );
LONG PPPEXPORT WINAPI PP_CENUM( VOID );
LONG PPPEXPORT WINAPI PP_CHKVARCHAR( LONG type, LONG var_no );
LONG PPPEXPORT WINAPI PP_CHKVARDATE( LONG type, LONG var_no );
LONG PPPEXPORT WINAPI PP_CHKVARNUM( LONG type, LONG var_no );
LONG PPPEXPORT WINAPI PP_COMPNO32DRIVERS( LONG driver, LONG flags);
LONG PPPEXPORT WINAPI PP_COMPNO( LONG cnotype, LPSTR filename, LPSTR hard_drive );
LONG PPPEXPORT WINAPI PP_CONVERTV3( LONG handle, LPSTR v3_cf, LPSTR v3_cpf, LONG v3_sn );
LONG PPPEXPORT WINAPI PP_COPYADD( LONG handle, LONG flags, LONG value );
LONG PPPEXPORT WINAPI PP_COPYCHECK( LONG handle, LONG action, LONG comp_num );
LONG PPPEXPORT WINAPI PP_COPYCHECKTH( LONG handle, LONG action, LONG comp_num, LONG threshold );
LONG PPPEXPORT WINAPI PP_COPYDELETE( LONG handle, LONG comp_num );
LONG PPPEXPORT WINAPI PP_COPYGET( LONG handle, LONG slot, LPLONG comp_num );
LONG PPPEXPORT WINAPI PP_COUNTDEC( LONG handle, LONG var_no );
LONG PPPEXPORT WINAPI PP_COUNTINC( LONG handle, LONG var_no );
LONG PPPEXPORT WINAPI PP_CTCODES( LONG code, LONG cenum, LONG computer, LONG seed );
LONG PPPEXPORT WINAPI PP_DAYSLEFT( LONG handle, LPLONG daysleft );
VOID PPPEXPORT WINAPI PP_DECRYPT( LPSTR instr, LPSTR pwstr, LPSTR ret );
VOID PPPEXPORT WINAPI PP_ENCRYPT( LPSTR instr, LPSTR pwstr, LPSTR ret );
VOID PPPEXPORT WINAPI PP_ERRORSTR( LONG number, LPSTR buffer );
LONG PPPEXPORT WINAPI PP_EXPIRED( LONG handle );
LONG PPPEXPORT WINAPI PP_EXPORTACTFILE(LONG flags, LONG lfhandle, LPSTR licensepath, LPSTR filepath, LPSTR server, LPSTR url, LPSTR key, LONG licenseid, LPSTR password, LONG compid, LPSTR version, LONG productid, LPSTR source);
LONG PPPEXPORT WINAPI PP_EZTRIAL1( LPSTR filename, LPSTR password, LPLONG errorcode, LPLONG lfhandle );
LONG PPPEXPORT WINAPI PP_EZTRIAL1EX( LPSTR filename, LPSTR password, LONG flags, LPLONG errorcode, LPLONG lfhandle );
LONG PPPEXPORT WINAPI PP_EZTRIAL1TEST( LONG lfhandle, LPLONG errorcode );
LONG PPPEXPORT WINAPI PP_EZTRIAL2( HWND hwndDlg, LPSTR filename, LPSTR password, LONG flags, LPLONG errorcode, LPLONG lfhandle );
LONG PPPEXPORT WINAPI PP_EZTRIG1( LONG hwnd, LPSTR filename, LPSTR password, LPLONG errorcode );
LONG PPPEXPORT WINAPI PP_EZTRIG1DLG( LONG hwnd, LONG handle, LONG flags, LPSTR labels, LONG usercode1, LONG usercode2, LONG tcseed, LONG regkey2seed, LPLONG tcvalue, LPLONG tcdata );
LONG PPPEXPORT WINAPI PP_EZTRIG1EX( LONG handle, LONG regkey1, LONG regkey2, LONG flags, LONG usercode1, LONG usercode2, LONG tcseed, LONG regkey2seed, LPLONG tcvalue, LPLONG tcdata );
LONG PPPEXPORT WINAPI PP_FILEDELETE( LPSTR filename );
LONG PPPEXPORT WINAPI PP_GETCODE( HWND hwnd, LPSTR str_title, LPSTR str_cenum, LPSTR str_comp, LPSTR str_code );
VOID PPPEXPORT WINAPI PP_GETDATE( LPLONG month, LPLONG day, LPLONG year, LPLONG dayofweek );
VOID PPPEXPORT WINAPI PP_GETTIME( LPLONG hours, LPLONG minutes, LPLONG seconds, LPLONG hseconds );
LONG PPPEXPORT WINAPI PP_GETVARCHAR( LONG handle, LONG var_no, LPSTR buffer );
LONG PPPEXPORT WINAPI PP_GETVARDATE( LONG handle, LONG var_no, LPLONG month_hours, LPLONG day_minutes, LPLONG year_seconds );
LONG PPPEXPORT WINAPI PP_GETVARNUM( LONG handle, LONG var_no, LPLONG value );
LONG PPPEXPORT WINAPI PP_GOTOURL( LONG hwnd, LONG lfhandle, LONG flags, LPSTR url );
LONG PPPEXPORT WINAPI PP_HDSERIAL( LPSTR drive );
LONG PPPEXPORT WINAPI PP_IMPORTACTFILE(LONG flags, LONG lfhandle, LONG type, LONG compID, LPLONG regkey1, LPLONG regkey2, LPLONG session, LPSTR licenseupd);
VOID PPPEXPORT WINAPI PP_INITLIB( HINSTANCE hInstance );
VOID PPPEXPORT WINAPI PP_LASTDAY( LONG month, LPLONG day, LONG year );
LONG PPPEXPORT WINAPI PP_LANACTIVE( LONG handle );
LONG PPPEXPORT WINAPI PP_LANCHECK( LONG handle );
LONG PPPEXPORT WINAPI PP_LIBTEST( LONG testnum );
VOID PPPEXPORT WINAPI PP_LIBVERSION(LPLONG ver1, LPLONG ver2, LPLONG ver3, LPLONG ver4);
LONG PPPEXPORT WINAPI PP_LFALIAS( LONG handle, LPSTR filename, LONG flags, LONG type, LPSTR password, LPLONG recenthandle );
LONG PPPEXPORT WINAPI PP_LFCLOSE( LONG handle );
LONG PPPEXPORT WINAPI PP_LFCOPY( LONG handle, LPSTR filename, LONG lftype );
LONG PPPEXPORT WINAPI PP_LFCREATE( LPSTR file, LONG flags, LONG lftype, LPSTR password, LONG attrib );
LONG PPPEXPORT WINAPI PP_LFDELETE( LPSTR filename, LONG flags, LONG type, LPSTR password );
LONG PPPEXPORT WINAPI PP_LFLOCK( LONG mem_handle );
LONG PPPEXPORT WINAPI PP_LFOPEN( LPSTR filename, LONG flags, LONG type, LPSTR password, LPLONG ret_handle );
LONG PPPEXPORT WINAPI PP_LFUNLOCK( LONG mem_handle );
LONG PPPEXPORT WINAPI PP_COMPNO32DRIVERS( LONG DRIVER, LONG FLAGS);
LONG PPPEXPORT WINAPI PP_NDECRYPT( LONG number, LONG seed );
LONG PPPEXPORT WINAPI PP_NDECRYPTX( LPSTR buffer, LPLONG value1, LPLONG value2, LPLONG value3, LPLONG value4, LONG seed );
LONG PPPEXPORT WINAPI PP_NENCRYPT( LONG number, LONG seed );
VOID PPPEXPORT WINAPI PP_NENCRYPTX( LPSTR buffer, LONG value1, LONG value2, LONG value3, LONG value4, LONG seed );
LONG PPPEXPORT WINAPI PP_NETCLOSE(LONG lNetHandle);
LONG PPPEXPORT WINAPI PP_NETOPEN(LPSTR network_password, LONG flags, LONG number1, LPSTR string1, LPLONG nethandle, LPLONG errorcode);
LONG PPPEXPORT WINAPI PP_NETTEST(LONG lNetHandle);
VOID PPPEXPORT WINAPI PP_NPDATE( LPLONG month, LPLONG day, LPLONG year, LONG dop );
LONG PPPEXPORT WINAPI PP_PASSWORD( LPSTR instr );
LONG PPPEXPORT WINAPI PP_REDIR( LPSTR drive );
LONG PPPEXPORT WINAPI PP_SEMCLOSE( LONG handle );
LONG PPPEXPORT WINAPI PP_SEMCOUNT( LONG handle, LONG semtype, LPSTR prefix_server, LPSTR name, LPLONG number );
LONG PPPEXPORT WINAPI PP_SEMOPEN( LONG handle, LONG semtype, LPSTR prefix_server, LPSTR name, LPLONG sem_handle );
LONG PPPEXPORT WINAPI PP_SEMTEST( LONG sem_handle );
LONG PPPEXPORT WINAPI PP_SEMUSED( LONG handle, LONG semtype, LPSTR prefix_server, LPSTR name, LPLONG number );
LONG PPPEXPORT WINAPI PP_SETREGPERM( LONG hive, LPSTR key, LONG flags );
LONG PPPEXPORT WINAPI PP_SETVARCHAR( LONG handle, LONG var_no, LPSTR buffer );
LONG PPPEXPORT WINAPI PP_SETVARDATE( LONG handle, LONG var_no, LONG month_hours, LONG day_minutes, LONG year_seconds );
LONG PPPEXPORT WINAPI PP_SETVARNUM( LONG handle, LONG var_no, LONG value );
LONG PPPEXPORT WINAPI PP_SYSINFO(LONG flags);
LONG PPPEXPORT WINAPI PP_TCODE( LONG number, LONG cenum, LONG computer, LONG seed );
LONG PPPEXPORT WINAPI PP_TIMERCHECK( LONG timestamp, LONG minutes );
LONG PPPEXPORT WINAPI PP_TIMERSTART( VOID );
LONG PPPEXPORT WINAPI PP_TRANSFER( LONG handle, LPSTR filename, LPSTR password, LONG comp_num );
LONG PPPEXPORT WINAPI PP_UPDDATE( LONG handle, LONG flag );
LONG PPPEXPORT WINAPI PP_VALDATE( LONG handle );
LONG PPPEXPORT WINAPI PP_GET4108MAC( VOID );

//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////





#ifdef __cplusplus     /* End of extern "C" { */
}
#endif  /* __cplusplus */

#endif
 


LibW.mak
Code: Select all  Expand view
#Microsoft VS2010 make sample, (c) FiveTech Software 2010

HBDIR=D:\Harbour
FWDIR=D:\fwH
VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
SDKDIR="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A"
OBJDIR="Obj"

.SUFFIXES: .prg .c .obj .rc .res

objList  = $(OBJDIR)\xPPP.obj
                       
Crm.lib : $(objList)
    # I just need .obj file.
   
.c.obj:
   cl.exe -c -TP -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $< -Fo$(OBJDIR)\$@

$(OBJDIR)\xPPP.obj  : xPPP.c


http://www.objekt.com.tr/fwh_test/source.rar
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1288
Joined: Fri May 23, 2008 1:33 pm

Re: Help needed for compiling .c in VS2010?

Postby Horizon » Fri Jun 21, 2013 8:14 am

Anyone?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1288
Joined: Fri May 23, 2008 1:33 pm

Re: Help needed for compiling .c in VS2010?

Postby Richard Chidiak » Fri Jun 21, 2013 12:26 pm

Hakan

The tests i made with keylib32.dll and msvc2010 failed

i could not retreive the dll

HTH

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Help needed for compiling .c in VS2010?

Postby Horizon » Fri Jun 21, 2013 12:40 pm

Richard Chidiak wrote:Hakan

The tests i made with keylib32.dll and msvc2010 failed

i could not retreive the dll

HTH

Richard


Thank you Richard,

Can you achive to compile it?. I though dll is required for runtime.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1288
Joined: Fri May 23, 2008 1:33 pm

Re: Help needed for compiling .c in VS2010?

Postby Horizon » Mon Jun 24, 2013 9:09 am

Antonio,

Any hint?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1288
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 104 guests