//*****************************************************************************
// Windows API Prototypes
//*****************************************************************************
prototype stdcall VOID KERNEL32.GetSystemTime(POINTER);
prototype stdcall BOOL KERNEL32.SystemTimeToTzSpecificLocalTime(POINTER, POINTER, POINTER);
typedef _SYSTEMTIME begin
SHORT iyear;
SHORT imonth;
SHORT iDayOffWeek;
SHORT iday;
SHORT ihour;
SHORT iminute;
SHORT isecond;
SHORT imillisecond;
end;
_SYSTEMTIME SystemTime, LocalTime;
_SYSTEMTIME POINTER pSystemTime, pLocalTime;
#include "ifx.h"
#include "isrt.h"
#include "iswi.h"
#include "WinApi.h"
export prototype MiscCommon_Installed();
function MiscCommon_Installed()
VARIANT Day, Year, Month;
STRING sYear, sDay, sMonth;
BOOL bSuccess;
STRING dragon;
STRING svName;
NUMBER nvSize;
STRING temp;
begin
// Get current day, month, and year
pSystemTime = &SystemTime;
GetSystemTime(pSystemTime);
pLocalTime = &LocalTime;
bSuccess = SystemTimeToTzSpecificLocalTime(NULL, pSystemTime, pLocalTime);
Year = pLocalTime->iyear;
sYear = Year;
Month = pLocalTime->imonth;
sMonth = Month;
Day = pLocalTime->iday;
sDay = Day;
//MessageBox (sMonth, INFORMATION );
RegDBSetKeyValueEx("\\SOFTWARE\\ComHouse Wireless\\Release", "InstallYear", REGDB_NUMBER, sYear, -1 );
RegDBSetKeyValueEx("\\SOFTWARE\\ComHouse Wireless\\Release", "InstallMonth", REGDB_NUMBER, sMonth, -1 );
RegDBSetKeyValueEx("\\SOFTWARE\\ComHouse Wireless\\Release", "InstallDay", REGDB_NUMBER, sDay, -1 );
RegDBSetKeyValueEx("\\SOFTWARE\\ComHouse Wireless\\Release", "INSTALLDIR", REGDB_STRING, INSTALLDIR, -1 );
end;
|