Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

FormatMEssage for IS5?


2 replies to this topic

Perotin

Perotin
  • Full Members
  • 407 posts

Posted 27 June 2012 - 09:58

Hello!

When using SHGetFolderPathA in my script, it always returns -1.
Flexera uses a FormatMessage function (available in IS 2008 and later?) to display further information.
Is it possible to use this in IS5?
Can anyone help me with this function to copy into my script?

Thanks a lot!
Gruß / regards
Thomas

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 June 2012 - 12:10

I think that FormatMessage essentially does the same as Visual Studio's ErrLook and works for error codes similar to 0x80070005 which are returned by Windows API functions. However, -1 looks like a generic return value that doesn't give extra information. I think you'd have to use the Err object's LastDllError property, but I guess that doesn't exist in IS5.

Perotin

Perotin
  • Full Members
  • 407 posts

Posted 27 June 2012 - 12:53

Thanks, Stefan!

I will try the WinApi FormatMessage and see if it helps ...
Gruß / regards
Thomas