-
Notifications
You must be signed in to change notification settings - Fork 85
/
dllmain.cpp
37 lines (35 loc) · 999 Bytes
/
dllmain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// dllmain.cpp : 定义 DLL 应用程序的入口点。
#include "pch.h"
#include "socketMain.h"
#pragma warning(disable:4996)
#include <iostream>
VOID Send_Data(std::string data);
void Start_Socket();
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
//MessageBoxA(NULL, "DLL_PROCESS_ATTACH", NULL, MB_OK);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Start_Socket, hModule, 0, NULL);
}
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
//MessageBox(NULL, L"over", L"over", MB_OK);
break;
}
return TRUE;
}
//把发送数据的代码领出来写再这
//int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
//{
// //你来 注释掉
// Start_Socket();
//
// return 0;
//}