int WINAPI WinMain()
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPWSTR lpCmdLine,
int nShowCmd
);

Parameters

hInstance
[in] Handle to the current instance of the application.
hPrevInstance
[in] Handle to the previous instance of the application. For a Win32-based application, this parameter is always NULL.

If you need to detect whether another instance already exists, create a uniquely named mutex using the CreateMutex function. CreateMutex will succeed even if the mutex already exists, but the GetLastError function will return ERROR_ALREADY_EXISTS. This indicates that another instance of your application exists, because it created the mutex first.

lpCmdLine
[in] Pointer to a null-terminated string that specifies the command line for the application, excluding the program name.
nShowCmd
[in] Specifies how the window is to be shown. This parameter can be one of the following values:

Value Description
SW_HIDE Hides the window and activates another window.
SW_SHOW Activates a window and displays it in its current size and position.
SW_SHOWNA Displays a window in its current state. The active window remains active.
SW_SHOWNOACTIVATE Displays a window in its most recent size and position. The active window remains active.
SW_SHOWNORMAL Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position (same as SW_RESTORE).

入口函数WinMain的更多相关文章

  1. Qt Windows下链接子系统与入口函数(终结版)(可同时存在main和WinMain函数)

    Qt Windows下链接子系统与入口函数(终结版) 转载自:http://blog.csdn.net/dbzhang800/article/details/6358996 能力所限,本讨论仅局限于M ...

  2. dll 入口函数

    http://support.microsoft.com/kb/815065/zh-cn // SampleDLL.cpp // #include "stdafx.h" #defi ...

  3. 1.2. chromium源代码分析 - chromiumframe - 入口函数

    ChromiumFrame的入口函数在main.cpp中,打开main.cpp.中包含3个类和_tWinMain函数._tWinMain就是我们要找的入口函数.我做了部分注释: int APIENTR ...

  4. C++的入口函数

    我们最开始学习c++时,就知道要写一个main()函数,并且知道这是整个函数的入口,但是c++不只有main()函数这一个入口. 一.对于不同的程序函数入口是不同的. main()是WINDOWS的控 ...

  5. vs LNK2019 无法解析的外部符号 ***,该符号在函数 WinMain 中被引用

    一般链接错误都是因为包含头文件与lib库不匹配(无导出函数.lib库的release debug版本混乱.库引用的优先级.编译器设置mt/mtd等等)造成的. 错误    LNK2019    无法解 ...

  6. C++学习--入口函数

    在学习第一个C++程序的时候发现控制台程序的入口函数是int _tmain而不是main,查了资料才发现_tmain()是为了支持unicode所使用的main一个别名,宏定义在<stdafx. ...

  7. 解决:C++ 中 main函数 wmain函数 _tmain函数 WinMain函数 wWInMain函数 _tWinMain函数的区别

    main函数与WinMain函数区别: 前者为控制台程序入口主函数,后者为Windows API窗体程序入口函数,在windef.h文件中定义. main函数与wmain函数 | WinMain函数与 ...

  8. [C#] 了解过入口函数 Main() 吗?带你用批处理玩转 Main 函数

    了解过入口函数 Main() 吗?带你用批处理玩转 Main 函数 目录 简介 特点 方法的参数 方法的返回值 与批处理交互的一个示例 简介 我们知道,新建一个控制台应用程序的时候,IDE 会同时创建 ...

  9. 修改PE文件的入口函数OEP

    修改入口函数地址.这个是最省事的办法,在原PE文件中新增加一个节,计算新节的RVA,然后修改入口代码,使其指向新增加的节.当然,如果.text节空隙足够大的话,不用添加新节也可以. BOOL Chan ...

随机推荐

  1. Maven生成项目文档

    Maven项目可以通过maven-site-plugin插件生成项目文档,无论什么项目都可以生成. 执行命令: mvn site 生成完成的输出目录在${basedir}/target/site文件夹 ...

  2. 深入GCD(二): 多核心的性能

    概念为了在单一进程中充分发挥多核的优势,我们有必要使用多线程技术(我们没必要去提多进程,这玩意儿和GCD没关系).在低层,GCD全局dispatch queue仅仅是工作线程池的抽象.这些队列中的Bl ...

  3. 【转】 nginx重定向规则详细介绍

    rewrite命令 nginx的rewrite相当于apache的rewriterule(大多数情况下可以把原有apache的rewrite规则加上引号就可以直接使用),它可以用在server,loc ...

  4. Redhat7/centOs7 安装配置python3.6.5

    centos默认安装python2,设置py2和py3并存的方法如下: sudo yum install openssl-devel -y sudo yum install zlib-devel -y ...

  5. BUPT 2012复试机考 4T

    题目描述 我们都学习过计算机网络,知道网络层IP协议数据包的头部格式如下: 其中IHL表示IP头的长度,单位是4字节:总长表示整个数据包的长度,单位是1字节.传输层的TCP协议数据段的头部格式如下:  ...

  6. 具体解释window.history

    Window.history保存用户在一个会话期间的站点訪问记录,用户每次訪问一个新的URL即创建一个新的历史记录. history.go().history.back().history.forwa ...

  7. invlpg 指令简单介绍

    invlpg 指令简单介绍 void tlb_invalidate(pde_t *pgdir, void *va) { // Flush the entry only if we're modifyi ...

  8. Python——正則表達式(2)

    本文译自官方文档:Regular Expression HOWTO 參考文章:Python--正則表達式(1) 全文下载 :Python正則表達式基础 ======================== ...

  9. css 滤镜之AlphaImageLoader

      CreateTime--2017年12月25日17:05:37 Author:Marydon ie滤镜特效之AlphaImageLoader 作用: 用于设置背景图片特效样式 使用条件: IE8及 ...

  10. 各种加载效果,适合做加载loading动画效果 Eclipse版

    Animation.rar 链接: http://pan.baidu.com/s/1c0QkOz2 密码: kd57