tags:

views:

21

answers:

1

I have a Java application and I need to call into a Windows DLL using JNA. The function I need to call actually takes a __int64 (internally it splits this into low/high portions of the FILETIME structure). Given a java.util.Date object, how can I convert it to the appropriate value formatted for a FILETIME?

A: 

Ok, I think I figured it out:

long date = (new Date().getTime() + 11644473600000L) * 10000L;
Dennis