var flags uint32 = syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS | syscall.FORMAT_MESSAGE_FROM_HMODULE
libpdhDll := syscall.MustLoadDLL("pdh.dll")
buffer := make([]uint16, 300)
// Have to cast Handle, which is a uintptr, to a uint32 due to the signature of FormatMessage
syscall.FormatMessage(flags, uint32(libpdhDll.Handle), <some error number>, 0, buffer, nil)