Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default GetCommandLineA fails under Vista

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default GetCommandLineA fails under Vista

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

"Josh Sale" <jsale@tril dot cod wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default GetCommandLineA fails under Vista

Thanks Nick.

Great advice that worked for me.

josh


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XP vs Vista vs 7 Ernesto Torvals New Users to Excel 2 January 25th 10 11:34 PM
VISTA PaulaC New Users to Excel 1 July 28th 09 02:13 PM
Vista Doreen P Excel Discussion (Misc queries) 0 April 5th 07 01:56 AM
Vista Bill Martin[_2_] Excel Programming 1 April 5th 06 03:55 AM
Application Error when using GetCommandLineA tro Excel Programming 4 December 2nd 03 01:22 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"