📄 netmoduleinterface.cpp
字号:
// NetModuleInterface.cpp: implementation of the CNetModuleInterface class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "NetModuleInterface.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CString CNetModuleInterface::GetCurrentPath()
{
char path[MAX_PATH];
::GetModuleFileName(NULL,path,MAX_PATH);
CString strPath(path);
strPath=strPath.Left(strPath.ReverseFind('\\')+1);
return strPath;
}
CNetModuleInterface::CNetModuleInterface()
{
CString strPath=GetCurrentPath();
strPath+=NetModuleInterfaceDLLName;
hModule=LoadLibrary(strPath);
StartServer =(STARTSERVER) GetProcAddress(hModule,"StartServer");
StopServer =(STOPSERVER) GetProcAddress(hModule,"StopServer");
SetNetInterfaceInfo =(SETNETINTERFACEINFO) GetProcAddress(hModule,"SetNetInterfaceInfo");
ReadData =(READDATA) GetProcAddress(hModule,"ReadData");
SendData =(SENDDATA) GetProcAddress(hModule,"SendData");
}
CNetModuleInterface::~CNetModuleInterface()
{
FreeLibrary(hModule);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -