summaryrefslogtreecommitdiff
path: root/tools/win
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
commit8ab086b6cc054501bfbf7ef6fa509c393691e860 (patch)
tree324d51845d7f1a2f4e02a14db22fb5947137c822 /tools/win
parent411e68cc54ae97eebd79ae3a9cb2971b74cb2a9e (diff)
initial import
Diffstat (limited to 'tools/win')
-rw-r--r--tools/win/inc/dll.hxx103
-rw-r--r--tools/win/inc/parser.hxx78
-rw-r--r--tools/win/inc/shellex.h149
-rw-r--r--tools/win/inc/shutil.h245
-rw-r--r--tools/win/inc/toolsdll.hxx131
-rw-r--r--tools/win/inc/winshell.hxx417
-rw-r--r--tools/win/source/dll/makefile.mk112
-rw-r--r--tools/win/source/dll/toolsdll.cxx179
-rw-r--r--tools/win/source/fastfsys/makefile.mk108
9 files changed, 1522 insertions, 0 deletions
diff --git a/tools/win/inc/dll.hxx b/tools/win/inc/dll.hxx
new file mode 100644
index 000000000000..fbcb6478acc2
--- /dev/null
+++ b/tools/win/inc/dll.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: dll.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _DLL_HXX
+#define _DLL_HXX
+
+#ifdef WIN
+
+#ifndef _SVWIN_H
+#include <svwin.h>
+#endif
+
+// ----------------------
+// - Zugriffsfunktionen -
+// ----------------------
+
+struct SVDATA;
+
+extern "C"
+{
+// IN APPDATA.ASM
+SVDATA* FAR PASCAL GetSVData();
+}
+
+// IN TOOLSDLL.CXX
+void SetSVData( SVDATA* pSVData );
+
+#endif
+
+// -------------------------------
+// - Sonstige Funktionen fuer SV -
+// -------------------------------
+
+// MultiThread-Sicherung aktivieren
+void EnterMultiThread( int bEnter );
+int IsMultiThread();
+
+// Um Resourcen wieder freizugeben
+#ifdef WNT
+void ImpDeInitWinTools();
+#else
+inline void ImpDeInitWinTools() {}
+#endif
+
+#endif // _DLL_HXX
diff --git a/tools/win/inc/parser.hxx b/tools/win/inc/parser.hxx
new file mode 100644
index 000000000000..8aeb1db8de05
--- /dev/null
+++ b/tools/win/inc/parser.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * $RCSfile: parser.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _PARSER_HXX
+#define _PARSER_HXX
+
+#include <string.hxx>
+#include <winshell.hxx>
+
+void * NewBinaryFromString( const String & rBinStr );
+String CreateStringFromData( const void *pData, ULONG nBytes );
+
+String CreateStringFromItemIDList( const CItemIDList & rIDList );
+
+String GetURLFromHostNotation( const String & rPath );
+String GetHostNotationFromURL( const String & rURL );
+
+CItemIDList MakeIDToken( const String &rToken );
+CItemIDList ParseSpecialURL( const String & rURL );
+
+#endif // _PARSER_HXX
diff --git a/tools/win/inc/shellex.h b/tools/win/inc/shellex.h
new file mode 100644
index 000000000000..46bf91b8eaa0
--- /dev/null
+++ b/tools/win/inc/shellex.h
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * $RCSfile: shellex.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SHELLEX_H_
+#define _SHELLEX_H_
+
+#ifndef _SHLOBJ_H_
+#include <shlobj.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#define WINSHELLCALL inline
+#else
+#define WINSHELLCALL static
+#endif
+
+#define SHChangeNotifyRegister_PROC_STR MAKEINTRESOURCE(2)
+#define SHChangeNotifyDeregister_PROC_STR MAKEINTRESOURCE(4)
+
+#define SHCNF_ACCEPT_INTERRUPTS 0x0001
+#define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
+#define SHCNF_NO_PROXY 0x8000
+
+#define SHCNF_ACCEPT_ALL (SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS)
+
+typedef struct tagNOTIFYREGISTER {
+ LPCITEMIDLIST pidlPath;
+ BOOL bWatchSubtree;
+} NOTIFYREGISTER;
+
+typedef NOTIFYREGISTER *LPNOTIFYREGISTER;
+typedef NOTIFYREGISTER const *LPCNOTIFYREGISTER;
+
+typedef HANDLE (WINAPI *SHChangeNotifyRegister_PROC)(
+ HWND hWnd,
+ DWORD dwFlags,
+ LONG wEventMask,
+ UINT uMsg,
+ ULONG cItems,
+ LPCNOTIFYREGISTER lpItems);
+
+
+WINSHELLCALL HANDLE WINAPI SHChangeNotifyRegister(
+ HWND hWnd,
+ DWORD dwFlags,
+ LONG wEventMask,
+ UINT uMsg,
+ ULONG cItems,
+ LPCNOTIFYREGISTER lpItems)
+
+{
+ HMODULE hModule = GetModuleHandle( "SHELL32" );
+ HANDLE hNotify = NULL;
+
+ if ( hModule )
+ {
+ SHChangeNotifyRegister_PROC lpfnSHChangeNotifyRegister = (SHChangeNotifyRegister_PROC)GetProcAddress( hModule, SHChangeNotifyRegister_PROC_STR );
+ if ( lpfnSHChangeNotifyRegister )
+ hNotify = lpfnSHChangeNotifyRegister( hWnd, dwFlags, wEventMask, uMsg, cItems, lpItems );
+ }
+
+ return hNotify;
+}
+
+
+
+typedef BOOL (WINAPI *SHChangeNotifyDeregister_PROC)(
+ HANDLE hNotify);
+
+WINSHELLCALL BOOL WINAPI SHChangeNotifyDeregister( HANDLE hNotify )
+{
+ HMODULE hModule = GetModuleHandle( "SHELL32" );
+ BOOL fSuccess = FALSE;
+
+ if ( hModule )
+ {
+ SHChangeNotifyDeregister_PROC lpfnSHChangeNotifyDeregister = (SHChangeNotifyDeregister_PROC)GetProcAddress( hModule, SHChangeNotifyDeregister_PROC_STR );
+ if ( lpfnSHChangeNotifyDeregister )
+ fSuccess = lpfnSHChangeNotifyDeregister( hNotify );
+ }
+
+ return fSuccess;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/tools/win/inc/shutil.h b/tools/win/inc/shutil.h
new file mode 100644
index 000000000000..379e29495dc7
--- /dev/null
+++ b/tools/win/inc/shutil.h
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * $RCSfile: shutil.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SHUTIL_H_
+#define _SHUTIL_H_
+
+#ifndef _SHOBJ_H
+#include <shlobj.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PROTOCOL_FILE "file:"
+#define MAX_URL (MAX_PATH + sizeof(PROTOCOL_FILE))
+
+#define SHUTIL_TO_DELIVER
+
+//--------------------------------------------------------------------------
+
+void * WINAPI WIN_SHAlloc( ULONG cb );
+void * WINAPI WIN_SHRealloc( void *pv, ULONG cb );
+void WINAPI WIN_SHFree( void *pv );
+
+//--------------------------------------------------------------------------
+
+ULONG WINAPI WIN_SHGetIDListSize( LPCITEMIDLIST pidl );
+BOOL WINAPI WIN_SHCloneIDList( LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl );
+BOOL WINAPI WIN_SHAppendIDList( LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl );
+LONG WINAPI WIN_SHCompareIDList( LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2 );
+
+LONG WINAPI WIN_SHGetIDListTokenCount( LPCITEMIDLIST pidl );
+BOOL WINAPI WIN_SHGetIDListToken( LPCITEMIDLIST pidl, ULONG nToken, LPITEMIDLIST *ppidl );
+
+BOOL WINAPI WIN_SHSplitIDList(
+ LPCITEMIDLIST pidl,
+ LPITEMIDLIST * pidlFolder,
+ LPITEMIDLIST * pidlItem
+ );
+
+BOOL WINAPI WIN_SHSplitIDListEx(
+ LPCITEMIDLIST pidl,
+ LPITEMIDLIST * pidlParent,
+ LPITEMIDLIST * pidlChild,
+ ULONG nLevel
+ );
+
+//--------------------------------------------------------------------------
+
+#define WIN_SHGetSpecialFolderLocation( nFolder, ppidl ) \
+ ((BOOL)(NOERROR == SHGetSpecialFolderLocation( GetFocus(), nFolder, ppidl )))
+
+#define WIN_SHGetPathFromIDList( pidl, pszPath ) \
+ SHGetPathFromIDList( pidl, pszPath )
+
+// #define SHGP_CLSID 0x00000001
+
+// BOOL WINAPI WIN_SHGetPathFromIDListEx( LPCITEMIDLIST pidl, LPSTR pszBuffer, UINT uFlags );
+
+BOOL WINAPI WIN_SHGetIDListFromPath( LPCSTR pszPath, LPITEMIDLIST *ppidl );
+
+BOOL WINAPI WIN_SHGetPathFromURL( LPCSTR pszURL, LPSTR pszPath );
+BOOL WINAPI WIN_SHGetURLFromPath( LPCSTR pszPath, LPSTR pszURL );
+
+BOOL WINAPI WIN_SHGetFolderFromIDList( LPCITEMIDLIST pidl, LPSHELLFOLDER *ppshf );
+BOOL WINAPI WIN_SHGetSpecialFolder( int nFolder, LPSHELLFOLDER *ppshf );
+BOOL WINAPI WIN_SHGetFolderFromPath( LPCSTR pszPath, LPSHELLFOLDER *ppshf );
+
+BOOL WINAPI WIN_SHGetSpecialFolderPath( int nFolder, LPSTR pszPath );
+
+HRESULT WINAPI WIN_SHGetDataFromIDList(
+ LPSHELLFOLDER psf,
+ LPCITEMIDLIST pidl,
+ int nFormat,
+ PVOID pv,
+ int cb
+ );
+
+
+//--------------------------------------------------------------------------
+
+#define SHIC_PIDL 0x00000001
+#define SHIC_NO_UI 0x00000002
+
+#define CMDSTR_OPENA "open"
+#define CMDSTR_EXPLOREA "explore"
+#define CMDSTR_FINDA "find"
+
+#define CMDSTR_OPENW L"open"
+#define CMDSTR_EXPLOREW L"explore"
+#define CMDSTR_FINDW L"find"
+
+#ifdef UNICODE
+#define CMDSTR_OPEN CMDSTR_OPENW
+#define CMDSTR_EXPLORE CMDSTR_EXPLOREW
+#define CMDSTR_FIND CMDSTR_FINDW
+#else
+#define CMDSTR_OPEN CMDSTR_OPENA
+#define CMDSTR_EXPLORE CMDSTR_EXPLOREA
+#define CMDSTR_FIND CMDSTR_FINDA
+#endif
+
+#define CMDSTR_DEFAULT MAKEINTRESOURCE(0x00)
+
+#define CMDSTR_LINK MAKEINTRESOURCE(0x10)
+#define CMDSTR_DELETE MAKEINTRESOURCE(0x11)
+#define CMDSTR_RENAME MAKEINTRESOURCE(0x12)
+#define CMDSTR_PROPERTIES MAKEINTRESOURCE(0x13)
+#define CMDSTR_CUT MAKEINTRESOURCE(0x18)
+#define CMDSTR_COPY MAKEINTRESOURCE(0x19)
+
+BOOL WINAPI WIN_SHInvokeCommand(
+ HWND hwndOwner,
+ DWORD dwFlags,
+ LPCTSTR lpPath,
+ LPCSTR lpVerb,
+ LPCSTR lpParameters,
+ LPCSTR lpDirectory,
+ int nShow
+ );
+
+//--------------------------------------------------------------------------
+
+BOOL WINAPI WIN_SHStrRetToMultiByte(
+ LPCITEMIDLIST pidl,
+ const STRRET * pStr,
+ LPSTR lpMultiByte,
+ int cchMultiByte
+ );
+
+DWORD WIN_SHBuildCRC( LPVOID pBytes, ULONG nBytes );
+
+DWORD WINAPI WIN_GetShellVersion(VOID);
+
+HIMAGELIST WINAPI WIN_SHGetSystemImageList( UINT uFlags );
+
+//--------------------------------------------------------------------------
+
+/*
+
+ULONG WINAPI WIN_CreateStringFromBinary (
+ LPCVOID pv,
+ ULONG cbSize,
+ LPSTR pszString,
+ ULONG cbStringSize
+ );
+
+ULONG WINAPI WIN_CreateBinaryFromString(
+ LPCSTR pszStr,
+ LPVOID pBuffer,
+ ULONG cbSize
+ );
+*/
+
+//--------------------------------------------------------------------------
+
+DWORD WINAPI WIN_SHSetValue(
+ HKEY hKey,
+ LPCTSTR pszSubKey,
+ LPCTSTR pszValue,
+ DWORD dwType,
+ LPCVOID pvData,
+ DWORD cbData
+ );
+
+DWORD WINAPI WIN_SHGetValue(
+ HKEY hKey,
+ LPCTSTR pszSubKey,
+ LPCTSTR pszValue,
+ LPDWORD pdwType,
+ LPVOID pvData,
+ LPDWORD pcbData
+ );
+
+DWORD WINAPI WIN_SHDeleteValue(
+ HKEY hKey,
+ LPCTSTR pszSubKey,
+ LPCTSTR pszValue
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _SHUTIL_H_
+
diff --git a/tools/win/inc/toolsdll.hxx b/tools/win/inc/toolsdll.hxx
new file mode 100644
index 000000000000..adaa01e1f986
--- /dev/null
+++ b/tools/win/inc/toolsdll.hxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolsdll.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _TOOLSDLL_HXX
+#define _TOOLSDLL_HXX
+
+#ifdef WIN
+
+#ifndef _STRING_H
+#include <string.h>
+#endif
+
+#ifndef _SVWIN_H
+#include <svwin.h>
+#endif
+
+#ifndef _SOLAR_H
+#include <solar.h>
+#endif
+
+#ifndef _SHL_HXX
+#include <shl.hxx>
+#endif
+
+// ----------------
+// - MemMgr-Daten -
+// ----------------
+
+// Anzahl Freispeicherlisten
+#define MEM_FREELIST_COUNT 15
+
+
+// --------------
+// - Tools-Data -
+// --------------
+
+struct SVDATA;
+struct FreeBlock;
+
+struct MemData
+{
+ FreeBlock* pFirstBlocks[MEM_FREELIST_COUNT]; // Erste Bloecke in Freispeicherlisten
+ void* pNewHandler; // New-Handler
+ int nMultiThread; // MultiThread an/aus
+};
+
+struct ToolsData
+{
+ // !!! SVDATA muss in jedem Fall ganz vorne in der Struktur stehen !!!
+ SVDATA* pSVData; // Pointer auf StarView-Daten
+ HANDLE hMem; // Handler der Tools-Daten
+ MemData aMemD; // Daten der Speicherverwaltung
+ void* aAppData[SHL_COUNT]; // Daten fuer andere Shared Libs
+};
+
+
+// ----------------------
+// - Zugriffsfunktionen -
+// ----------------------
+
+// IN APPDATA.ASM
+extern "C"
+{
+ToolsData* FAR PASCAL ImpGetAppData();
+void FAR PASCAL ImpSetAppData( ToolsData* pData );
+}
+
+// IN TOOLSDLL.CXX
+ToolsData* ImpGetToolsData();
+
+#endif
+
+#endif // _DLL_HXX
diff --git a/tools/win/inc/winshell.hxx b/tools/win/inc/winshell.hxx
new file mode 100644
index 000000000000..f712b56ec7be
--- /dev/null
+++ b/tools/win/inc/winshell.hxx
@@ -0,0 +1,417 @@
+/*************************************************************************
+ *
+ * $RCSfile: winshell.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _WINSHELL_HXX
+#define _WINSHELL_HXX
+
+#include <prewin.h>
+#include "shutil.h"
+#include <postwin.h>
+
+#include <string.hxx>
+
+//----------------------------------------------------------------------------
+// CItemIDList
+//----------------------------------------------------------------------------
+
+class CItemIDList
+{
+public:
+ CItemIDList();
+ CItemIDList( const CItemIDList & );
+ CItemIDList( LPCITEMIDLIST );
+ CItemIDList( const String & );
+ CItemIDList( int nFolder );
+ ~CItemIDList();
+
+ CItemIDList & operator = ( const CItemIDList & );
+ CItemIDList & operator += ( const CItemIDList & );
+ CItemIDList operator + ( const CItemIDList & ) const;
+
+ int operator == ( const CItemIDList & ) const;
+ int operator != ( const CItemIDList & rIDList ) const
+ { return ! operator == ( rIDList ); };
+
+ operator LPCITEMIDLIST() const
+ { return m_pidl; };
+
+ int GetTokenCount() const;
+ CItemIDList GetToken( int nIndex ) const;
+ CItemIDList GetParent( int nLevelFromBottom = 1) const;
+ CItemIDList GetChild( int nLevelFromBottom = 1 ) const;
+ void Split( CItemIDList & rParent, CItemIDList & rChild, int nLevelFromBottom = 1 ) const;
+
+ CItemIDList operator []( int nIndex ) const
+ { return GetToken( nIndex ); };
+
+ String GetFilePath() const;
+
+ BOOL IsValid() const
+ { return m_pidl != NULL && m_pidl->mkid.cb != sizeof(USHORT); }
+
+ int GetRootID() const
+ { return m_nFolder; }
+
+protected:
+ ITEMIDLIST *m_pidl;
+ int m_nFolder;
+};
+
+
+inline CItemIDList CItemIDList::operator + ( const CItemIDList & rIDList ) const
+{
+ CItemIDList aCopy( *this );
+ aCopy += rIDList;
+ return aCopy;
+}
+
+//----------------------------------------------------------------------------
+// Types for CShellFolder
+//----------------------------------------------------------------------------
+
+// Notification Events fuer CShellFolder
+
+enum NotificationEvent
+{
+ NotificationEvent_Error,
+ NotificationEvent_Signaled,
+ NotificationEvent_Canceled
+};
+
+// Volume information
+
+typedef struct _WIN32_VOLUME_DATA
+{
+ TCHAR cDeviceName[MAX_PATH];
+ TCHAR cVolumeName[MAX_PATH];
+ TCHAR cFileSystemName[MAX_PATH];
+ DWORD dwSerialNumber;
+ DWORD dwFileSystemFlags;
+ DWORD nMaxComponentLength;
+} WIN32_VOLUME_DATA;
+
+// Bekannte Class-IDs fuer wichtige Ordner
+
+// {871C5380-42A0-1069-A2EA-08002B30309D} Internet Explorer 4.0
+static const GUID CLSID_IE4 =
+{ 0x871C5380, 0x42A0, 0x1069, { 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } };
+
+// {208D2C60-3AEA-1069-A2D7-08002B30309D} Netzwerkumgebung
+static const GUID CLSID_Network =
+{ 0x208D2C60, 0x3AEA, 0x1069, { 0xA2, 0xD7, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } };
+
+// {645FF040-5081-101B-9F08-00AA002F954E} Papierkorb
+static const GUID CLSID_RecycleBin =
+{ 0x645FF040, 0x5081, 0x101B, { 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E } };
+
+// {20D04FE0-3AEA-1069-A2D8-08002B30309D} Arbeitsplatz
+static const GUID CLSID_MyComputer =
+{ 0x20D04FE0, 0x3AEA, 0x1069, { 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } };
+
+// {D6277990-4C6A-11CF-8D87-00AA0060F5BF} Geplante Vorgänge
+static const GUID CLSID_Tasks =
+{ 0xD6277990, 0x4C6A, 0x11CF, { 0x8D, 0x87, 0x00, 0xAA, 0x00, 0x60, 0xF5, 0xBF } };
+
+// Fehlt im Header
+
+#define SHGDN_INCLUDE_NONFILESYS 0x2000
+
+#define CSIDL_UNKNOWN -1
+#define CSIDL_ROOT -2
+#define CSIDL_SYSTEM -3
+
+// Suchmaske fuer IEnumIDList
+
+#define SHCONTF_ALL (SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN)
+
+// SHITEM Prefix Kinds
+
+#define SHGII_CONTAINER_MASK 0x70
+
+#define SHGII_COMPUTER 0x20
+
+#define SHGII_COMPUTER_REMOVABLE 0x22
+#define SHGII_COMPUTER_FIXED 0x23
+#define SHGII_COMPUTER_REMOTE 0x24
+#define SHGII_COMPUTER_CDROM 0x25
+#define SHGII_COMPUTER_RAMDISK 0x26
+#define SHGII_COMPUTER_FLOPPY525 0x28
+#define SHGII_COMPUTER_FLOPPY35 0x29
+#define SHGII_COMPUTER_NETWORK 0x2A
+#define SHGII_COMPUTER_REGITEM 0x2E
+
+#define SHGII_ROOT 0x10
+#define SHGII_ROOT_REGITEM 0x1F
+
+#define SHGII_NETWORK 0x40
+#define SHGII_NETWORK_TREE 0x47
+#define SHGII_NETWORK_SERVER 0x42
+#define SHGII_NETWORK_DIRECTORY 0x43
+#define SHGII_NETWORK_PRINTER 0x41
+
+#define SHGII_FILESYSTEM 0x30
+#define SHGII_FILESYSTEM_FILE 0x31
+#define SHGII_FILESYSTEM_DIRECTORY 0x32
+
+#define SHGII_ANCESTOR 0x80
+
+#define SHITEMCONTAINER( pidl ) ((pidl)->mkid.abID[0] & SHGII_CONTAINER_MASK)
+#define SHITEMKIND( pidl ) ((pidl)->mkid.abID[0] & 0x7F)
+
+//----------------------------------------------------------------------------
+// CShellFolderData
+//----------------------------------------------------------------------------
+
+class CShellFolderData
+{
+protected:
+ CShellFolderData();
+ virtual ~CShellFolderData();
+
+ IShellFolder *m_pShellFolder;
+ IEnumIDList *m_pEnumIDList;
+ IShellIcon *m_pShellIcon;
+ BOOL m_bIsOpen;
+ HANDLE m_hCancelEvent;
+ DWORD m_dwContentFlags;
+};
+
+//----------------------------------------------------------------------------
+// CShellFolder
+//----------------------------------------------------------------------------
+
+// Ganz "normaler" Ordner basierend auf dem IShellFolder Interface
+
+class CShellFolder : public CShellFolderData
+{
+public:
+ CShellFolder( const CItemIDList & );
+ CShellFolder( const CShellFolder & );
+ CShellFolder( IShellFolder * );
+
+ // Retrieval of Item IDs
+
+ virtual BOOL Reset();
+
+ BOOL GetNextValidID( CItemIDList & );
+
+ virtual BOOL GetNextID( CItemIDList & );
+ virtual BOOL ValidateID( const CItemIDList & );
+
+ // Getting information about Items
+
+ virtual BOOL GetAttributesOf( const CItemIDList &, LPDWORD pdwInOut );
+ virtual BOOL GetNameOf( const CItemIDList &, String & );
+
+ virtual BOOL GetFileInfo( const CItemIDList &, WIN32_FIND_DATA * );
+ virtual BOOL GetVolumeInfo( const CItemIDList & rIDList, WIN32_VOLUME_DATA * );
+
+ // Modifying the folder contents
+
+ virtual BOOL SetNameOf( const CItemIDList &, const String &, CItemIDList & );
+ virtual BOOL DeleteItem( const CItemIDList & );
+
+ // Comparison of IDs
+
+ virtual int CompareIDs( const CItemIDList &, const CItemIDList & );
+
+ // UI Components
+
+ virtual IContextMenu *GetContextMenu( int nItems, const CItemIDList * );
+ virtual String GetIconLocation( const CItemIDList & );
+
+ // Notifications
+
+ virtual NotificationEvent WaitForChanges();
+ virtual void CancelWaitNotifications();
+
+protected:
+ CShellFolder() : CShellFolderData() {};
+
+ void Initialize( IShellFolder *pShellFolder );
+ void Initialize( LPCITEMIDLIST );
+};
+
+//----------------------------------------------------------------------------
+// CFileSystemFolder
+//----------------------------------------------------------------------------
+
+// Reiner !!! Filesystem-Ordner. Benutzt optimierten Notification Mechanismus
+
+class CFileSystemFolder : public CShellFolder
+{
+public:
+ CFileSystemFolder( LPCSTR pszPath );
+
+ virtual NotificationEvent WaitForChanges();
+
+protected:
+ CFileSystemFolder() : CShellFolder() {};
+
+ void Initialize( LPCTSTR pszPath );
+
+ TCHAR m_szPath[MAX_PATH];
+};
+
+//----------------------------------------------------------------------------
+// CSpecialFolder
+//----------------------------------------------------------------------------
+
+// Wie SHellFolder, aber andere Konstruktion ueber definierte Junktion-Points
+
+class CSpecialFolder : public CShellFolder
+{
+public:
+ CSpecialFolder( int nFolder );
+
+protected:
+ CSpecialFolder() : CShellFolder() {};
+
+ void Initialize( int nFolder );
+
+ int m_nFolder;
+};
+
+//----------------------------------------------------------------------------
+// CMyComputerFolder
+//----------------------------------------------------------------------------
+
+// Der MS-Windows "Arbeitsplatz"
+
+class CMyComputerFolder : public CSpecialFolder
+{
+public:
+ CMyComputerFolder() : CSpecialFolder( CSIDL_DRIVES ) {};
+};
+
+//----------------------------------------------------------------------------
+// CVolumesFolder
+//----------------------------------------------------------------------------
+
+// Wie CMyComputersFolder, enthält aber nur die Laufwerke
+
+class CVolumesFolder : public CMyComputerFolder
+{
+public:
+ CVolumesFolder() : CMyComputerFolder() {};
+
+ virtual BOOL ValidateID( const CItemIDList & );
+ virtual NotificationEvent WaitForChanges();
+};
+
+//----------------------------------------------------------------------------
+// CWorkplaceFolder
+//----------------------------------------------------------------------------
+
+// Wie CMyComputersFolder, enthält aber keine!!! Laufwerke
+
+class CWorkplaceFolder : public CMyComputerFolder
+{
+ CWorkplaceFolder() : CMyComputerFolder() {};
+
+ virtual BOOL ValidateID( const CItemIDList & );
+ virtual NotificationEvent WaitForChanges();
+};
+
+//----------------------------------------------------------------------------
+// CDesktopFolder
+//----------------------------------------------------------------------------
+
+// Der MS-Windows Desktop
+
+class CDesktopFolder : public CSpecialFolder
+{
+public:
+ CDesktopFolder() : CSpecialFolder( CSIDL_DESKTOP ) {};
+};
+
+//----------------------------------------------------------------------------
+// CDesktopAncestorsFolder
+//----------------------------------------------------------------------------
+
+// Wie CDesktopFolder, enthält aber nur Arbeitsplatz und Netzwerk
+
+class CDesktopAncestorsFolder : public CDesktopFolder
+{
+public:
+ CDesktopAncestorsFolder() : CDesktopFolder() {};
+
+ virtual BOOL ValidateID( const CItemIDList & );
+ virtual NotificationEvent WaitForChanges();
+};
+
+//----------------------------------------------------------------------------
+// CDesktopContentsFolder
+//----------------------------------------------------------------------------
+
+// Wie CDesktopFolder, aber ohne!!! Arbeitsplatz und Netzwerk
+
+class CDesktopContentsFolder : public CDesktopFolder
+{
+public:
+ CDesktopContentsFolder() : CDesktopFolder() {};
+
+ virtual BOOL ValidateID( const CItemIDList & );
+ virtual NotificationEvent WaitForChanges();
+};
+
+
+#endif // _WINSHELL_HXX
diff --git a/tools/win/source/dll/makefile.mk b/tools/win/source/dll/makefile.mk
new file mode 100644
index 000000000000..06c691cd27f1
--- /dev/null
+++ b/tools/win/source/dll/makefile.mk
@@ -0,0 +1,112 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (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.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..\..\..
+
+PRJNAME=TOOLS
+TARGET=dll
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- WNT ----------------------------------------------------------
+
+.IF "$(GUI)" == "WNT"
+
+# --- Files --------------------------------------------------------
+
+CXXFILES= toolsdll.cxx
+
+SLOFILES= $(SLO)$/toolsdll.obj
+
+OBJFILES= $(OBJ)$/toolsdll.obj
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.ELSE # "$(GUI)" == "WNT"
+
+# --- Files --------------------------------------------------------
+
+ASMFILES= appdata.asm
+CXXFILES= toolsdll.cxx
+
+SLOFILES= $(SLO)$/toolsdll.obj \
+ $(SLO)$/appdata.obj
+
+OBJFILES= $(OBJ)$/toolsdll.obj \
+ $(OBJ)$/appdata.obj
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(depend)" == ""
+appdata.asm:
+.ENDIF
+
+.ENDIF # "$(GUI)" == "WNT"
+
diff --git a/tools/win/source/dll/toolsdll.cxx b/tools/win/source/dll/toolsdll.cxx
new file mode 100644
index 000000000000..293544e26136
--- /dev/null
+++ b/tools/win/source/dll/toolsdll.cxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * $RCSfile: toolsdll.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVWIN_H
+#include <svwin.h>
+#endif
+
+#ifndef _DLL_HXX
+#include <dll.hxx>
+#endif
+#ifndef _TOOLSDLL_HXX
+#include <toolsdll.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <shl.hxx>
+#endif
+
+// =======================================================================
+
+#ifdef WIN
+
+extern "C" int CALLBACK LibMain( HINSTANCE, WORD, WORD nHeap, LPSTR )
+{
+ if ( nHeap )
+ UnlockData( 0 );
+
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+extern "C" int CALLBACK WEP( int )
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+ToolsData* ImpGetToolsData()
+{
+ ToolsData* pData = ImpGetAppData();
+
+ // Tools-Init
+ if ( !pData )
+ {
+ // Speicher anlegen
+ HANDLE hMem = GlobalAlloc( GMEM_MOVEABLE | GMEM_ZEROINIT,
+ (DWORD)sizeof( ToolsData ) );
+
+ if ( !hMem )
+ return NULL;
+
+ pData = (ToolsData*)GlobalLock( hMem );
+
+ if ( !pData )
+ {
+ GlobalFree( hMem );
+ return NULL;
+ }
+
+ // ToolsData setzen
+ ImpSetAppData( pData );
+ }
+
+ return pData;
+}
+
+// -----------------------------------------------------------------------
+
+void** GetAppData( USHORT nSharedLib )
+{
+ ToolsData* pData = ImpGetToolsData();
+ return &(pData->aAppData[nSharedLib]);
+}
+
+// -----------------------------------------------------------------------
+
+void SetSVData( SVDATA* pSVData )
+{
+ ToolsData* pData = ImpGetToolsData();
+ pData->pSVData = pSVData;
+}
+
+// -----------------------------------------------------------------------
+
+void EnterMultiThread( int bEnter )
+{
+ ToolsData* pData = ImpGetToolsData();
+ if ( bEnter )
+ pData->aMemD.nMultiThread++;
+ else if ( pData->aMemD.nMultiThread )
+ pData->aMemD.nMultiThread--;
+}
+
+// -----------------------------------------------------------------------
+
+int IsMultiThread()
+{
+ return (ImpGetToolsData()->aMemD.nMultiThread != 0);
+}
+
+#endif
+
+// =======================================================================
+
+#ifdef WNT
+
+static void* aAppData[SHL_COUNT];
+
+// -----------------------------------------------------------------------
+
+void** GetAppData( USHORT nSharedLib )
+{
+ return &(aAppData[nSharedLib]);
+}
+
+// -----------------------------------------------------------------------
+
+// EnterMultiThread()/IsMultiThread()/... in MEMWNT.CXX, damit inline
+
+#endif
diff --git a/tools/win/source/fastfsys/makefile.mk b/tools/win/source/fastfsys/makefile.mk
new file mode 100644
index 000000000000..9d56b847b90e
--- /dev/null
+++ b/tools/win/source/fastfsys/makefile.mk
@@ -0,0 +1,108 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:03:11 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (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.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..\..\..
+
+PRJNAME=TOOLS
+TARGET=fastfsys
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- WNT ----------------------------------------------------------
+
+.IF "$(GUI)" == "WNT"
+
+# --- Files --------------------------------------------------------
+
+
+OBJFILES= $(OBJ)$/shutil.obj \
+ $(OBJ)$/shidl.obj \
+ $(OBJ)$/shmalloc.obj \
+ $(OBJ)$/fffolder.obj \
+ $(OBJ)$/ffmenu.obj \
+ $(OBJ)$/ffitem.obj \
+ $(OBJ)$/fflink.obj \
+ $(OBJ)$/ffparser.obj \
+ $(OBJ)$/wincidl.obj \
+ $(OBJ)$/wincshf.obj
+
+
+SLOFILES= $(SLO)$/shutil.obj \
+ $(SLO)$/shidl.obj \
+ $(SLO)$/shmalloc.obj \
+ $(SLO)$/fffolder.obj \
+ $(SLO)$/ffmenu.obj \
+ $(SLO)$/ffitem.obj \
+ $(SLO)$/fflink.obj \
+ $(SLO)$/ffparser.obj \
+ $(SLO)$/wincidl.obj \
+ $(SLO)$/wincshf.obj
+
+# --- Targets ------------------------------------------------------
+
+.ENDIF
+
+.INCLUDE : target.mk