From 4cda72771765720a6a8721bd8844945c2403afe6 Mon Sep 17 00:00:00 2001
From: QuakeGod <quakegod@sina.com>
Date: 星期一, 23 十月 2023 08:52:12 +0800
Subject: [PATCH] fix vcxproj version

---
 KLink1/KLink1.cpp |   76 +++++++++++++++++++++++++++++++++----
 1 files changed, 67 insertions(+), 9 deletions(-)

diff --git a/KLink1/KLink1.cpp b/KLink1/KLink1.cpp
index 6261ba7..e2b7d6f 100644
--- a/KLink1/KLink1.cpp
+++ b/KLink1/KLink1.cpp
@@ -1,22 +1,80 @@
-锘�// KLink1.cpp : 瀹氫箟 DLL 鐨勫鍑哄嚱鏁般��
+锘�// KLink1.cpp: 瀹氫箟 DLL 鐨勫垵濮嬪寲渚嬬▼銆�
 //
 
 #include "pch.h"
 #include "framework.h"
 #include "KLink1.h"
+#include "afxdialogex.h"
+#include "CDialogCommSet1.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+//
+//TODO:  濡傛灉姝� DLL 鐩稿浜� MFC DLL 鏄姩鎬侀摼鎺ョ殑锛�
+//		鍒欎粠姝� DLL 瀵煎嚭鐨勪换浣曡皟鍏�
+//		MFC 鐨勫嚱鏁板繀椤诲皢 AFX_MANAGE_STATE 瀹忔坊鍔犲埌
+//		璇ュ嚱鏁扮殑鏈�鍓嶉潰銆�
+//
+//		渚嬪: 
+//
+//		extern "C" BOOL PASCAL EXPORT ExportedFunction()
+//		{
+//			AFX_MANAGE_STATE(AfxGetStaticModuleState());
+//			// 姝ゅ涓烘櫘閫氬嚱鏁颁綋
+//		}
+//
+//		姝ゅ畯鍏堜簬浠讳綍 MFC 璋冪敤
+//		鍑虹幇鍦ㄦ瘡涓嚱鏁颁腑鍗佸垎閲嶈銆�  杩欐剰鍛崇潃
+//		瀹冨繀椤讳綔涓轰互涓嬮」涓殑绗竴涓鍙�:
+//		鍑虹幇锛岀敋鑷冲厛浜庢墍鏈夊璞″彉閲忓0鏄庯紝
+//		杩欐槸鍥犱负瀹冧滑鐨勬瀯閫犲嚱鏁板彲鑳界敓鎴� MFC
+//		DLL 璋冪敤銆�
+//
+//		鏈夊叧鍏朵粬璇︾粏淇℃伅锛�
+//		璇峰弬闃� MFC 鎶�鏈鏄� 33 鍜� 58銆�
+//
+
+// CKLink1App
+
+BEGIN_MESSAGE_MAP(CKLink1App, CWinApp)
+END_MESSAGE_MAP()
 
 
-// 杩欐槸瀵煎嚭鍙橀噺鐨勪竴涓ず渚�
-KLINK1_API int nKLink1=0;
+// CKLink1App 鏋勯��
 
-// 杩欐槸瀵煎嚭鍑芥暟鐨勪竴涓ず渚嬨��
-KLINK1_API int fnKLink1(void)
+CKLink1App::CKLink1App()
 {
-    return 0;
+	// TODO:  鍦ㄦ澶勬坊鍔犳瀯閫犱唬鐮侊紝
+	// 灏嗘墍鏈夐噸瑕佺殑鍒濆鍖栨斁缃湪 InitInstance 涓�
 }
 
-// 杩欐槸宸插鍑虹被鐨勬瀯閫犲嚱鏁般��
-CKLink1::CKLink1()
+
+// 鍞竴鐨� CKLink1App 瀵硅薄
+
+CKLink1App theApp;
+
+
+// CKLink1App 鍒濆鍖�
+
+BOOL CKLink1App::InitInstance()
 {
-    return;
+	CWinApp::InitInstance();
+
+	if (!AfxSocketInit())
+	{
+		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
+		return FALSE;
+	}
+	
+	return TRUE;
+}
+
+
+int CKLink1App::ExitInstance()
+{
+	// TODO: 鍦ㄦ娣诲姞涓撶敤浠g爜鍜�/鎴栬皟鐢ㄥ熀绫�
+
+	return CWinApp::ExitInstance();
 }

--
Gitblit v1.9.1