From fac0389f44d31bbe4f0f5a3021fc15ffa7e3c66a Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:01:53 +0000 Subject: Utilisateur : Fcolin Date : 16/06/00 Heure : 10:14 Créé (vss 1) --- Ivy/IvyDllMain.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Ivy/IvyDllMain.cpp (limited to 'Ivy/IvyDllMain.cpp') diff --git a/Ivy/IvyDllMain.cpp b/Ivy/IvyDllMain.cpp new file mode 100644 index 0000000..ac1a854 --- /dev/null +++ b/Ivy/IvyDllMain.cpp @@ -0,0 +1,29 @@ +// libIvy.cpp : Defines the initialization routines for the DLL. +// + +#include "stdafx.h" + + +extern "C" int APIENTRY +DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) +{ + // Remove this if you use lpReserved + UNREFERENCED_PARAMETER(lpReserved); + + if (dwReason == DLL_PROCESS_ATTACH) + { + TRACE("LIBIVY.DLL Initializing!\n"); + + // Extension DLL one-time initialization + //if (WSAInit) + // return 0; + + + } + else if (dwReason == DLL_PROCESS_DETACH) + { + TRACE("LIBIVY.DLL Terminating!\n"); + // Terminate the library before destructors are called + } + return 1; // ok +} -- cgit v1.1 From 08ce8432585e4d71a31fd09a66d543f79d011471 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:01:55 +0000 Subject: Utilisateur : Fcolin Date : 16/06/00 Heure : 10:40 Archivé dans $/Ivy Commentaire: Init dll socket dans DLLMain (vss 2) --- Ivy/IvyDllMain.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'Ivy/IvyDllMain.cpp') diff --git a/Ivy/IvyDllMain.cpp b/Ivy/IvyDllMain.cpp index ac1a854..c49283a 100644 --- a/Ivy/IvyDllMain.cpp +++ b/Ivy/IvyDllMain.cpp @@ -12,18 +12,31 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) if (dwReason == DLL_PROCESS_ATTACH) { - TRACE("LIBIVY.DLL Initializing!\n"); + TRACE("IVY.DLL Initializing!\n"); // Extension DLL one-time initialization - //if (WSAInit) - // return 0; + + WORD wVersionRequested; + WSADATA wsaData; + int err; + + wVersionRequested = MAKEWORD( 2, 2 ); + + err = WSAStartup( wVersionRequested, &wsaData ); + if ( err != 0 ) { + /* Tell the user that we could not find a usable */ + /* WinSock DLL. */ + return 0; + } + } else if (dwReason == DLL_PROCESS_DETACH) { - TRACE("LIBIVY.DLL Terminating!\n"); + TRACE("IVY.DLL Terminating!\n"); // Terminate the library before destructors are called + WSACleanup(); } return 1; // ok } -- cgit v1.1 From 32e665d555a00010b60bb3efc6f2676b0eca7194 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:01:57 +0000 Subject: Utilisateur : Fcolin Date : 31/01/01 Heure : 11:18 Archivé dans $/Ivy (vss 3) --- Ivy/IvyDllMain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Ivy/IvyDllMain.cpp') diff --git a/Ivy/IvyDllMain.cpp b/Ivy/IvyDllMain.cpp index c49283a..a94616f 100644 --- a/Ivy/IvyDllMain.cpp +++ b/Ivy/IvyDllMain.cpp @@ -3,9 +3,9 @@ #include "stdafx.h" - -extern "C" int APIENTRY -DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) +BOOL APIENTRY DllMain(HANDLE hInstance, + DWORD dwReason, + LPVOID lpReserved) { // Remove this if you use lpReserved UNREFERENCED_PARAMETER(lpReserved); -- cgit v1.1 From ae6b836b82f8ddc8f49e9ba6edf5b17ec478ceee Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:01:59 +0000 Subject: Utilisateur : Fcolin Date : 2/02/01 Heure : 18:30 Archivé dans $/Ivy Commentaire: win CE compile not finished (vss 4) --- Ivy/IvyDllMain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ivy/IvyDllMain.cpp') diff --git a/Ivy/IvyDllMain.cpp b/Ivy/IvyDllMain.cpp index a94616f..554df47 100644 --- a/Ivy/IvyDllMain.cpp +++ b/Ivy/IvyDllMain.cpp @@ -20,7 +20,7 @@ BOOL APIENTRY DllMain(HANDLE hInstance, WSADATA wsaData; int err; - wVersionRequested = MAKEWORD( 2, 2 ); + wVersionRequested = MAKEWORD( 2, 0 ); err = WSAStartup( wVersionRequested, &wsaData ); if ( err != 0 ) { -- cgit v1.1 From b31c22ea4e3df8700dad80e8bc2496bcf63ceb58 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:02:01 +0000 Subject: Utilisateur : Fcolin Date : 1/06/05 Heure : 16:45 Archivé dans $/Bus/Ivy Commentaire: (vss 5) --- Ivy/IvyDllMain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ivy/IvyDllMain.cpp') diff --git a/Ivy/IvyDllMain.cpp b/Ivy/IvyDllMain.cpp index 554df47..e8c13f4 100644 --- a/Ivy/IvyDllMain.cpp +++ b/Ivy/IvyDllMain.cpp @@ -1,7 +1,7 @@ // libIvy.cpp : Defines the initialization routines for the DLL. // -#include "stdafx.h" +#include "IvyStdAfx.h" BOOL APIENTRY DllMain(HANDLE hInstance, DWORD dwReason, -- cgit v1.1