update dev300-m58
[ooovba.git] / vos / source / dllentry.cxx
blob436ff9280cd155f6f7605b9f16f2d2f60ddd3a25
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dllentry.cxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #include <windows.h>
33 #include <winsock.h>
36 #ifdef SHARED
38 sal_Int32 CALLBACK LibMain(HINSTANCE hinst, WORD wDataSeg, WORD cbHeap, LPSTR lpszCmdLine )
40 HGLOBAL hgblClassStruct;
41 LPWNDCLASS lpClassStruct;
42 static HINSTANCE hinstLib = NULL;
44 /* Has the library been initialized yet? */
45 if (hinstLib == NULL)
47 WORD wVersionRequested;
48 WSADATA wsaData;
49 sal_Int32 error;
52 wVersionRequested = 0x0101;
53 error = WSAStartup( wVersionRequested, &wsaData );
54 if (error)
57 else
58 hinstLib = hinst;
61 return (hinstLib ? TRUE : FALSE); /* return TRUE = success; FALSE = fail */
64 #endif