home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / edtrcdll / src / edtrcdll.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.5 KB  |  57 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. // edtrcdll.cpp : Defines the initialization routines for the DLL.
  20. //
  21.  
  22. #include "stdafx.h"
  23. #include "edtrcdll.h"
  24.  
  25. HINSTANCE g_instance; //global instance of this dll
  26.  
  27. #ifdef WIN32
  28.  
  29. BOOL   WINAPI
  30. DllMain (HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
  31. {
  32.     g_instance=hInst;
  33.     switch( ul_reason_for_call ) {
  34.     case DLL_PROCESS_ATTACH:
  35.     case DLL_THREAD_ATTACH:
  36.     case DLL_THREAD_DETACH:
  37.     case DLL_PROCESS_DETACH:
  38.     default:break; 
  39.     }
  40.     return TRUE;
  41. }
  42.  
  43. #endif //WIN32
  44.  
  45.  
  46.  
  47. #ifndef WIN32
  48. extern "C" int CALLBACK
  49. LibMain(HINSTANCE hinst, WORD wDataSeg, WORD cbHeap, LPSTR lpszCmdLine )
  50. {
  51.     g_instance=hinst;
  52.     return TRUE;
  53.  
  54. }
  55.  
  56. #endif //NOT WIN32
  57.