ebook50-15

Similar documents
bingdian001.com

Microsoft Word - CIN-DLL.doc

Microsoft Word - 11.doc

ebook50-14

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2

ebook50-11

ebook129-9

untitled

FY.DOC

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

02

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer)


EK-STM32F

概述

Eclipse C C++, or

epub83-1

INTRODUCTION TO COM.DOC

附件三

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

提问袁小兵:

菩提道次第廣論

路 上 沒 說 話, 車 子 被 爸 離 去 後 開 走 了, 沒 什 麼 變, 除 了 一 股 淡 淡 的 香 味, 我 不 太 習 慣, 像 空 氣 中 的 粉 塵, 左 飄 右 飄, 光 中 飛 舞 我 沒 提, 看 車 窗 外, 外 面 不 太 有 趣, 我 只 是 沒 事 幹, 我 們 本

繁 華 國 小 101 學 年 母 親 節 感 恩 惜 福 - 跳 蚤 市 場 暨 科 學 闖 關 遊 戲 親 子 活 動 實 施 計 畫 一 依 據 : 本 校 101 學 年 度 校 務 計 畫 及 行 事 曆 二 目 的 : 1. 培 養 學 生 感 恩 惜 物 知 福 惜 福 的 節 儉 觀


育儿小故事(四)

台 中 市 北 屯 區 東 山 里 橫 坑 9 林 志 明 巷 89-5 菜 豆 菜 大 漿 果 菜 豆 菜 大 漿 果 小 漿 果 核 果 柑 桔 無 陳 錦 生 新 竹 市 香 山 區

人 物 春 秋 杨 永 泰 将 其 削 藩 策 略 概 括 为 : 以 经 济 方 法 瓦 解 冯 玉 祥 的 第 二 集 团 军, 以 政 治 方 法 解 决 阎 锡 山 的 第 3 集 团 军, 以 军 事 方 法 解 决 李 宗 仁 的 第 四 集 团 军, 以 外 交 方 法 对 付 张 学

Microsoft Word 養生與保健_中山大學_講義


萬里社區老人健康照護手冊

Microsoft Word - 強制汽車責任保險承保及理賠作業處理辦法 doc

Microsoft Word - 06.Understanding of Pregnancy and Birth.doc

(➂)11. 炎 炎 夏 日, 即 使 下 起 滂 沱 大 雨, 都 消 除 不 了 令 人 心 煩 的 暑 氣 這 句 話 主 要 想 表 達 什 麼? ➀ 夏 日 裡 經 常 下 著 滂 沱 大 雨, 令 人 心 煩 ➁ 下 著 滂 沱 大 雨 的 日 子, 可 以 消 除 暑 氣 ➂ 夏 日

範本檔

附 件 一 : 办 理 集 中 式 银 期 转 账 业 务 网 点 名 单 序 号 地 区 网 点 名 称 地 址 联 系 人 电 话 23 工 商 银 行 安 徽 省 铜 陵 百 大 支 行 铜 陵 市 长 江 东 路 50 号 鲁 桂 珍 工 商 银 行 安 徽

2. 二 年 級 吳 毓 秀 老 師 : 感 謝 午 餐 公 司 平 時 均 能 準 時 送 餐, 但 希 望 能 不 要 使 用 加 工 品, 且 學 生 反 映 希 望 能 多 加 蛋 品 的 食 物 3. 三 年 級 柯 阿 青 老 師 : 雞 肉 有 血 水 味, 請 午 餐 公 司 能 調

高雄市立五福國民中學九十四學年度第一學期第三次段考二年級本國語文學習領域試題卷

台北老爺校外實地參訪結案報告


糖尿病食譜



,,,,,,, (,, ),,,,,,,,,,,,,,, ,,, 4 11,, ( ),,,, ( ), :, ( ),,, 1995, 66 ; ( ),, 1996, , 3-4,,


2002 4,,, 1941,,,,,,,,,,,,,,,,,, : ;:, 1991,

#$%# & (! )! *! +! +! &! +!! * &! * )!! +, )! + &)!) $! )!+ *! +. &) #!/ #! #$$% & #$$ & #0#1! ) * # #$$( &! ) * +,!

ebook


93年各縣國中教師甄試最新考情.doc

年 中 央 国 家 机 关 政 府 采 购 中 心 网 上 竞 价 品 目 表 中 央 国 家 机 关 政 府 采 购 中 心 2016 年 7 月 21 日 - 2 -

