From 25ea7f0b5e81b0242ec6e6a761f874db16383d22 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 20 Apr 2013 07:23:12 +0200 Subject: move sal_inc headers to include/ Change-Id: I840c681b7c500640d3983e05e9895f3fa8bb1313 Reviewed-on: https://gerrit.libreoffice.org/3501 Reviewed-by: David Tardon Tested-by: David Tardon --- sal/inc/cppunittester/protectorfactory.hxx | 40 ----- sal/inc/osl/detail/android-bootstrap.h | 53 ------- sal/inc/osl/detail/component-mapping.h | 42 ------ sal/inc/osl/detail/file.h | 57 ------- sal/inc/osl/detail/ios-bootstrap.h | 62 -------- sal/inc/systools/win32/comptr.hxx | 229 ----------------------------- sal/inc/systools/win32/comtools.hxx | 187 ----------------------- sal/inc/systools/win32/qswin32.h | 43 ------ sal/inc/systools/win32/uwinapi.h | 58 -------- 9 files changed, 771 deletions(-) delete mode 100644 sal/inc/cppunittester/protectorfactory.hxx delete mode 100644 sal/inc/osl/detail/android-bootstrap.h delete mode 100644 sal/inc/osl/detail/component-mapping.h delete mode 100644 sal/inc/osl/detail/file.h delete mode 100644 sal/inc/osl/detail/ios-bootstrap.h delete mode 100644 sal/inc/systools/win32/comptr.hxx delete mode 100644 sal/inc/systools/win32/comtools.hxx delete mode 100644 sal/inc/systools/win32/qswin32.h delete mode 100644 sal/inc/systools/win32/uwinapi.h (limited to 'sal/inc') diff --git a/sal/inc/cppunittester/protectorfactory.hxx b/sal/inc/cppunittester/protectorfactory.hxx deleted file mode 100644 index b0b21bd1b259..000000000000 --- a/sal/inc/cppunittester/protectorfactory.hxx +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_CPPUNITTESTER_PROTECTORFACTORY_HXX -#define INCLUDED_CPPUNITTESTER_PROTECTORFACTORY_HXX - -#include -#include - -namespace cppunittester -{ - // The type of CppUnit::Protector factory functions that can be plugged into - // cppunittester: - extern "C" typedef CppUnit::Protector * SAL_CALL ProtectorFactory(); -} - -#ifdef DISABLE_DYNLOADING -extern "C" CppUnit::Protector *unoexceptionprotector(); -extern "C" CppUnit::Protector *unobootstrapprotector(); -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/osl/detail/android-bootstrap.h b/sal/inc/osl/detail/android-bootstrap.h deleted file mode 100644 index 626447f36524..000000000000 --- a/sal/inc/osl/detail/android-bootstrap.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef ANDROID_BOOSTRAP_H -#define ANDROID_BOOSTRAP_H - -#if defined(ANDROID) - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef struct lo_apk_dir lo_apk_dir; - -void *lo_apkentry(const char *filename, - size_t *size); - -lo_apk_dir *lo_apk_opendir(const char *dirname); - -struct dirent *lo_apk_readdir(lo_apk_dir *dirp); - -int lo_apk_closedir(lo_apk_dir *dirp); - -int lo_apk_lstat(const char *path, struct stat *statp); - -int lo_dlcall_argc_argv(void *function, - int argc, - const char **argv); - -JavaVM *lo_get_javavm(void); - -const char *lo_get_app_data_dir(void); - -#ifdef __cplusplus -} -#endif - -#endif // ANDROID - -#endif // ANDROID_BOOTSTRAP_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/osl/detail/component-mapping.h b/sal/inc/osl/detail/component-mapping.h deleted file mode 100644 index 4a0f4796a7b3..000000000000 --- a/sal/inc/osl/detail/component-mapping.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef COMPONENT_MAPPING_H -#define COMPONENT_MAPPING_H - -#ifdef DISABLE_DYNLOADING - -#ifdef __cplusplus -extern "C" { -#endif - -/* On iOS and perhaps Android static linking of the LO code into one - * executable (on Android, into one shared library) is used. In order to get - * the needed UNO coponent linked in, the "main" code for an app needs to - * implement the lo_get_libmap() function to map UNO component library names - * as produced in a build for iOS (like configmgr.uno.a or libsclo.a) to the - * corresponding component_getFactory functions. - */ - -typedef struct { - const char *lib; - void * (*component_getFactory_function)(const char *, void *, void *); -} lib_to_component_mapping; - -const lib_to_component_mapping *lo_get_libmap(void); - -#ifdef __cplusplus -} -#endif - -#endif /* DISABLE_DYNLOADING */ - -#endif /* COMPONENT_MAPPING_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/osl/detail/file.h b/sal/inc/osl/detail/file.h deleted file mode 100644 index aebec89088d1..000000000000 --- a/sal/inc/osl/detail/file.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_OSL_DETAIL_FILE_H -#define INCLUDED_OSL_DETAIL_FILE_H - -#include "sal/config.h" - -#include - -#include "sal/saldllapi.h" -#include "sal/types.h" - -/** @cond INTERNAL */ - -/* Some additions to the osl file functions for LibreOffice internal - use. Needed for details in the Android support. - */ - -#if defined __cplusplus -extern "C" { -#endif - -/* More flags needed for semantics that match the open() call that - used to be in SvFileStream::Open(). -*/ -#define osl_File_OpenFlag_Trunc 0x00000010L -#define osl_File_OpenFlag_NoExcl 0x00000020L - -SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFilePath( - const char *cpFilePath, - oslFileHandle* pHandle, - sal_uInt32 uFlags ); - -/* Get the OS specific "handle" of an open file. */ -SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileOSHandle( - oslFileHandle Handle, - sal_IntPtr *piFileHandle ); - -/* for unit testing. */ -SAL_DLLPUBLIC oslFileError SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle ); - -#if defined __cplusplus -} -#endif - -/** @endcond */ - -#endif /* INCLUDED_OSL_DETAIL_FILE_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h deleted file mode 100644 index fa3d0c85b460..000000000000 --- a/sal/inc/osl/detail/ios-bootstrap.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef IOS_BOOSTRAP_H -#define IOS_BOOSTRAP_H - -#if defined(IOS) - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* These functions are the interface between the upper GUI layers of a - * LibreOffice-based iOS app and the lower "core" layers, used in cases - * where the core parts need to call functions in the upper parts or - * vice versa. - * - * Thus there are two classes of functions here: - * - * 1) Those to be implemented in the upper layer and called by the - * lower layer - * - * 2) Those implmented in the lower layers to be called by the upper - * layer, in cases where we don't want to include a bunch of the - * "normal" LibreOffice C++ headers in an otherwise purely Objective-C - * CocoaTouch-based source file. Of course it depends on the case - * where that is wanted, and this all is work in progress. - */ - -/* 1) */ - -void lo_damaged(CGRect rect); - -/* 2) */ - -void lo_runMain(); -void lo_set_view_size(int width, int height); -void lo_render_windows(CGContextRef context, CGRect rect); -void lo_tap(int x, int y); -void lo_pan(int x, int y); -void lo_keyboard_input(int c); - -#ifdef __cplusplus -} -#endif - -#endif // IOS -#endif // IOS_BOOTSTRAP_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/comptr.hxx b/sal/inc/systools/win32/comptr.hxx deleted file mode 100644 index 7ef5123f3ac5..000000000000 --- a/sal/inc/systools/win32/comptr.hxx +++ /dev/null @@ -1,229 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef COMPTR_HXX -#define COMPTR_HXX - -#include -#include -#include - -template< class T_INTERFACE , - REFIID P_IID = IID_NULL , - REFCLSID P_CLSID = CLSID_NULL > -class ComPtr -{ - public: - - //--------------------------------------------------------------------- - /** initialize com ptr with null. - */ - ComPtr() - { - m_pInterface = NULL; - } - - //--------------------------------------------------------------------- - /** initialize com ptr with given interface. - */ - ComPtr(T_INTERFACE* pInterface) - { - m_pInterface = pInterface; - if (m_pInterface) - m_pInterface->AddRef(); - } - - //--------------------------------------------------------------------- - /** copy ctor. - */ - ComPtr(const ComPtr< T_INTERFACE, P_IID, P_CLSID >& aCopy) - { - m_pInterface = aCopy.m_pInterface; - if (m_pInterface) - m_pInterface->AddRef(); - } - - //--------------------------------------------------------------------- - /** initialize object by quering external object for the right interface. - */ - ComPtr(IUnknown* pIUnknown) - { - if (pIUnknown) - pIUnknown->QueryInterface(P_IID, (void**)&m_pInterface); - } - - //--------------------------------------------------------------------- - /** deinitialize com object right. - */ - ~ComPtr() - { - release(); - } - - public: - - //--------------------------------------------------------------------- - HRESULT create() - { - return CoCreateInstance(P_CLSID, NULL, CLSCTX_ALL, P_IID, (void**)&m_pInterface); - } - - //--------------------------------------------------------------------- - operator T_INTERFACE*() const - { - return m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE& operator*() const - { - return *m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE** operator&() - { - return &m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE* operator->() const - { - return m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE* operator=(T_INTERFACE* pInterface) - { - if ( equals(pInterface) ) - return m_pInterface; - - m_pInterface->Release(); - m_pInterface = pInterface; - if (m_pInterface) - m_pInterface->AddRef(); - - return m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE* operator=(IUnknown* pIUnknown) - { - if (pIUnknown) - pIUnknown->QueryInterface(P_IID, (void**)&m_pInterface); - return m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE* operator=(const ComPtr< T_INTERFACE, P_IID, P_CLSID >& aCopy) - { - m_pInterface = aCopy.m_pInterface; - if (m_pInterface) - m_pInterface->AddRef(); - - return m_pInterface; - } - - //--------------------------------------------------------------------- - T_INTERFACE* get() const - { - return m_pInterface; - } - - //--------------------------------------------------------------------- - void attach(T_INTERFACE* pInterface) - { - if (pInterface) - { - m_pInterface->Release(); - m_pInterface = pInterface; - } - } - - //--------------------------------------------------------------------- - T_INTERFACE* detach() - { - T_INTERFACE* pInterface = m_pInterface; - m_pInterface = NULL; - return pInterface; - } - - //--------------------------------------------------------------------- - void release() - { - if (m_pInterface) - { - m_pInterface->Release(); - m_pInterface = NULL; - } - } - -#ifndef __MINGW32__ - //--------------------------------------------------------------------- - template< class T_QUERYINTERFACE > - HRESULT query(T_QUERYINTERFACE** pQuery) - { - return m_pInterface->QueryInterface(__uuidof(T_QUERYINTERFACE), (void**)pQuery); - } -#endif - - //--------------------------------------------------------------------- - HRESULT query(REFIID rIID , - void** pQuery) - { - return m_pInterface->QueryInterface(rIID, pQuery); - } - - //--------------------------------------------------------------------- - HRESULT unknown(IUnknown** pQuery) - { - return m_pInterface->QueryInterface(IID_IUnknown, (void**)pQuery); - } - - //--------------------------------------------------------------------- - ::sal_Bool equals(IUnknown* pCheck) - { - if ( - ( ! m_pInterface ) && - ( ! pCheck ) - ) - return sal_True; - - IUnknown* pCurrent = NULL; - m_pInterface->QueryInterface(IID_IUnknown, (void**)&pCurrent); - - ::sal_Bool bEquals = (pCheck == pCurrent); - pCurrent->Release(); - - return bEquals; - } - - //--------------------------------------------------------------------- - ::sal_Bool is() - { - return (m_pInterface != 0); - } - - private: - T_INTERFACE* m_pInterface; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/comtools.hxx b/sal/inc/systools/win32/comtools.hxx deleted file mode 100644 index 1ef61ea3d967..000000000000 --- a/sal/inc/systools/win32/comtools.hxx +++ /dev/null @@ -1,187 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#pragma once - -#include -#include -#if defined _MSC_VER -#pragma warning(push,1) -#endif -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif - -namespace sal -{ -namespace systools -{ - typedef int HRESULT; - - /* Simple exception class for propagating COM errors */ - class ComError : public std::runtime_error - { - public: - ComError(const std::string& message, HRESULT hr) : - std::runtime_error(message), - hr_(hr) - {} - - HRESULT GetHresult() const - { - return hr_; - } - - private: - HRESULT hr_; - }; - - /* A simple COM smart pointer template */ - template - class COMReference - { - public: - COMReference() : - com_ptr_(NULL) - { - } - - explicit COMReference(T* comptr) : - com_ptr_(comptr) - { - addRef(); - } - - /* Explicitly controllable whether AddRef will be called or not */ - COMReference(T* comptr, bool bAddRef) : - com_ptr_(comptr) - { - if (bAddRef) - addRef(); - } - - COMReference(const COMReference& other) : - com_ptr_(other.com_ptr_) - { - addRef(); - } - - COMReference& operator=(const COMReference& other) - { - if (other.com_ptr_) - other.com_ptr_->AddRef(); - release(); - com_ptr_ = other.com_ptr_; - return *this; - } - - COMReference& operator=(T* comptr) - { - release(); - com_ptr_ = comptr; - addRef(); - return *this; - } - - ~COMReference() - { - release(); - } - - template - COMReference QueryInterface(REFIID iid) - { - COMReference ip; - HRESULT hr = E_FAIL; - if (com_ptr_) - hr = com_ptr_->QueryInterface(iid, reinterpret_cast(&ip)); - - if (FAILED(hr)) - throw ComError("QueryInterface failed: Interface not supported!", hr); - - return ip; - } - - T* operator->() const - { - return com_ptr_; - } - - T& operator*() const - { - return *com_ptr_; - } - - /* Necessary for assigning com_ptr_ from functions like - CoCreateInstance which require a 'void**' */ - T** operator&() - { - release(); - com_ptr_ = NULL; - return &com_ptr_; - } - - T* get() const - { - return com_ptr_; - } - - COMReference& clear() - { - release(); - com_ptr_ = NULL; - return *this; - } - - bool is() const - { - return (com_ptr_ != NULL); - } - - private: - ULONG addRef() - { - ULONG cnt = 0; - if (com_ptr_) - cnt = com_ptr_->AddRef(); - return cnt; - } - - ULONG release() - { - ULONG cnt = 0; - if (com_ptr_) - cnt = com_ptr_->Release(); - return cnt; - } - - private: - T* com_ptr_; - }; - -} // systools -} // sal - -/* Typedefs for some popular COM interfaces */ -typedef sal::systools::COMReference IDataObjectPtr; -typedef sal::systools::COMReference IStreamPtr; -typedef sal::systools::COMReference IEnumFORMATETCPtr; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/qswin32.h b/sal/inc/systools/win32/qswin32.h deleted file mode 100644 index ed268d26affd..000000000000 --- a/sal/inc/systools/win32/qswin32.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _QSWIN32_H -#define _QSWIN32_H - -#define QUICKSTART_CLASSNAMEA "LO Listener Class" -#define QUICKSTART_WINDOWNAMEA "LO Listener Window" -#define SHUTDOWN_QUICKSTART_MESSAGEA "LO KillTray" - -#define QUICKSTART_CLASSNAMEW L##QUICKSTART_CLASSNAMEA -#define QUICKSTART_WINDOWNAMEW L##QUICKSTART_WINDOWNAMEA -#define SHUTDOWN_QUICKSTART_MESSAGEW L##SHUTDOWN_QUICKSTART_MESSAGEA - -#ifdef UNICODE -# define QUICKSTART_CLASSNAME QUICKSTART_CLASSNAMEW -# define QUICKSTART_WINDOWNAME QUICKSTART_WINDOWNAMEW -# define SHUTDOWN_QUICKSTART_MESSAGE SHUTDOWN_QUICKSTART_MESSAGEW -#else -# define QUICKSTART_CLASSNAME QUICKSTART_CLASSNAMEA -# define QUICKSTART_WINDOWNAME QUICKSTART_WINDOWNAMEA -# define SHUTDOWN_QUICKSTART_MESSAGE SHUTDOWN_QUICKSTART_MESSAGEA -#endif - -#endif /* _QSWIN32_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/inc/systools/win32/uwinapi.h b/sal/inc/systools/win32/uwinapi.h deleted file mode 100644 index 5c4c88c415f1..000000000000 --- a/sal/inc/systools/win32/uwinapi.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#pragma once -#include -#ifdef _UWINAPI_ -# define _KERNEL32_ -# define _USER32_ -# define _SHELL32_ -#endif - -#ifndef _WINDOWS_ -#ifdef _MSC_VER -# pragma warning(push,1) /* disable warnings within system headers */ -#endif -# include -#ifdef _MSC_VER -# pragma warning(pop) -#endif -#endif - -#ifdef __MINGW32__ -#include -#ifdef _UWINAPI_ -#define WINBASEAPI -#endif -#endif - -#ifdef __cplusplus - -inline bool IsValidHandle(HANDLE handle) -{ - return handle != INVALID_HANDLE_VALUE && handle != NULL; -} - -#else /* __cplusplus */ - -#define IsValidHandle(Handle) ((DWORD)(Handle) + 1 > 1) - -#endif /* __cplusplus */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit