Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/* Copyright (C) 1992, 2000 Aladdin Enterprises.  All rights reserved.
2
 
3
  This software is provided AS-IS with no warranty, either express or
4
  implied.
5
 
6
  This software is distributed under license and may not be copied,
7
  modified or distributed except as expressly authorized under the terms
8
  of the license contained in the file LICENSE in this distribution.
9
 
10
  For more information about licensing, please refer to
11
  http://www.ghostscript.com/licensing/. For information on
12
  commercial licensing, go to http://www.artifex.com/licensing/ or
13
  contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14
  San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15
*/
16
 
17
/* $Id: gp_msdll.c,v 1.3 2002/02/21 22:24:52 giles Exp $ */
18
/*
19
 * Microsoft Windows DLL support for Ghostscript.
20
 *
21
 */
22
#include "windows_.h"
23
#include "iapi.h"
24
#include "gp_mswin.h"
25
 
26
/* DLL entry point for Borland C++ */
27
GSDLLEXPORT BOOL WINAPI
28
DllEntryPoint(HINSTANCE hInst, DWORD fdwReason, LPVOID lpReserved)
29
{
30
    /* Win32s: HIWORD bit 15 is 1 and bit 14 is 0 */
31
    /* Win95:  HIWORD bit 15 is 1 and bit 14 is 1 */
32
    /* WinNT:  HIWORD bit 15 is 0 and bit 14 is 0 */
33
    /* WinNT Shell Update Release is WinNT && LOBYTE(LOWORD) >= 4 */
34
    DWORD version = GetVersion();
35
 
36
    if (((HIWORD(version) & 0x8000) != 0) && ((HIWORD(version) & 0x4000) == 0))
37
	is_win32s = TRUE;
38
 
39
    phInstance = hInst;
40
    return TRUE;
41
}
42
 
43
/* DLL entry point for Microsoft Visual C++ */
44
GSDLLEXPORT BOOL WINAPI
45
DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpReserved)
46
{
47
    return DllEntryPoint(hInst, fdwReason, lpReserved);
48
}
49
 
50