狠狠干影院/欧美午夜电影在线观看/高黄文/国产精品一区二区在线观看完整版

TCPIP實驗報告

| 瀏覽次數(shù):

 TCP/IP 技術(shù)實驗報告書 專 業(yè):[通 信 工 程] 學(xué)生姓名:[張 世 超] 完成時間:2020 年 7 月 15 日

 實驗一 網(wǎng)絡(luò)應(yīng)用程序基礎(chǔ) 實驗?zāi)康模?/p>

 通過實驗,使學(xué)生熟悉并掌握運用 TCP/IP 技術(shù)進(jìn)行網(wǎng)絡(luò)編程的基本知識,加深對課堂教學(xué)內(nèi)容的理解,掌握套接字網(wǎng)絡(luò)通信編程技術(shù),能夠運用 VC++為開發(fā)工具編程解決網(wǎng)絡(luò)通信中的實際問題,進(jìn)行一些簡單的網(wǎng)絡(luò)應(yīng)用程序設(shè)計。實驗內(nèi)容:

 1,Winsock 的啟動與終止。

 2,Winsock 的創(chuàng)建及綁定和關(guān)閉。

 3,建立通信連接 listen 及 accept 和 connect。

 4,數(shù)據(jù)的傳輸。

 5,簡單的客戶機/服務(wù)器之間的通信。

 要求:通過在 SDK 模式下完成數(shù)據(jù)通信的過程,掌握 Windows Socket 的常用函數(shù)的形式和使用方法,理解數(shù)據(jù)通信的過程。

 實驗步驟:

 1,打開 VC 環(huán)境 1,使用向?qū)榭蛻舳藙?chuàng)建工程:選擇可執(zhí)行程序,選擇使用 wsa 環(huán)境,單文檔環(huán)境,其他的選擇默認(rèn)設(shè)置 2,在文件中添加代碼 3,編譯調(diào)試 4,使用向?qū)榉?wù)器端創(chuàng)建工程:選擇可執(zhí)行程序,選擇使用 wsa 環(huán)境,單文檔環(huán)境,其他的選擇默認(rèn)設(shè)置 5,在文件中添加代碼 6,編譯調(diào)試 7,分別打開兩個系統(tǒng)命令窗口中,并分別在其中運行客戶端和服務(wù)器端程序。

 8,在客戶端側(cè)輸入字符,可以看到服務(wù)器收到字符串 參考代碼:課本 156 頁--160 頁 實驗結(jié)果:

 Client: #include<Winsock2.h> #include<stdio.h> //服務(wù)器端口號為 5050 #define DEFAULT_PORT 5050 #define DATA_BUFFER 1024 void main(int argc,char *argv[]) {

 WSADATA wsaData;

 SOCKET sClient;

 int iPort=DEFAULT_PORT;

  //從服務(wù)器端接收的數(shù)據(jù)長度

 int iLen;

 //接收數(shù)據(jù)的緩沖

 char buf[DATA_BUFFER];

 //服務(wù)器端地址

 struct sockaddr_in ser;

 //判斷輸入的參數(shù)是否正確

 if(argc<2)

 {

  //提示在命令行中輸入服務(wù)器 IP 地址

  printf("Usage:client [server IP address]\n");

  return;

 }

 //接收數(shù)據(jù)的緩沖區(qū)初始化

 memset(buf,0,sizeof(buf));

 if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0)

 {

  printf("Failed to load Winsock.\n");

  return;

 }

 //填寫要連接的服務(wù)器地址信息

 ser.sin_family=AF_INET;

 ser.sin_port=htons(iPort);

 //inet_addr()函數(shù)將命令行的點分IP地址轉(zhuǎn)換為用二進(jìn)制表示的網(wǎng)絡(luò)字節(jié)順序的 IP 地址

 ser.sin_addr.s_addr=inet_addr(argv[1]);

 //建立客戶端流式套接口

 sClient=socket(AF_INET,SOCK_STREAM,0);

 if(sClient==INVALID_SOCKET)

 {

  printf("socket() Failed:%d\n",WSAGetLastError());

  return;

 }

 //請求與服務(wù)器端建立 TCP 連接

 if(connect(sClient,(struct sockaddr*)&ser,sizeof(ser))==INVALID_SOCKET)

 {

  printf("connect() Failed:%d\n",WSAGetLastError());

  return;

 }

 else

  {

  //從服務(wù)器端接收數(shù)據(jù)

  iLen=recv(sClient,buf,sizeof(buf),0);

  if(iLen==0)

 return;

  else if(iLen==SOCKET_ERROR)

  {

 printf("recv() Failed:%d",WSAGetLastError());

 return;

  }

  printf("recv() data from server:%s\n",buf);

 }

 closesocket(sClient);

 WSACleanup(); }

  Server: #include<Winsock2.h> #include<stdio.h> #include<stdlib.h> #pragma comment(lib,"ws2_32.lib") //服務(wù)器使用的端口號為 5050 #define DEFAULT_PORT 5050 void main() {

 int iPort=DEFAULT_PORT;

 WSADATA wsaData;

 SOCKET sListen,

  sAccept;

 //客戶端地址長度

 int iLen;

 //發(fā)送的數(shù)據(jù)長度

 int iSend;

 //要發(fā)送給客戶端的信息

 char buf[]="I am a server.";

 //服務(wù)器和客戶端的 IP 地址

 struct sockaddr_in ser,

  cli;

 printf("---------------------------\n");

 printf("Server waiting\n");

 printf("---------------------------\n");

  if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0)

 {

  printf("Failed to load Winsock.\n");

  return;

 }

 //創(chuàng)建服務(wù)器端套接口

 sListen=socket(AF_INET,SOCK_STREAM,0);

 if(sListen==INVALID_SOCKET)

 {

  printf("socket() Failed:%d\n",WSAGetLastError());

  return;

 }

 //以下建立服務(wù)器端地址

 ser.sin_family=AF_INET;

 //htons()函數(shù)把一個雙字節(jié)的主機直接順序的數(shù)據(jù)轉(zhuǎn)換為網(wǎng)絡(luò)直接順序的數(shù)

 ser.sin_port=htons(iPort);

 //htonl()函數(shù)把一個四字節(jié)的主機直接順序的數(shù)據(jù)轉(zhuǎn)換為網(wǎng)絡(luò)直接順序的數(shù)

 //使用系統(tǒng)制定的 IP 地址 INADDR_ANY

 ser.sin_addr.s_addr=htonl(INADDR_ANY);

 if(bind(sListen,(LPSOCKADDR)&ser,sizeof(ser))==SOCKET_ERROR)

 {

  printf("bind() Failed: %d\n",WSAGetLastError());

  return;

 }

 //進(jìn)入監(jiān)聽狀態(tài)

 if(listen(sListen,5)==SOCKET_ERROR)

 {

  printf("listen() Failed:%d\n",WSAGetLastError());

  return;

 }

 //初始化客戶端地址長度參數(shù)

 iLen=sizeof(cli);

 //進(jìn)入一個無限循環(huán),等待客戶的連接請求

 while(1)

 {

  sAccept=accept(sListen,(struct sockaddr*)&cli,&iLen);

  if(sAccept==INVALID_SOCKET)

  {

 printf("accept() Failed: %d\n",WSAGetLastError());

  break;

  }

  //輸出客戶 IP 地址和端口號

  printf("Accepted client IP:[%s],port:[%d]\n",inet_ntoa(cli.sin_addr),ntohs(cli.sin_port));

  //給建立連接的客戶發(fā)送信息

  iSend=send(sAccept,buf,sizeof(buf),0);

  if(iSend==SOCKET_ERROR)

  {

 printf("send() Failed: %d\n",WSAGetLastError());

 break;

  }

  else if(iSend==0)

 break;

  else

  {

 printf("send() byte:%d\n",iSend);

 printf("---------------------------\n");

  }

  closesocket(sAccept);

 }

 closesocket(sListen);

 WSACleanup(); } 實驗截圖:

 實驗二 基于 TCP 協(xié)議的客戶/服務(wù)器通信程序 實驗?zāi)康模?/p>

 通過實驗,使學(xué)生熟悉并掌握運用 TCP/IP 技術(shù)進(jìn)行網(wǎng)絡(luò)編程的基本知識,加深對課堂教學(xué)內(nèi)容的理解,掌握套接字網(wǎng)絡(luò)通信編程技術(shù),能夠運用 VC++為開發(fā)工具編程解決網(wǎng)絡(luò)通信中的實際問題,進(jìn)行一些簡單的網(wǎng)絡(luò)應(yīng)用程序設(shè)計。

 實驗內(nèi)容:

 1,主機間 TCP 的性能測試之一:回程時延。

 2,服務(wù)器端能從客戶端接收數(shù)據(jù)并立即將接收到的數(shù)據(jù)原樣返回給客戶方。

 3,客戶端能往服務(wù)器端發(fā)送數(shù)據(jù),然后立即接受從服務(wù)器端原樣返回的數(shù)據(jù)。

  理解 TCP 通信程序設(shè)計過程,并結(jié)合特定應(yīng)用場景(如創(chuàng)建留言板程序、創(chuàng)建多客戶端服務(wù)器/客戶通信程序等)完成程序開發(fā)。掌握 TCP 服務(wù)器程序和客戶程序的創(chuàng)建過程,熟悉單播通信程序中用到的 Winsock 接口,培養(yǎng)學(xué)生將所學(xué)知識進(jìn)行靈活運用的能力。

 實驗步驟:

 1,打開 VC 環(huán)境 2,使用向?qū)榭蛻舳藙?chuàng)建工程:選擇可執(zhí)行程序,選擇使用 wsa 環(huán)境,單文檔環(huán)境,其他的選擇默認(rèn)設(shè)置 3,在文件中添加代碼 4,編譯調(diào)試 5,使用向?qū)榉?wù)器端創(chuàng)建工程:選擇可執(zhí)行程序,選擇使用 wsa 環(huán)境,單文檔環(huán)境,其他的選擇默認(rèn)設(shè)置 6,在文件中添加代碼 7,編譯調(diào)試 8,分別打開兩個系統(tǒng)命令窗口中,并分別在其中運行客戶端和服務(wù)器端程序。

 9,在客戶端著輸入字符,可以看到服務(wù)器收到字符串

 注:可以再實驗一的代碼上修改,自己增加額外的功能,比如取系統(tǒng)時間,計算往返時間等 作完之后,修改通信代碼使用 UDP 來實現(xiàn)網(wǎng)絡(luò)通信 實驗結(jié)果:

 Client: #include<Winsock2.h> #include<stdio.h> #include<stdlib.h> #define DEFAULT_PORT 5050 #define DATA_BUFFER 1024

 #pragma comment(lib,"WS2_32.lib") void main(int argc,char* argv[]) {

 WSADATA wsaData;

 SOCKET

 sClient;

 int iPort=5050;

 int iLen;

 int isend,iRecv;

 char send_buf[]="Hello! I am a client";

 char recv_buf[DATA_BUFFER];

 struct sockaddr_in ser;

 if(argc<2)

 {

  printf("輸入服務(wù)器的 IP 地址:\n");

  return;

 }

  else

 memset(recv_buf,0,sizeof(recv_buf));

 if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0)

 {

  printf("Winsock 環(huán)境初始化失敗:\n");

  return;

 }

 sClient=socket(AF_INET,SOCK_DGRAM,0);

 if(sClient==INVALID_SOCKET)

 {

  printf("socket()函數(shù)調(diào)用失敗:%d\n",WSAGetLastError());

 return;

 }

 ser.sin_family=AF_INET;

  ser.sin_port=htons(iPort);

 ser.sin_addr.s_addr=inet_addr(argv[1]);

  iLen=sizeof(ser);

  isend=sendto(sClient,send_buf,sizeof(send_buf),0,(struct sockaddr*)&ser,iLen);

 if(isend==SOCKET_ERROR)

 {

 printf("sendto()函數(shù)調(diào)用失敗:%d\n",WSAGetLastError());

 return;

 }

 else if(isend==0)

  return;

 else

 printf("sendto()調(diào)用成功:\n");

  iRecv=recvfrom(sClient,recv_buf,sizeof(recv_buf),0,(struct sockaddr*)&ser,&iLen);

  if(iRecv==SOCKET_ERROR)

 {

 printf("recvfrom()函數(shù)調(diào)用失敗:%d\n",WSAGetLastError());

  return;

 }

 else if(iRecv==0)

  return;

 else

 {

  printf("sendto():%s\n",recv_buf);

  printf("-------------------------------\n");

 }

 closesocket(sClient);

 WSACleanup(); }

 Server: #include<Winsock2.h> #include<stdio.h> #include<stdlib.h> #define DEFAULT_PORT 5050 #define BUFFER_LENGTH 1024 #pragma comment(lib,"WS2_32.lib") void main() {

 int iPort=DEFAULT_PORT;

 WSADATA wsaData;

  SOCKET sSocket;

 int iLen,iRecv,iSend;

 struct sockaddr_in ser,cli;

 char send_buf[]="Hollo!I am a server";

 char recv_buf[BUFFER_LENGTH];

  printf("--------------------");

  printf("Server waiting");

  printf("--------------------");

 if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0)

 {

  printf("環(huán)境初始化錯誤:\n");

  return;

 }

  sSocket=socket(AF_INET,SOCK_DGRAM,0);

  if(sSocket==INVALID_SOCKET)

 {

  printf("socket()函數(shù)調(diào)用失敗:\n",WSAGetLastError());

  return;

 }

 ser.sin_family=AF_INET;

 ser.sin_port=htons(iPort);

 ser.sin_addr.s_addr=htonl(INADDR_ANY);

  if(bind(sSocket,(LPSOCKADDR)&ser,sizeof(ser))==SOCKET_ERROR)

 {

 printf("bind()函數(shù)調(diào)用失敗:\n",WSAGetLastError());

  return;

 }

  iLen=sizeof(cli);

 memset(recv_buf,0,sizeof(recv_buf));

 while(1)

 {

  iRecv=recvfrom(sSocket,recv_buf,BUFFER_LENGTH,0,(SOCKADDR*)&cli,&iLen);

 if(iRecv==SOCKET_ERROR)

 {

  printf("recvfrom()函數(shù)調(diào)用失敗:\n",WSAGetLastError());

  break;

 }

 else if(iRecv==0)

 break;

  else

  {

  printf("recvfrom():%d\n",recv_buf);

 printf(" 客 戶 端 的 IP 地 址 、 端 口號:%d\n",inet_ntoa(cli.sin_addr),ntohs(cli.sin_port));

 }

 iSend=sendto(sSocket,send_buf,sizeof(send_buf),0,(SOCKADDR*)&cli,sizeof(cli));

  if(iSend==SOCKET_ERROR)

 {

  printf("sendto()函數(shù)調(diào)用失敗:\n",WSAGetLastError());

  break;

 }

 else if(iSend==0)

 break;

  else

  {

  printf("sendto():調(diào)用成功!\n");

 }

 }

 closesocket(sSocket);

 WSACleanup(); } 實驗截圖:

 實驗三 簡易聊天系統(tǒng)的實現(xiàn)

 實驗?zāi)康模?/p>

 通過實驗,使學(xué)生熟悉并掌握運用 TCP/IP 技術(shù)進(jìn)行網(wǎng)絡(luò)編程的基本知識,加深對課堂教學(xué)內(nèi)容的理解,掌握套接字網(wǎng)絡(luò)通信編程技術(shù),能夠運用 VC++為開發(fā)工具編程解決網(wǎng)絡(luò)通信中的實際問題,進(jìn)行一些簡單的網(wǎng)絡(luò)應(yīng)用程序設(shè)計。

 實驗內(nèi)容:

 設(shè)計實現(xiàn)包括客戶端和服務(wù)器端的簡單聊天系統(tǒng)。

 通過編寫簡單的聊天程序,理解 MFC 的 Socket 類同 Socket API 之間的區(qū)別以及MFC 的兩種類之間的聯(lián)系與區(qū)別。

 實驗步驟:

 1,打開 VC 環(huán)境 2,使用向?qū)榭蛻舳藙?chuàng)建工程:選擇 FMC 可執(zhí)行程序,選擇使用 wsa 環(huán)境,選擇單文檔環(huán)境,其他的選擇默認(rèn)設(shè)置 3,為對話窗添加控件:右擊工具欄選擇控件,拖拽某個控件到對話框 4,為控件添加變量:使用類向?qū)Вx擇要操作的對話窗類,選擇變量 Tab,點擊添加變量按鈕,為變量命名并選擇變量類型。

 5,為控件添加代碼:右擊控件添加事件,如點擊,雙擊,右擊。為事件添加代碼,根據(jù)教科書添加代碼 6,添加新的對話窗:單機 rousource Tab, 在對話窗出右擊,選擇添加對話窗, 7,為對話窗添加類:右鍵點擊新對話窗,選擇添加類,出現(xiàn)向?qū)В瑸轭惷⑦x擇父類 8,為心對話窗添加控件和變量 9,為新對話窗添加代碼 10, 編譯調(diào)試

 參考代碼:課本 224 頁--229 頁 實驗結(jié)果:

 CsockClient: #include "stdafx.h" #include "CSockClient.h" #include "CSockClientDlg.h"

 #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif

 ///////////////////////////////////////////////////////////////////////////// // CCSockClientApp

 BEGIN_MESSAGE_MAP(CCSockClientApp, CWinApp)

 //{{AFX_MSG_MAP(CCSockClientApp)

  // NOTE - the ClassWizard will add and remove mapping macros here.

  //

 DO NOT EDIT what you see in these blocks of generated code!

 //}}AFX_MSG

 ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP()

 ///////////////////////////////////////////////////////////////////////////// // CCSockClientApp construction

 CCSockClientApp::CCSockClientApp() {

 // TODO: add construction code here,

 // Place all significant initialization in InitInstance }

 ///////////////////////////////////////////////////////////////////////////// // The one and only CCSockClientApp object

 CCSockClientApp theApp;

 ///////////////////////////////////////////////////////////////////////////// // CCSockClientApp initialization

 BOOL CCSockClientApp::InitInstance() {

 if (!AfxSocketInit())

 {

  AfxMessageBox(IDP_SOCKETS_INIT_FAILED);

  return FALSE;

 }

  AfxEnableControlContainer();

 // Standard initialization

 // If you are not using these features and wish to reduce the size

 //

 of your final executable, you should remove from the following

 //

 the specific initialization routines you do not need.

 #ifdef _AFXDLL

 Enable3dControls();

  // Call this when using MFC in a shared DLL #else

 Enable3dControlsStatic(); // Call this when linking to MFC statically #endif

  CCSockClientDlg dlg;

 m_pMainWnd = &dlg;

 int nResponse = dlg.DoModal();

 if (nResponse == IDOK)

 {

  // TODO: Place code here to handle when the dialog is

  //

 dismissed with OK

 }

 else if (nResponse == IDCANCEL)

 {

  // TODO: Place code here to handle when the dialog is

  //

 dismissed with Cancel

 }

  // Since the dialog has been closed, return FALSE so that we exit the

 //

 application, rather than start the application"s message pump.

 return FALSE; }

 CsockServer: #include "stdafx.h" #include "CsockServer.h" #include "CsockServerDlg.h"

 #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE

 static char THIS_FILE[] = __FILE__; #endif

 ///////////////////////////////////////////////////////////////////////////// // CCsockServerApp

 BEGIN_MESSAGE_MAP(CCsockServerApp, CWinApp)

 //{{AFX_MSG_MAP(CCsockServerApp)

  // NOTE - the ClassWizard will add and remove mapping macros here.

  //

 DO NOT EDIT what you see in these blocks of generated code!

 //}}AFX_MSG

 ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP()

 ///////////////////////////////////////////////////////////////////////////// // CCsockServerApp construction

 CCsockServerApp::CCsockServerApp() {

 // TODO: add construction code here,

 // Place all significant initialization in InitInstance }

 ///////////////////////////////////////////////////////////////////////////// // The one and only CCsockServerApp object

 CCsockServerApp theApp;

 ///////////////////////////////////////////////////////////////////////////// // CCsockServerApp initialization

 BOOL CCsockServerApp::InitInstance() {

 if (!AfxSocketInit())

 {

  AfxMessageBox(IDP_SOCKETS_INIT_FAILED);

  return FALSE;

  }

  AfxEnableControlContainer();

  // Standard initialization

 // If you are not using these features and wish to reduce the size

 //

 of your final executable, you should remove from the following

 //

 the specific initialization routines you do not need.

 #ifdef _AFXDLL

 Enable3dControls();

  // Call this when using MFC in a shared DLL #else

 Enable3dControlsStatic(); // Call this when linking to MFC statically #endif

  CCsockServerDlg dlg;

 m_pMainWnd = &dlg;

 int nResponse = dlg.DoModal();

 if (nResponse == IDOK)

 {

  // TODO: Place code here to handle when the dialog is

  //

 dismissed with OK

 }

 else if (nResponse == IDCANCEL)

 {

  // TODO: Place code here to handle when the dialog is

  //

 dismissed with Cancel

 }

  // Since the dialog has been closed, return FALSE so that we exit the

 //

 application, rather than start the application"s message pump.

 return FALSE; } 實驗截圖:

 實驗四 WinInet 實現(xiàn) FTP 客戶端 實驗?zāi)康模?/p>

 通過實驗,使學(xué)生熟悉并掌握運用 TCP/IP 技術(shù)進(jìn)行網(wǎng)絡(luò)編程的基本知識,加深對課堂教學(xué)內(nèi)容的理解,掌握套接字網(wǎng)絡(luò)通信編程技術(shù),能夠運用 VC++為開發(fā)工具編程解決網(wǎng)絡(luò)通信中的實際問題,進(jìn)行一些簡單的網(wǎng)絡(luò)應(yīng)用程序設(shè)計。

 實驗內(nèi)容:

 1,寫出完整的軟件需求說明書。

 2,開發(fā) FTP 的客戶端。

 3,完成在局域網(wǎng)內(nèi)的測試,并記錄測試結(jié)果。

 本實驗涵蓋了 C/S 體系結(jié)構(gòu)和 Socket 編程。通過本實驗深入地了解 FTP 的工作原理以及服務(wù)器端和客戶端的工作流程,學(xué)習(xí) Socket 在網(wǎng)絡(luò)編程中的各種應(yīng)用,掌握 WinInet 的套接字編程。

 實驗步驟:

 1,打開 VC 環(huán)境 2,使用向?qū)榭蛻舳藙?chuàng)建工程:選擇 MFC 可執(zhí)行程序,單文檔環(huán)境,其他的選擇默認(rèn)設(shè)置 3,為對話窗添加控件:右擊工具欄選擇控件,拖拽某個控件到對話框 4,為控件添加變量:使用類向?qū)Вx擇要操作的對話窗類,選擇變量 Tab,點擊添加變量按鈕,為變量命名并選擇變量類型。

 5,為控件添加代碼:右擊控件添加事件,如點擊,雙擊,右擊。為事件添加代碼,根據(jù)教科書添加代碼 6,編譯調(diào)試 實驗結(jié)果:

 Scan: #include "stdafx.h" #include "scan.h" #include "scanDlg.h"

 #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif

 ///////////////////////////////////////////////////////////////////////////// // CScanApp

 BEGIN_MESSAGE_MAP(CScanApp, CWinApp)

 //{{AFX_MSG_MAP(CScanApp)

  // NOTE - the ClassWizard will add and remove mapping macros here.

  //

 DO NOT EDIT what you see in these blocks of generated code!

 //}}AFX_MSG

 ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP()

 ///////////////////////////////////////////////////////////////////////////// // CScanApp construction

 CScanApp::CScanApp() {

 // TODO: add construction code here,

 // Place all significant initialization in InitInstance }

 ///////////////////////////////////////////////////////////////////////////// // The one and only CScanApp object

 CScanApp theApp;

 ///////////////////////////////////////////////////////////////////////////// // CScanApp initialization

 BOOL CScanApp::InitInstance() {

 // Standard initialization

 // If you are not using these features and wish to reduce the size

 //

 of your final executable, you should remove from the following

 //

 the specific initialization routines you do not need.

 #ifdef _AFXDLL

 Enable3dControls();

  // Call this when using MFC in a shared DLL #else

 Enable3dControlsStatic(); // Call this when linking to MFC statically

 #endif

  CScanDlg dlg;

 m_pMainWnd = &dlg;

 int nResponse = dlg.DoModal();

 if (nResponse == IDOK)

 {

  // TODO: Place code here to handle when the dialog is

  //

 dismissed with OK

 }

 else if (nResponse == IDCANCEL)

 {

  // TODO: Place code here to handle when the dialog is

  //

 dismissed with Cancel

 }

  // Since the dialog has been closed, return FALSE so that we exit the

 //

 application, rather than start the application"s message pump.

 return FALSE; } 實驗截圖:

推薦訪問: 實驗 報告 TCPIP

上一篇:暑期實驗報告

下一篇:單擺實驗報告

【TCPIP實驗報告】相關(guān)推薦

工作總結(jié)最新推薦

NEW
  • 同志們:今天這個大會,是市委全面落實黨要管黨、從嚴(yán)治黨要求的一項重大舉措,也是對縣市區(qū)委書記履行基層黨建工作第一責(zé)任人情況的一次集中檢閱,同時是對全市基層黨建工作的一次再部署、再落實的會議。前面,**

  • ***年,我認(rèn)真履行領(lǐng)班子、帶隊伍、抓黨員、保穩(wěn)定的基層黨建工作思路,以學(xué)習(xí)貫徹習(xí)近平新時代中國特色社會主義思想和黨的十九大歷次全會精神為主線,以市局基層黨建工作考核細(xì)則為落腳點,落實全面從嚴(yán)治黨主體

  • 根據(jù)會議安排,現(xiàn)將2022年履行抓基層黨建工作職責(zé)情況報告如下:一、履職工作特色和亮點1 突出政治建設(shè),著力在思想認(rèn)識上提高。牢固樹立抓黨建就是抓政績的理念,以“黨建工作抓引領(lǐng)、社區(qū)治理求突破,為民服

  • 2022年以來,在**黨委的正確領(lǐng)導(dǎo)下,堅持以習(xí)近平新時代中國特色社會主義思想為指導(dǎo),深入學(xué)習(xí)宣傳貫徹黨的二十大精神,以黨建工作為統(tǒng)領(lǐng),扎實開展夯實“三個基本”活動,以“四化四力”行動為抓手,聚力創(chuàng)建

  • 各位領(lǐng)導(dǎo),同志們:根據(jù)會議安排,現(xiàn)就2022年度抓基層黨建工作情況匯報如下:一、主要做法及成效(一)強化政治引領(lǐng)。一是不斷強化理論武裝。堅持通過黨組會、中心組學(xué)習(xí)會和“三會一課”,第一時間、第一議題學(xué)

  • 2022年度抓基層黨建工作述職報告按照黨委工作部署,現(xiàn)將本人2022年度抓基層黨建工作情況報告如下:一、2022年度抓基層黨建工作情況(一)旗幟鮮明講政治將旗幟鮮明講政治放在全局發(fā)展首要位置,積極開展

  • 2022年,是我在數(shù)計系黨總支書記這個新崗位上度過的第一個完整的工作年度。回首一年來在校黨委的正確領(lǐng)導(dǎo)下,與數(shù)計系領(lǐng)導(dǎo)班子和全體師生共同走過的日子,艱辛歷歷在目,收獲溫潤心田。作為黨總支書記,我始終牢

  • 按照考核要求,現(xiàn)將本人一年來,作為統(tǒng)戰(zhàn)部長履行職責(zé)、廉潔自律等方面情況報告如下:一、著眼增強政治素質(zhì),不斷深化理論學(xué)習(xí)堅持把旗幟鮮明講政治作為履職從政的第一位要求,帶領(lǐng)統(tǒng)戰(zhàn)系統(tǒng)干部堅決擁護“兩個確立”

  • **年,緊緊圍繞黨工委、管委會的決策部署,全體人員團結(jié)協(xié)作、凝心聚力,緊扣黨工委“**”基本工作思路,全力開拓進(jìn)取,認(rèn)真履職盡責(zé),圓滿完成各項工作任務(wù)。一、個人思想政治狀況檸檬文苑www bgzjy

  • 按照縣委關(guān)于開展抓基層黨建述職評議會議的有關(guān)要求,經(jīng)請示縣委組織部同意,今天,我們在此召開2022年度基層黨組織書記抓基層黨建述職評議會議。1 首先,請**黨委書記,**同志述職。**黨委能夠主動研究