⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dll.cpp

📁 Windows上的MUD客户端程序
💻 CPP
字号:
/*----------------------------------------------------------------------------
                        _                              _ _       
        /\             | |                            | (_)      
       /  \   _ __   __| |_ __ ___  _ __ ___   ___  __| |_  __ _ 
      / /\ \ | '_ \ / _` | '__/ _ \| '_ ` _ \ / _ \/ _` | |/ _` |
     / ____ \| | | | (_| | | | (_) | | | | | |  __/ (_| | | (_| |
    /_/    \_\_| |_|\__,_|_|  \___/|_| |_| |_|\___|\__,_|_|\__,_|

    The contents of this file are subject to the Andromedia Public
	License Version 1.0 (the "License"); you may not use this file
	except in compliance with the License. You may obtain a copy of
	the License at http://www.andromedia.com/APL/

    Software distributed under the License is distributed on an
	"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
	implied. See the License for the specific language governing
	rights and limitations under the License.

    The Original Code is Pueblo client code, released November 4, 1998.

    The Initial Developer of the Original Code is Andromedia Incorporated.
	Portions created by Andromedia are Copyright (C) 1998 Andromedia
	Incorporated.  All Rights Reserved.

	Andromedia Incorporated                         415.365.6700
	818 Mission Street - 2nd Floor                  415.365.6701 fax
	San Francisco, CA 94103

    Contributor(s):
	--------------------------------------------------------------------------
	   Chaco team:  Dan Greening, Glenn Crocker, Jim Doubek,
	                Coyote Lussier, Pritham Shetty.

					Wrote and designed original codebase.

------------------------------------------------------------------------------

	Defines the initialization routines for the DLL.

----------------------------------------------------------------------------*/

// $Header: /home/cvs/chaco/modules/client/msw/ChWorld/Dll.cpp,v 2.4 1996/02/29 20:28:55 coyote Exp $

#include "headers.h"

#include <afxdllx.h>

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


/*----------------------------------------------------------------------------
	Global variables
----------------------------------------------------------------------------*/

CH_GLOBAL_VAR AFX_EXTENSION_MODULE ChWorldDLL = { NULL, NULL };

#if defined( CH_MSW ) && !defined( CH_ARCH_16 )

extern "C" int APIENTRY
DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved )
{
	if (DLL_PROCESS_ATTACH == dwReason)
	{
		TRACE0( "CHWORLD.DLL Initializing!\n" );

											/* Extension DLL one-time
												initialization */

		AfxInitExtensionModule( ChWorldDLL, hInstance );

											/* Insert this DLL into the
												resource chain */
		new CDynLinkLibrary( ChWorldDLL );
	}
	else if (DLL_PROCESS_DETACH == dwReason)
	{
		TRACE0( "CHWORLD.DLL Terminating!\n" );
	}

	return true;
}

/////////////////////////////////////////////////////////////////////////////
// Library init    
#else


extern "C" int CALLBACK LibMain(HINSTANCE hInstance, WORD, WORD, LPSTR)
{
	// Extension DLL one-time initialization - do not allocate memory here,
	//   use the TRACE or ASSERT macros or call MessageBox

	AfxInitExtensionModule( ChWorldDLL, hInstance );
	return 1;   // ok
}

// Exported DLL initialization is run in context of running application 
//extern "C" extern void WINAPI InitPueblo()
CH_GLOBAL_LIBRARY( void )
InitChWorldDLL()
{
	// create a new CDynLinkLibrary for this app
	new CDynLinkLibrary( ChWorldDLL );
}
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -