Solved

GetCommmandLine Problem

Posted on 1998-01-26
1
569 Views
Last Modified: 2012-06-22
I use the GetCommandLine function to obtain parameters send to my exe file. It works very well in W95 but in WinNT in doesn't. Here is the declaration:
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As String
What happens when I call this function in WinNT: Program error occurs(GPF). I tried to change the declaration from  <Alias "GetCommandLineA" () As String> to :
<Alias "GetCommandLineW" () As String> but in that case the function returns only the first character of the command line string.
What's the problem and how to avoid it?
--
I use WinNT 4.0 and VB 5.0 EE
0
Comment
Question by:polygon
1 Comment
 
LVL 8

Accepted Solution

by:
mrmick earned 90 total points
ID: 1453494
Use the VB Command function instead, for example,

CommandParameters$ = Command
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now