网站首页  词典首页

请输入您要查询的函数:

 

术语 getcommandline
释义 GetCommandLine
语法:
C++
LPTSTR WINAPI GetCommandLine(void);
GetCommandLine函数
检索命令当前生产线串。
参数
这个函数没有参数。
返回值
返回值是对命令当前进程行字符串指针。
备注
控制台的ANSI C语言编写的程序可以使用的主要功能argc和argv参数访问命令行参数。的ANSI GUI应用程序可以使用的WinMain函数lpCmdLine参数来访问命令行字符串,不包括程序的名称。主要的和WinMain函数不能返回Unicode字符串。
Unicode的C语言编写的控制台可以使用wmain或_tmain函数来访问命令行参数的过程。 Unicode的GUI应用程序必须使用GetCommandLineW函数访问Unicode字符串。
转换命令行一个字符串argv风格的数组,调用CommandLineToArgvW功能。
注意:在命令行可执行程序的名称,操作系统提供的进程并不一定是相同的命令行,该调用程序使CreateProcess函数。操作系统可能前面加上一个完全合格的路径,可执行文件的名称,在没有提供完全合格的路径。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetCommandLineW(Unicode)和GetCommandLineA(ANSI)的
参见
CreateProcess的
进程和线程函数
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetCommandLine Function
Retrieves the command-line string for the current process.
Syntax
C++
LPTSTR WINAPI GetCommandLine(void);
Parameters
This function has no parameters.
Return Value
The return value is a pointer to the command-line string for the current process.
Remarks
ANSI console processes written in C can use the argc and argv arguments of the main function to access the command-line arguments. ANSI GUI applications can use the lpCmdLine parameter of the WinMain function to access the command-line string, excluding the program name. The main and WinMain functions cannot return Unicode strings.
Unicode console process written in C can use the wmain or _tmain function to access the command-line arguments. Unicode GUI applications must use the GetCommandLineW function to access Unicode strings.
To convert the command line to an argv style array of strings, call the CommandLineToArgvW function.
Note The name of the executable in the command line that the operating system provides to a process is not necessarily identical to that in the command line that the calling process gives to the CreateProcess function. The operating system may prepend a fully qualified path to an executable name that is provided without a fully qualified path.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesGetCommandLineW (Unicode) and GetCommandLineA (ANSI)
See Also
CreateProcess
Process and Thread Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683156(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:17:44