GetCommandLineA fails under Vista

  • Thread starter Thread starter Josh Sale
  • Start date Start date
J

Josh Sale

I have an old add-in that somebody is now trying to run under Vista using
Excel 2003. My add-in makes use of GetCommandLineA. The definition is:

Private Declare Function GetCommandLineA Lib "kernel32" () As String

This works under all previous versions of Windows and lots of flavors of
Excel ... but not with Vista.

I tried doing a GetCommandLineW and that doesn't fail, but it looks like
every character is preceded by a space.

Anybody got any suggestions?

TIA,

josh
 
Josh,
Working with the W visions of API calls means you have Unicode strings.
The easiest way (for me) is using byte arrays and StrConv when necessary.

Can't tell you about Vista though..

NickHK
 
Back
Top