/[dtapublic]/projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwin32dll.c
ViewVC logotype

Diff of /projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwin32dll.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 69 by dashley, Sat Nov 5 10:54:17 2016 UTC revision 71 by dashley, Sat Nov 5 11:07:06 2016 UTC
# Line 1  Line 1 
1  /* $Header$ */  /* $Header$ */
2    
3  /*  /*
4   * tkWin32Dll.c --   * tkWin32Dll.c --
5   *   *
6   *      This file contains a stub dll entry point.   *      This file contains a stub dll entry point.
7   *   *
8   * Copyright (c) 1995 Sun Microsystems, Inc.   * Copyright (c) 1995 Sun Microsystems, Inc.
9   *   *
10   * See the file "license.terms" for information on usage and redistribution   * See the file "license.terms" for information on usage and redistribution
11   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12   *   *
13   * RCS: @(#) $Id: tkwin32dll.c,v 1.1.1.1 2001/06/13 05:11:41 dtashley Exp $   * RCS: @(#) $Id: tkwin32dll.c,v 1.1.1.1 2001/06/13 05:11:41 dtashley Exp $
14   */   */
15    
16  #include "tkWinInt.h"  #include "tkWinInt.h"
17    
18  /*  /*
19   * The following declaration is for the VC++ DLL entry point.   * The following declaration is for the VC++ DLL entry point.
20   */   */
21    
22  BOOL APIENTRY           DllMain _ANSI_ARGS_((HINSTANCE hInst,  BOOL APIENTRY           DllMain _ANSI_ARGS_((HINSTANCE hInst,
23                              DWORD reason, LPVOID reserved));                              DWORD reason, LPVOID reserved));
24    
25  /*  /*
26   *----------------------------------------------------------------------   *----------------------------------------------------------------------
27   *   *
28   * DllEntryPoint --   * DllEntryPoint --
29   *   *
30   *      This wrapper function is used by Borland to invoke the   *      This wrapper function is used by Borland to invoke the
31   *      initialization code for Tk.  It simply calls the DllMain   *      initialization code for Tk.  It simply calls the DllMain
32   *      routine.   *      routine.
33   *   *
34   * Results:   * Results:
35   *      See DllMain.   *      See DllMain.
36   *   *
37   * Side effects:   * Side effects:
38   *      See DllMain.   *      See DllMain.
39   *   *
40   *----------------------------------------------------------------------   *----------------------------------------------------------------------
41   */   */
42    
43  BOOL APIENTRY  BOOL APIENTRY
44  DllEntryPoint(hInst, reason, reserved)  DllEntryPoint(hInst, reason, reserved)
45      HINSTANCE hInst;            /* Library instance handle. */      HINSTANCE hInst;            /* Library instance handle. */
46      DWORD reason;               /* Reason this function is being called. */      DWORD reason;               /* Reason this function is being called. */
47      LPVOID reserved;            /* Not used. */      LPVOID reserved;            /* Not used. */
48  {  {
49      return DllMain(hInst, reason, reserved);      return DllMain(hInst, reason, reserved);
50  }  }
51    
52  /*  /*
53   *----------------------------------------------------------------------   *----------------------------------------------------------------------
54   *   *
55   * DllMain --   * DllMain --
56   *   *
57   *      DLL entry point.   *      DLL entry point.
58   *   *
59   * Results:   * Results:
60   *      TRUE on sucess, FALSE on failure.   *      TRUE on sucess, FALSE on failure.
61   *   *
62   * Side effects:   * Side effects:
63   *      None.   *      None.
64   *   *
65   *----------------------------------------------------------------------   *----------------------------------------------------------------------
66   */   */
67    
68  BOOL APIENTRY  BOOL APIENTRY
69  DllMain(hInstance, reason, reserved)  DllMain(hInstance, reason, reserved)
70      HINSTANCE hInstance;      HINSTANCE hInstance;
71      DWORD reason;      DWORD reason;
72      LPVOID reserved;      LPVOID reserved;
73  {  {
74    
75      /*      /*
76       * If we are attaching to the DLL from a new process, tell Tk about       * If we are attaching to the DLL from a new process, tell Tk about
77       * the hInstance to use. If we are detaching then clean up any       * the hInstance to use. If we are detaching then clean up any
78       * data structures related to this DLL.       * data structures related to this DLL.
79       */       */
80            
81      if (reason == DLL_PROCESS_ATTACH) {      if (reason == DLL_PROCESS_ATTACH) {
82          TkWinXInit(hInstance);          TkWinXInit(hInstance);
83      } else if (reason == DLL_PROCESS_DETACH) {      } else if (reason == DLL_PROCESS_DETACH) {
84          TkWinXCleanup(hInstance);          TkWinXCleanup(hInstance);
85      }      }
86      return(TRUE);      return(TRUE);
87  }  }
88    
89  /* End of tkwin32dll.c */  /* End of tkwin32dll.c */

Legend:
Removed from v.69  
changed lines
  Added in v.71

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25