How's that for generic? 
SystemTimeToVariantTime, remember this one?
This works on my system, and with my newly found friend in Australia (Say Hi Wayne) he GPF's.
We swapped OLEAUT32.DLL'S just to test, same thing....
He uses a BYCOPY ctdate below and it works, but I don't nad it works.
Our declares are both:
DECLARE FUNCTION SystemTimeToVariantTime LIB "OLEAUT32.DLL" ALIAS "SystemTimeToVariantTime" (lpSystemTime AS SYSTEMTIME, vbtime AS DOUBLE) AS LONG
The code:
------------------
Scott

SystemTimeToVariantTime, remember this one?
This works on my system, and with my newly found friend in Australia (Say Hi Wayne) he GPF's.
We swapped OLEAUT32.DLL'S just to test, same thing....
He uses a BYCOPY ctdate below and it works, but I don't nad it works.
Our declares are both:
DECLARE FUNCTION SystemTimeToVariantTime LIB "OLEAUT32.DLL" ALIAS "SystemTimeToVariantTime" (lpSystemTime AS SYSTEMTIME, vbtime AS DOUBLE) AS LONG
The code:
Code:
'EvalDays is how many days they are allowed To evaluate the software 'InstallDate will be In this format: ' "MMM dd',' yyyy" "hh:mm tt" Function IsPastExpireDate(InstallDate As String,ExpireDate As String,EvalDays As Long)Export As Long 'Dim qTimeNow As Local Quad Dim ctdate As Double Dim indate As Double Dim edate As Double Local ct As SYSTEMTIME Local et As SYSTEMTIME '------------------- 'Get Current Time GetlocalTime ct 'Convert CurrentDate to double GPF HERE on his PC, not mine: SystemTimeToVariantTime ct, ctdate 'Current Time in variant format '------------------- If Len(ExpireDate) Then 'Convert ExpirationDate to double edate = StrToVbDate(ExpireDate) 'if todays date is bigger than the expiration date then we expired If ctdate > edate Then Function = %TRUE Else 'Convert InstallDate to double indate = StrToVbDate(InstallDate) 'Compare the two dates and see If it's greater than the allowed evaluation time If (ctdate - indate) > EvalDays Then Function = %TRUE End If End Function
Scott
Comment