Sample Programs
for
Multithreading Applications in Win32
July, 1997
Chapter Order Sample Listing
This table lists sample programs according to what chapter
they are found in. Most sample programs are character-based
console programs. Those programs that are graphically-based
are marked in the table below as GUI. The notes also mention
those samples that are C++, MFC or only work under Windows
NT.
The table in in the next section is in alphabetical order
and gives short descriptions of the various sample programs.
Sample Name Listing Notes
Chapter 2 Numbers 2-1
ExitCode 2-2
ExitThrd 2-3
Error 2-4
BackPrnt 2-6
Chapter 3 BusyWait 3-1
TaskQueS 3-2
TaskQueM 3-3
PrntWait 3-5 GUI
Chapter 4 Dining GUI
EventTst GUI
Chapter 5 ThrdTerm 5-1
BusyPrio
Chapter 6 IoByFile 6-1 NT Only
IoByEvnt 6-2 NT Only
IoByAPC 6-3 NT Only
Echo 6-4 NT Only
Chapter 7 Readwrit 7-1
Chapter 8 SrchCrt 8-1
SrchWin 8-2
Banner 8-3
Chapter 9 CppSkel 9-1 C++
BadClass 9-2 C++
Member 9-3 C++
Chapter 10 Numbers.cpp
Numbers2
NumClass
Chapter 11 Cancel GUI, MFC, C++
Chapter 13 CopyData 13-1 GUI, MFC, C++
ShareMem 13-3 GUI, MFC, C++
Chapter 14 SmallDll 14-1 C++
Worker 14-3 C++
Chapter 16 is2odbc C++, ISAPI
Chapter 17 ComDemo C++, NT Only, OLE
==========================================================
Alphabetical Order Sample Descriptions
Sample Chapter Notes
Name
BackPrnt Chapter 2 (Listing 2-6) GUI
Background printing example. Italicizes the
given text and displays it on either the screen
on prints to the printer. Can have multiple
jobs outstanding at the same time.
BadClass Chapter 9 (Listing 9-2) C++
Demonstrates how *not* to start a thread with a
C++ member function. This sample program does
not compile.
Banner Chapter 8 (Listing 8-3)
Demonstrates the use the Console API to run
multiple threads without using the run-time
library and stdio.
BusyPrio Chapter 5
Demonstrates the impact that high priority
threads can have on a running program.
BusyWait Chapter 3 (Listing 3-1)
Demonstrates the impact of a busy loop on
program performance.
Busy2, Chapter 3
Busy3 Variations on BusyWait to be used with
Performance Monitor.
Cancel Chapter 11 GUI, MFC, C++
Shows two techniques that were tried to run a
modeless dialog concurrently with the primary
thread. This sample shows techniques that do
not work.
ComDemo Chapter 17 C++, NT Only, OLE
Freethreading model OLE server (dual-
interface). Included with this sample are
MfcCli and VbCli, which are clients to test the
server written in MFC and Visual Basic,
respectively.
CopyData Chapter 13 (Listing 13-1) GUI, MFC, C++
Demonstrates interprocess communication using
the WM_COPYDATA message.
CppSkel Chapter 9 (Listing 9-1) C++
Show how to work around the problems of using
_beginthreadex() in a C++ program.
Dining Chapter 4 GUI
Graphically illustrates deadlock using the
Dining Philosophers.
Echo Chapter 6 (Listing 6-4) NT Only
Echo server written using WinSock and I/O
completion ports. Demonstrates the optimal way
to write high performance server applications.
There are two subdirectories, EchoSrv and
EchoCli. Run EchoSrv in one window and the
EchoCli in another window.
Error Chapter 2 (Listing 2-4)
Demonstrates MTVERIFY catching a program error.
EventTst Chapter 4 GUI
Lets you can control an Event Object and shows
the results of threads waiting on the event
object.
ExitCode Chapter 2 (Listing 2-2)
Use GetExitCodeThread() to decide if a thread
has exited.
ExitThrd Chapter 2 (Listing 2-3)
Show ExitThread() in action.
IoByAPC Chapter 6 (Listing 6-2) NT Only
Demonstrates overlapped I/O using Asynchronous
Procedure Calls.
IoByEvnt Chapter 6 (Listing 6-2) NT Only
Demonstrates overlapped I/O that waits by using
an event object.
IoByFile Chapter 6 (Listing 6-1) NT Only
Demonstrates overlapped I/O that waits by using
the file handle.
Is2odbc Chapter 16 C++, ISAPI
ISAPI plug-in for Internet Information Server
and Peer Web Services that allows ISAPI to
access a JET database. This sample requires
extensive configuration; see the README in this
directory.
Member Chapter 9 (Listing 9-3) C++
How to use a class member function to start a
thread.
Numbers Chapter 2 (Listing 2-1)
Shows the problems that can be caused by
running multiple threads. This sample
intentionally does not use the multithreaded C
run-time library.
Numbers.cpp Chapter 10
Rewrite of the Numbers sample program from
Chapter 2. This version uses MFC.
Numbers2 Chapter 10
Update of Numbers.cpp that shows finer control
over the thread object.
NumClass Chapter 10
Start an MFC worker thread without using
AfxBeginThread().
PrntWait Chapter 3 (Listing 3-5) GUI
Continuation of BackPrnt. Monitors currently
running threads to give a current count and
uses WaitForMultipleObjects() to wait for
threads to terminate before exiting.
Readwrit Chapter 7
Uses a Readers/Writers lock to protect a linked
list.
ShareMem Chapter 13 GUI, MFC, C++
Uses shared memory in the paging file to
perfo
没有合适的资源?快使用搜索试试~ 我知道了~
Win32多线程程序设计(随书源码)侯捷译
共372个文件
h:47个
mak:45个
mdp:44个
1星 需积分: 10 8 下载量 165 浏览量
2015-05-04
11:15:06
上传
评论
收藏 1.53MB RAR 举报
温馨提示
这个是 Win32多线程程序设计(随书源码)第二版 侯捷翻译的,里面有每个程序的执行文件。
资源推荐
资源详情
资源评论
收起资源包目录
Win32多线程程序设计(随书源码)侯捷译 (372个子文件)
BackPrnt.001 7KB
Dining.001 7KB
CopyRecv.aps 41KB
CopyData.aps 41KB
CopySend.aps 35KB
ShareMem.aps 35KB
Cancel.aps 32KB
MfcCli.aps 22KB
ComDemo.aps 17KB
EventTst.aps 7KB
PrntWait.aps 5KB
BackPrnt.aps 4KB
Dining.aps 2KB
build.bat 5KB
testme.bat 179B
testme.bat 162B
testmexx.bat 94B
testmexx.bat 88B
Toolbar.bmp 1KB
PrntWait.c 15KB
ComDemo_p.c 15KB
BackPrnt.c 14KB
EchoSrv.c 9KB
EventTst.c 9KB
Banner.c 8KB
Dining.c 8KB
SrchWin.c 6KB
List.c 5KB
IoByAPC.c 5KB
IoByEvnt.c 5KB
ReadWrit.c 4KB
EchoCli.c 4KB
MUTEX.C 4KB
IoByFile.c 3KB
SrchCrt.c 3KB
TaskQueM.c 2KB
BusyPrio.c 2KB
BusyWait.c 2KB
TaskQueS.c 2KB
Busy2.c 2KB
ExitCode.c 2KB
ThrdTerm.c 2KB
ExitThrd.c 1KB
Busy3.c 1KB
Numbers.c 1KB
ComDemo_i.c 1KB
Error.c 967B
dlldata.c 835B
Cancel.clw 3KB
CopyRecv.clw 2KB
MfcCli.clw 2KB
ShareMem.clw 1KB
CopySend.clw 1KB
IS2ODBC.CLW 414B
CliDlg.cpp 10KB
IS2ODBC.CPP 8KB
DbServer.cpp 6KB
ShareDlg.cpp 6KB
CsDlg.cpp 6KB
OutDlg.CPP 5KB
CancView.cpp 4KB
Cancel.cpp 4KB
ShareMem.cpp 4KB
CopyData.cpp 4KB
worker.cpp 3KB
MainFrm.cpp 3KB
MfcCli.cpp 3KB
MainFrm.cpp 3KB
Member.cpp 2KB
ComDemo.cpp 2KB
Member2.cpp 2KB
Main3.cpp 2KB
CdView.cpp 2KB
CopySend.cpp 2KB
main2.cpp 2KB
AutoIncr.cpp 2KB
CancDoc.cpp 2KB
CdDoc.cpp 2KB
NumClass.cpp 2KB
ChildFrm.cpp 2KB
BadClass.cpp 2KB
BookSet.cpp 1KB
OutpThrd.cpp 1KB
Entry.cpp 1KB
Numbers2.cpp 1KB
CppSkel.cpp 1KB
main1.cpp 895B
numbers.cpp 704B
StdAfx.cpp 332B
StdAfx.cpp 206B
StdAfx.cpp 206B
StdAfx.cpp 206B
StdAfx.cpp 205B
StdAfx.cpp 205B
StdAfx.cpp 204B
StdAfx.cpp 204B
PrntWait.def 828B
EventTst.def 828B
BackPrnt.def 828B
ComDemo.def 345B
共 372 条
- 1
- 2
- 3
- 4
资源评论
- michaelou2016-12-02没有书,我还以为有
Cql_liliang
- 粉丝: 13
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 历届(第1-21届)希望杯数学竞赛初一试题及答案(最新整理).doc全国数学邀请赛(264页资料)
- 水滴.psd
- TokenPocket_V2.1.2_release.apk
- Apache-druid-kafka-rce.yaml
- 半导体行业词汇 相关缩写
- 基于C#的ASP.NET数据库原理及应用技术课程指导平台的开发
- 基于ROS的智能车轨迹跟踪算法的仿真与设计源码运用PID跟踪算法.zip.zip
- Bug Bounty Tip - i春秋Self-XSS变废为宝的奇思妙想
- 1991-2015年全国初中化学竞赛复赛试题汇编(212页)(24年竞赛复赛真题).docx天原杯
- Apache Flink 未授权访问+远程代码执行.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功