bingdian001.com

新版 明解C++入門編

2.1 n ~á CPU q ˆ ~ µƒã î ˆ C++ à nù eô 1. (edit) 2. Í (preprocess) 3. (compile) 4. (link) 5. (load) 6. ˆ (execute) µl ô Ãs nù (editor) Í (preprocessor

ebook129-11

RunPC2_.doc


用户大会 论文集2.2.doc

开原天气参加铁岭市“三公开”教研活动 暨开原市农村小学语文识字

华恒家庭网关方案

c_cpp

untitled

課程名稱:國外旅遊概況

目 录

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1.

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

华南理工大学广州学院

教育部高等学校教学

不 是 想 了 想 又 说, 身 体 有 点 不 舒 服, 过 来 看 看 哦, 怎 么 了? 许 是 出 于 职 业 习 惯, 谭 清 辰 脱 口 而 出 你 是 外 科 大 夫 吧? 妇 科 的 毛 病 你 也 能 治? 田 惜 菁 明 显 不 愿 意 继 续 这 个 话 题, 说 话 语 气

Windows XP

untitled

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

C/C++程序设计 - 字符串与格式化输入/输出

AL-M200 Series

C++ 程式設計

C/C++ - 文件IO

範本檔

ebook66-15

哈尔滨应用职业技术学院2012年教育教学质量报告

Oracle Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE "P

ebook

如何挑选适合企业沟通的“聊天”软件?

ebook12-1

RUN_PC連載_10_.doc

Microsoft PowerPoint - ch6 [相容模式]

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM

ebook66-24

ebook140-8

C/C++ - 字符输入输出和字符确认

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc


99710a72ZW.PDF

ebook71-13

Microsoft Word - MSP430 Launchpad 指导书.docx

最新文化产业管理执法全书(一百一十).doc

ebook140-9

W. Richard Stevens UNIX Sockets API echo Sockets TCP OOB IO C struct C/C++ UNIX fork() select(2)/poll(2)/epoll(4) IO IO CPU 100% libevent UNIX CPU IO

untitled

高尔夫赌博现金棋牌,能赚现金的棋牌游戏 街机赌博游戏 真钱的棋牌游戏,30

Transcription:

15 82 C / C + + Developer Studio M F C C C + + 83 C / C + + M F C D L L D L L 84 M F C MFC DLL M F C 85 MFC DLL 15.1 82 C/C++ C C + + D L L M F C M F C 84 Developer Studio S t u d i o

292 C _ c p l u s p l u s C + + 1. 1) N e w Developer Studio N e w P r o j e c t Win32 Static L i b r a r y O K S t u d i o C C + +. l i b 2) S t u d i o P r o j e c t / S e t t i n g s P r o j e c t / S e t t i n g s S e t t i n g s Win32 Debug L i b r a r y Output File Name d S t d A f x. c p p S t d A f x. h M F C C + + C + M F C 3) C + + P r o j e c t S e t t i n g s C + + C / C + + C a t e g o r y Precompiled header C + + Not using precompiled headers 2. 1). c. c p p 2) C # include <stdlib.h> 3) Windows API # include <windows.h> 4) C C C C + + C + C C + + C e x t e r n c e x t e r n c C _ c p l u s p l u s _ c p l u s p l u C + + T R U E C FA L S E C C + + C + + C /* at the start of your C.h file */ extern "C"

15 293 #endif /* cplusplus */ : : : your C function prototypes : : : /* at the end of your C.h file */ 5) C C + + C 15. 1. 6 C + + 3. Project Settings L i n k. l i b. l i b Object/Library modules M F C C + + M F C C + + M F C ( C C + + ) C C + +. c. c p p C C + + ( c l a s s n e w ) D C /* WzdStatic.h : NonMFC Static Library * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / #if!defined WZDSTAT I C _ H #define WZDSTAT I C _ H extern "C" #endif /* cplusplus */ void WzdMessageBox(LPSTR pszstring); void DestroyWzdWindow(HWND hwnd); void WzdFunc3(BOOL b);

