#include <windows.h>
static Windows::Foundation::DateTime GetCurrentDateTime() {
// Get the current system time
SYSTEMTIME st;
GetSystemTime(&st);
// Convert it to something DateTime will understand
FILETIME ft;
SystemTimeToFileTime(&st, &ft);
...