01 windows程式和console程式區別

2022-09-06 21:00:14 字數 2037 閱讀 3416

一. windows程式和控制台程式的區別:

1. 入口點不同:

window程式:

int __stdcall wwinmain(  hinstance hinstance,

hinstance hprevinstance,

lpwstr lpcmdline,

int ncmdshow);

控制台程式:

int main();

2. 連線選項不同:

windows程式鏈結選項:/subsystem:windows

控制台程式鏈結選項:/subsystem:console

二. windows程式入口點的解釋

int __stdcall wwinmain(hinstance hinstance,//例項控制代碼,0x00400000,記憶體中程式首位址

hinstance hprevinstance,//向後相容,基本不用

lpwstr lpcmdline,//命令列

int ncmdshow);//程式最初如何顯示

三. windows函式

大部分函式都有a版和w版,例如

messagebox

#ifdef unicode

#define messagebox messageboxw

#else

#define messagebox messageboxa

#endif // !unicode

text

(quote)

也是通過定義

unicode

實現的。

tchar.h中的

__t(x)

用的是_unicode

,多乙個下劃線。

檔案開關

巨集tchar.h

_unicode

_twinnt.h

unicode

text

一. windows程式和控制台程式的區別:

1. 入口點不同:

window程式:

int __stdcall wwinmain(  hinstance hinstance,

hinstance hprevinstance,

lpwstr    lpcmdline,

int       ncmdshow);

控制台程式:

int main();

2. 連線選項不同:

windows程式鏈結選項:/subsystem:windows

控制台程式鏈結選項:/subsystem:console

二. windows程式入口點的解釋

int __stdcall wwinmain(hinstance hinstance,//例項控制代碼,

0x00400000

,記憶體中程式首位址

hinstance hprevinstance,//向後相容,基本不用

lpwstr    lpcmdline,//命令列

int       ncmdshow);//程式最初如何顯示

三. windows函式

大部分函式都有a版和w版,例如

messagebox

。#ifdef

unicode

#define

messagebox

messageboxw

#else

#define

messagebox  messageboxa

#endif

// !unicode

text

(quote)

也是通過定義

unicode

實現的。

tchar.h中的

__t(x)

用的是_unicode

,多乙個下劃線。

檔案開關

巨集tchar.h

_unicode

_twinnt.h

unicode

text

(0 1)windows下的mysql配置使用步驟

目錄 1 基於windows平台的mysql專案場景 2 mysql資料庫執行環境準備 4 通過installer方式 即msi方式 安裝mysql 5 解除安裝mysql 1 基於windows平台的mysql專案場景 小型購物 中小型論壇 中小型門戶 部落格系統 idc 雲平台 虛擬主機 2 m...

01windows常用快捷鍵 dos命令

ctrl c 複製 ctrl v 貼上 ctrl a 全選 ctrl x 剪下 ctrl z 撤銷 ctrl s 儲存 alt f4 關閉視窗 shift delete 永久刪除 windows r 開個執行 windows e 開啟我的電腦 ctrl shift esc 開啟任務管理器 windo...

01windows常用命令及批處理

1.概述 複製內容 右鍵彈出快捷選單,選擇 標記 k 然後選中所需要的內容,然後右鍵即可 貼上內容 右鍵彈出快捷選單,選擇 貼上 p 命令引數的路徑 要使用反斜槓 不要使用正斜槓 如 del d test2 file my.txt 命令引數的路徑 若存在空格,應使用雙引號將路徑引起來 如 del d...