294 / * * WzdStatic.c : NonMFC "C" Static Library Using the Win32 API directly * / #include <stdlib.h> #include <windows.h> #include "WzdStatic.h" BOOL flag=fa L S E ; // must call Win32 API directly void WzdMessageBox(LPSTR pszstring) MessageBox(NULL,pszString,"Wzd Static Library",MB_OK); void DestroyWzdWindow(HWND hwnd) D e s t r o y Wi n d o w ( h W n d ) ; void WzdFunc3(BOOL b) f l a g = b ; C++ // WzdCpp.h : C++ Static Library / / #if!defined WZDCPP_H #define WZDCPP_H class CWzdDllCpp BOOL m_bflag; p u b l i c : C W z d C p p ( ) ; ~ C W z d C p p ( ) ; void WzdMessageBox(LPSTR pszstring); void DestroyWzdWindow(HWND hwnd); void WzdFunc3(BOOL b); ;

15 295 // WzdCpp.cpp : C++ Static library using the Win32 API directly / / #include <windows.h> #include <stdlib.h> #include W z d C p p. h C W z d C p p :: C W z d C p p () m _ b F l a g = FA L S E ; C W z d C p p : : ~ C W z d C p p ( ) // must call the Win32 API directly void CWzdCpp::WzdMessageBox(LPSTR pszstring) MessageBox(NULL,pszString,"Wzd DLL Cpp",MB_OK); void CWzdCpp::DestroyWzdWindow(HWND hwnd) D e s t r o y Wi n d o w ( h W n d ); void CWzdCpp::WzdFunc3(BOOL b) m _ b F l a g = b ; 15.2 83 C/C++ C C + + M F C M F C M F C 84 Developer Studio S t u d i o C _ c p l u s p l u s C + +

296 1. 1) N e w Developer Studio N e w P r o j e c t Wi n 32 Dynamic-Linked Library O K S t u d i o. l i b. d l l. l i b. d l l 2) S t u d i o P r o j e c t / S e t t i n g s P r o j e c t S e t t i n g s S e t t i n g s Win32 Debug L i b r a r y Output File Name d S t d A f x. c p p S t d A f x. h M F C C + + C + M F C 3) C + + P r o j e c t S e t t i n g s C + + C / C + + C a t e g o r y Precompiled header C + + Not using precompiled headers 2. 1). c. c p p 2) C # include <stdlib.h> 3) Windows API # include <windows.h> _declspec (dllexport) d e c l s p e c ( d l l e x p o r t ) 4) #ifdef WZDDLL_BLD #define DLL declspec(dllexport) #define DLL 5) D L L D L L W Z D D L L _ B L D Developer Studio P r o j e c t / S e t t i n g s Project Settings S e t t i n g s

15 297 All Configurations C / C + + W Z D D L L _ B L D Preprocessor definitions 6) D L L C D L L void DLL WzdMessageBox(LPSTR pszstring); void DLL WzdMessageBox(LPSTR pszstring) : : : 7) D L L C + + D L L class DLL CWzdDllCpp ; 8) C C C C + + C + C C + + C e x t e r n " c " e x t e r n " c " C _ c p l u s p l u s _ c p l u s p l u C + + T R U E C FA L S E C C + + C + + C /* at the start of your C.h file */ extern "C" #endif /* cplusplus */ : : : your C function prototypes : : : /* at the end of your C.h file */ 9) C C + + C C + + 3. Project Settings L i n k. l i b. l i b Object/library modules d l l PAT H D L L D

298 Wi n d o w s D L L D CD Te s t d l l C /* WzdDll.h : NonMFC Dll * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / #if!defined WZDDLL_H #define WZDDLL_H extern "C #endif /* cplusplus */ #ifdef WZDDLL_BLD #define DLL declspec(dllexport) #define DLL void DLL WzdMessageBox(LPSTR pszstring); void DLL DestroyWzdWindow(HWND hwnd); void DLL WzdFunc3(BOOL b); / * * WzdDll.c : NonMFC "C" Dll Using the Win32 API directly * / #include <windows.h> #include <stdlib.h> #include "WzdDll.h"

15 299 BOOL flag=fa L S E ; // must call Win32 API directly void DLL WzdMessageBox(LPSTR pszstring) MessageBox(NULL,pszString,"Wzd DLL",MB_OK); void DLL DestroyWzdWindow(HWND hwnd) D e s t r o y Wi n d o w ( h W n d ); void DLL WzdFunc3(BOOL b) f l a g = b ; C++ // WzdDllCpp.h : C++ NonMFC Dll / / #if!defined WZDDLLCPP_H #define WZDDLLCPP_H #ifdef WZDDLL_BLD #define DLL declspec(dllexport) #define DLL class DLL CWzdDllCpp BOOL m_bflag; p u b l i c : C W z d D l l C p p ( ) ; ~ C W z d D l l C p p ( ) ; void WzdMessageBox(LPSTR pszstring); void DestroyWzdWindow(HWND hwnd); void WzdFunc3(BOOL b); ;

