The VariantTimeToSystemTime does not alter the variant time and gets a double, not a double pointer. Also I think you must declare API functions globally, not inside the main function.