GetCommandLineA fails under Vista

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
 
N

NickHK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top