300 // WzdDllCpp.cpp : NonMFC "C++" Dll Using the Win32 API directly / / #include <windows.h> #include <stdlib.h> #include "WzdDllCpp.h" C W z d D l l C p p :: C W z d D l l C p p () m _ b F l a g = FA L S E ; C W z d D l l C p p : : ~ C W z d D l l C p p ( ) // must call the Win32 API directly void CWzdDllCpp::WzdMessageBox(LPSTR pszstring) MessageBox(NULL,pszString,"Wzd DLL Cpp",MB_OK); void CWzdDllCpp::DestroyWzdWindow(HWND hwnd) D e s t r o y Wi n d o w ( h W n d ); void CWzdDllCpp::WzdFunc3(BOOL b) m _ b F l a g = b ; 15.3 84 MFC C + + M F C Developer Studio MFC DLL _declspec (dllexport) 1. M F C 1) N e w Developer Studio N e w P r o j e c t M F C

15 301 A p p Wizard (dll) O K 2) AppWi z a r d D L L Regular DLL M F C MFC Extension DLL M F C M F Regular DLL M F C D L L MFC Extension DLL MFC Extension DLL M F C M F M F C. l i b. d l l. l i b. d l l 3) S t u d i o P r o j e c t / S e t t i n g s P r o j e c t S e t t i n g s S e t t i n g s Win32 Debug L i b r a r y Output Name d 2. M F C 1) A p p Wi z a r d D L L C l a s s Wi z a r d M F C M F _declspec (dllexport) _declspec (dllexport) 2) #ifdef _WINDLL #define DLL declspec(dllexport) #define DLL _ W I N D L L D L L A p p Wi z a r d 3) D L L C + + D L L class DLL CWzdDllCpp ; 3.

302 1) Project Settings L i n k. l i b. l i b Object/library modules 2). d l l PAT H D L L D Shared MFC DLL Regular DLL M F C A F X _ M A N A G E _ S TATE ( ) void CWzdDllMFC::DestroyWzdWindow(HWND hwnd) A F X _ M A N A G E _ S TAT E ( A f x G e t S t a t i c M o d u l e S t a t e ( ) ) ; // rest of function here D CD Te s t d l l // WzdDllMFC.h : MFC Dll / / #if!defined WZDDLLMFC_H #define WZDDLLMFC_H #ifdef _WINDLL #define DLL declspec(dllexport) #define DLL class DLL CWzdDllMFC BOOL m_bflag; p u b l i c : C W z d D l l M F C ( ) ; ~ C W z d D l l M F C ( ) ; void WzdMessageBox(LPSTR pszstring); void DestroyWzdWindow(HWND hwnd); void WzdFunc3(BOOL b);

15 303 ; // WzdDllMFC.cpp : MFC Dll / / #include "stdafx.h" #include "WzdDllMFCx.h" C W z d D l l M F C :: C W z d D l l M F C () m _ b F l a g = FA L S E ; C W z d D l l M F C : : ~ C W z d D l l M F C ( ) // can use MFC classes and static functions void CWzdDllMFC::WzdMessageBox(LPSTR pszstring) A f x M e s s a g e B o x ( p s z S t r i n g ); void CWzdDllMFC::DestroyWzdWindow(HWND hwnd) CWnd wnd; w n d. A t t a c h ( h W n d ); w n d. D e s t r o y Wi n d o w (); void CWzdDllMFC::WzdFunc3(BOOL b) m _ b F l a g = b ; 15.4 85 D L L D L L ( F r e n c h I t a l i a n E s p e r a n t o ) M F C D L L I D

304 M F C D L L I D D L L 1) M F C D L L 2) D L L 3) Developer Studio I D D L L I D I D I I D I D I " M Y D L L _ R E S O U R C E 1 " 4) r e s o u r c e. h I D. h D L L 5) D L L D L CString str; s t r. L o a d S t r i n g ( i d ) ; A f x M e s s a g e B o x ( s t r ) ; CD Te s t d l l