GetCommandLine和WinMain API的命令行是什么? [英] What is the command line at GetCommandLine and at WinMain API?

查看:107
本文介绍了GetCommandLine和WinMain API的命令行是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Win32应用程序,我调用GetCommandLine来获取并发送它作为WinMain的参数的命令行是什么?

For a Win32 application, what is the command line that I call GetCommandLine to get and send it as parameter for WinMain?

推荐答案

忽略编码和信息丢失的问题,并掩盖什么是宏和什么功能,GetCommandLine是一个API函数,用于检索传递的原始命令行到此过程,而WinMain是由您的代码定义的函数,Microsoft C和C ++运行时支持将调用该函数,并且传递了从第一个参数开始的命令行部分的副本,即不包括原始命令行开头的程序名称/路径.

Ignoring issues of encoding and information loss, and glossing over what's a macro and what's a function, GetCommandLine is an API function that retrieves the original command line passed to the process, while WinMain is a function defined by your code that is called by Microsoft's C and C++ runtime support, and that is passed a copy of the part of the command line extending from the first argument and on, i.e. not including the program name/path at the start of the original command line.

这篇关于GetCommandLine和WinMain API的命令行是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