几个可以使用的全局变量:

_CRTIMP extern int __argc;          /* count of cmd line args */
_CRTIMP extern char ** __argv;      /* pointer to table of cmd line args */
_CRTIMP extern wchar_t ** __wargv;  /* pointer to table of wide cmd line args */

 __argc、__argv、__wargv

 

如果是MFC项目,可以使用CWinAppm_lpCmdLine变量,注意这个m_lpCmdLine中不包含应用程序自身路径。

 

相关文章:

  • 2021-11-07
  • 2021-12-30
  • 2021-05-14
  • 2022-01-05
  • 2021-09-08
  • 2021-10-01
  • 2021-12-17
猜你喜欢
  • 2021-12-24
  • 2021-09-04
  • 2021-08-25
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案