Jump to content

Dllcall problem


arcker
 Share

Recommended Posts

hello, i need the conversion function "filetimetosystemtime" in kernel32.dll

here is an example

i precise that .pwdlastset is an int64 value.

AutoItSetOption("MustDeclareVars", 1)
Dim $strUserDN,  $objUser, $objPwdLastSet
Dim $objShell, $lngBiasKey, $k, $filetime,$systemtime

; Obtain local Time Zone bias from machine registry.
 

$strUserDN = "cn=test y,ou=TestUSB,dc=humanis,dc=local"
 $objUser = ObjGet("LDAP://" & $strUserDN)
 $objPwdLastSet = $objUser.pwdLastSet
;ConsoleWrite ("Password last set: " & Integer8Date($objPwdLastSet, $lngTZBias))

$filetime = DllStructCreate ("dword;dword")
$systemtime = DllStructCreate ("short;short;short;short;short;short;short;short")

dllcall("kernel32.dll","int64","FileTimeToSystemTime","ptr",DllStructGetPtr($filetime),"ptr",DllStructGetPtr($systemtime))
ConsoleWrite(DllStructGetData($systemtime,1)

structures links :

Systemtime

Filetimetosystemtime

FileTime

IADsLargeInteger

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...