Kaydet (Commit) 1784070c authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Remove useless cruft

üst 613eefe4
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#pragma once
#ifndef _WINDOWS_
#include <windows.h>
#endif
#ifdef __cplusplus
extern "C"{
#endif
//------------------------------------------------------------------------
// undefine the macros defined in the shlobj.h file in order to avoid
// warnings because of multiple defines
//------------------------------------------------------------------------
// begin obsolete Win32 API functions -->
#ifdef RegOpenKey
#undef RegOpenKey
#endif
#ifdef RegEnumKey
#undef RegEnumKey
#endif
#ifdef RegCreateKey
#undef RegCreateKey
#endif
#ifdef RegQueryValue
#undef RegQueryValue
#endif
#ifdef RegSetValue
#undef RegSetValue
#endif
// <-- end obsolete Win32 functions
#ifdef RegOpenKeyExW
#undef RegOpenKeyExW
#endif
#ifdef RegEnumKeyExW
#undef RegEnumKeyExW
#endif
#ifdef RegCreateKeyExW
#undef RegCreateKeyExW
#endif
#ifdef RegDeleteKeyW
#undef RegDeleteKeyW
#endif
#ifdef RegEnumValueW
#undef RegEnumValueW
#endif
#ifdef RegQueryValueExW
#undef RegQueryValueExW
#endif
#ifdef RegSetValueExW
#undef RegSetValueExW
#endif
#ifdef RegDeleteValueW
#undef RegDeleteValueW
#endif
#ifdef RegQueryInfoKeyW
#undef RegQueryInfoKeyW
#endif
//------------------------------------------------------------------------
// set the compiler directives for the function pointer we declare below
// if we build sal or sal will be used as static library we define extern
// else sal exports the function pointers from a dll and we use __declspec
//------------------------------------------------------------------------
#define ADVAPI9X_API extern
//------------------------------------------------------------------------
// declare function pointers to the appropriate shell functions
//------------------------------------------------------------------------
ADVAPI9X_API LONG (WINAPI * lpfnRegOpenKeyExW) (
HKEY hKey, // handle to open key
LPCWSTR lpSubKey, // subkey name
DWORD ulOptions, // reserved
REGSAM samDesired, // security access mask
PHKEY phkResult // handle to open key
);
ADVAPI9X_API LONG (WINAPI *lpfnRegEnumKeyExW) (
HKEY hKey, // handle to key to enumerate
DWORD dwIndex, // subkey index
LPWSTR lpName, // subkey name
LPDWORD lpcName, // size of subkey buffer
LPDWORD lpReserved, // reserved
LPWSTR lpClass, // class string buffer
LPDWORD lpcClass, // size of class string buffer
PFILETIME lpftLastWriteTime // last write time
);
ADVAPI9X_API LONG (WINAPI *lpfnRegCreateKeyExW)(
HKEY hKey, // handle to open key
LPCWSTR lpSubKey, // subkey name
DWORD Reserved, // reserved
LPWSTR lpClass, // class string
DWORD dwOptions, // special options
REGSAM samDesired, // desired security access
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // inheritance
PHKEY phkResult, // key handle
LPDWORD lpdwDisposition // disposition value buffer
);
ADVAPI9X_API LONG (WINAPI *lpfnRegDeleteKeyW) (
HKEY hKey, // handle to open key
LPCWSTR lpSubKey // subkey name
);
ADVAPI9X_API LONG (WINAPI *lpfnRegEnumValueW) (
HKEY hKey, // handle to key to query
DWORD dwIndex, // index of value to query
LPWSTR lpValueName, // value buffer
LPDWORD lpcValueName, // size of value buffer
LPDWORD lpReserved, // reserved
LPDWORD lpType, // type buffer
LPBYTE lpData, // data buffer
LPDWORD lpcbData // size of data buffer
);
ADVAPI9X_API LONG (WINAPI *lpfnRegQueryValueExW) (
HKEY hKey, // handle to key
LPCWSTR lpValueName, // value name
LPDWORD lpReserved, // reserved
LPDWORD lpType, // type buffer
LPBYTE lpData, // data buffer
LPDWORD lpcbData // size of data buffer
);
ADVAPI9X_API LONG (WINAPI *lpfnRegSetValueExW)(
HKEY hKey, // handle to key
LPCWSTR lpValueName, // value name
DWORD Reserved, // reserved
DWORD dwType, // value type
CONST BYTE *lpData, // value data
DWORD cbData // size of value data
);
ADVAPI9X_API LONG (WINAPI *lpfnRegDeleteValueW) (
HKEY hKey, // handle to key
LPCWSTR lpValueName // value name
);
ADVAPI9X_API LONG (WINAPI *lpfnRegQueryInfoKeyW) (
HKEY hKey, // handle to key to query
LPWSTR lpClassW, // address of buffer for class string
LPDWORD lpcbClass, // address of size of class string buffer
LPDWORD lpReserved, // reserved
LPDWORD lpcSubKeys, // address of buffer for number of
// subkeys
LPDWORD lpcbMaxSubKeyLen, // address of buffer for longest subkey
// name length
LPDWORD lpcbMaxClassLen, // address of buffer for longest class
// string length
LPDWORD lpcValues, // address of buffer for number of value
// entries
LPDWORD lpcbMaxValueNameLen, // address of buffer for longest
// value name length
LPDWORD lpcbMaxValueLen, // address of buffer for longest value
// data length
LPDWORD lpcbSecurityDescriptor, // address of buffer for security
// descriptor length
PFILETIME lpftLastWriteTime // address of buffer for last write time
);
//------------------------------------------------------------------------
// redefine the above undefined macros so that the preprocessor replaces
// all occurrences of this macros with our function pointer
//------------------------------------------------------------------------
#define RegOpenKeyExW lpfnRegOpenKeyExW
#define RegEnumKeyExW lpfnRegEnumKeyExW
#define RegCreateKeyExW lpfnRegCreateKeyExW
#define RegDeleteKeyW lpfnRegDeleteKeyW
#define RegEnumValueW lpfnRegEnumValueW
#define RegQueryValueExW lpfnRegQueryValueExW
#define RegSetValueExW lpfnRegSetValueExW
#define RegDeleteValueW lpfnRegDeleteValueW
#define RegQueryInfoKeyW lpfnRegQueryInfoKeyW
#ifdef __cplusplus
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#pragma once
#ifndef _WINDOWS_
#include <windows.h>
#endif
#ifndef _COMMDLG_H_
#include <commdlg.h>
#endif
#ifdef __cplusplus
extern "C"{
#endif
//------------------------------------------------------------------------
// undefine the macros defined in the shlobj.h file in order to avoid
// warnings because of multiple defines
//------------------------------------------------------------------------
#ifdef GetOpenFileNameW
#undef GetOpenFileNameW
#endif
#ifdef GetSaveFileNameW
#undef GetSaveFileNameW
#endif
//------------------------------------------------------------------------
// set the compiler directives for the function pointer we declare below
// if we build sal or sal will be used as static library we define extern
// else sal exports the function pointers from a dll and we use __declspec
//------------------------------------------------------------------------
#define COMDLG9X_API extern
//------------------------------------------------------------------------
// declare function pointers to the appropriate comdlg functions
//------------------------------------------------------------------------
COMDLG9X_API BOOL ( WINAPI * lpfnGetOpenFileNameW ) ( LPOPENFILENAMEW lpofn );
COMDLG9X_API BOOL ( WINAPI * lpfnGetSaveFileNameW ) ( LPOPENFILENAMEW lpofn );
//------------------------------------------------------------------------
// redefine the above undefined macros so that the preprocessor replaces
// all occurrences of this macros with our function pointer
//------------------------------------------------------------------------
#define GetOpenFileNameW lpfnGetOpenFileNameW
#define GetSaveFileNameW lpfnGetSaveFileNameW
#ifdef __cplusplus
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#pragma once
#ifndef _WINDOWS_
#include <windows.h>
#endif
#ifdef __cplusplus
extern "C"{
#endif
//------------------------------------------------------------------------
// undefine the macros defined in the winuser.h file in order to avoid
// warnings because of multiple defines
//------------------------------------------------------------------------
#ifdef WNetGetConnectionW
#undef WNetGetConnectionW
#endif
//------------------------------------------------------------------------
// defines
//------------------------------------------------------------------------
#define MPR9X_API extern
//------------------------------------------------------------------------
// declare function pointers to the appropriate user32 functions
//------------------------------------------------------------------------
MPR9X_API DWORD (WINAPI *lpfnWNetGetConnectionW)(
LPCWSTR lpLocalName, // pointer to local name
LPWSTR lpRemoteName, // pointer to buffer for remote name
LPDWORD lpnLength // pointer to buffer size, in characters
);
//------------------------------------------------------------------------
// redefine the above undefined macros so that the preprocessor replaces
// all occurrences of this macros with our function pointer
//------------------------------------------------------------------------
#define WNetGetConnectionW lpfnWNetGetConnectionW
#ifdef __cplusplus
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#pragma once
#ifndef _SHELL9X_H_
#define _SHELL9X_H_
#ifndef _WINDOWS_
#include <windows.h>
#endif
#ifndef _SHLOBJ_H_
#include <shlobj.h>
#endif
#include <shellapi.h>
#ifdef __cplusplus
extern "C"{
#endif
//------------------------------------------------------------------------
// undefine the macros defined in the shlobj.h file in order to avoid
// warnings because of multiple defines
//------------------------------------------------------------------------
#ifdef CommandLineToArgvW
#undef CommandLineToArgvW
#endif
#ifdef SHBrowseForFolderW
#undef SHBrowseForFolderW
#endif
#ifdef SHGetPathFromIDListW
#undef SHGetPathFromIDListW
#endif
#ifdef ShellExecuteExW
#undef ShellExecuteExW
#endif
//------------------------------------------------------------------------
// set the compiler directives for the function pointer we declare below
// if we build sal or sal will be used as static library we define extern
// else sal exports the function pointers from a dll and we use __declspec
//------------------------------------------------------------------------
#define SHELL9X_API extern
//------------------------------------------------------------------------
// declare function pointers to the appropriate shell functions
//------------------------------------------------------------------------
SHELL9X_API LPWSTR * ( WINAPI * lpfnCommandLineToArgvW ) ( LPCWSTR lpCmdLine, int *pNumArgs );
SHELL9X_API LPITEMIDLIST ( WINAPI * lpfnSHBrowseForFolderW ) ( LPBROWSEINFOW lpbi );
SHELL9X_API BOOL ( WINAPI * lpfnSHGetPathFromIDListW ) ( LPCITEMIDLIST pidl, LPWSTR pszPath );
SHELL9X_API BOOL ( WINAPI * lpfnShellExecuteExW ) ( LPSHELLEXECUTEINFOW lpExecInfo );
//------------------------------------------------------------------------
// redefine the above undefined macros so that the preprocessor replaces
// all occurrences of this macros with our function pointer
//------------------------------------------------------------------------
#define CommandLineToArgvW lpfnCommandLineToArgvW
#define SHBrowseForFolderW lpfnSHBrowseForFolderW
#define SHGetPathFromIDListW lpfnSHGetPathFromIDListW
#define ShellExecuteExW lpfnShellExecuteExW
#ifdef __cplusplus
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#pragma once
#ifndef _WINDOWS_
#include <windows.h>
#endif
#ifdef __cplusplus
extern "C"{
#endif
//------------------------------------------------------------------------
// undefine the macros defined in the winuser.h file in order to avoid
// warnings because of multiple defines
//------------------------------------------------------------------------
#ifdef SendMessageW
#undef SendMessageW
#endif
#ifdef CreateWindowExW
#undef CreateWindowExW
#endif
#ifdef RegisterClassExW
#undef RegisterClassExW
#endif
#ifdef UnregisterClassW
#undef UnregisterClassW
#endif
#ifdef RegisterClipboardFormatW
#undef RegisterClipboardFormatW
#endif
#ifdef GetClipboardFormatNameW
#undef GetClipboardFormatNameW
#endif
#ifdef SetWindowTextW
#undef SetWindowTextW
#endif
#ifdef GetWindowTextW
#undef GetWindowTextW
#endif
#ifdef InsertMenuItemW
#undef InsertMenuItemW
#endif
#ifndef DrawTextW
#undef DrawTextW
#endif
//------------------------------------------------------------------------
// defines
//------------------------------------------------------------------------
#define USER9X_API extern
//------------------------------------------------------------------------
// declare function pointers to the appropriate user32 functions
//------------------------------------------------------------------------
USER9X_API LRESULT ( WINAPI * lpfnSendMessageW) (
HWND hWnd, // handle to the destination window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
USER9X_API HWND ( WINAPI * lpfnCreateWindowExW ) (
DWORD dwExStyle, // extended window style
LPCWSTR lpClassName, // registered class name
LPCWSTR lpWindowName, // window name
DWORD dwStyle, // window style
int x, // horizontal position of window
int y, // vertical position of window
int nWidth, // window width
int nHeight, // window height
HWND hWndParent, // handle to parent or owner window
HMENU hMenu, // menu handle or child identifier
HINSTANCE hInstance, // handle to application instance
LPVOID lpParam // window-creation data
);
USER9X_API ATOM ( WINAPI * lpfnRegisterClassExW ) (
CONST WNDCLASSEXW* lpwcx // class data
);
USER9X_API BOOL ( WINAPI * lpfnUnregisterClassW ) (
LPCWSTR lpClassName, // class name
HINSTANCE hInstance // handle to application instance
);
USER9X_API UINT (WINAPI * lpfnRegisterClipboardFormatW) (
LPCWSTR lpszFormat // name of new format
);
USER9X_API int ( WINAPI * lpfnGetClipboardFormatNameW ) (
UINT format, // clipboard format to retrieve
LPWSTR lpszFormatName, // format name
int cchMaxCount // length of format name buffer
);
USER9X_API BOOL ( WINAPI * lpfnSetWindowTextW ) (
HWND hWnd,
LPCWSTR lpString
);
USER9X_API int ( WINAPI * lpfnGetWindowTextW ) (
HWND hWnd, // handle to the window or control
LPWSTR lpString, // text buffer
int nMaxCount // length of text buffer
);
USER9X_API BOOL ( WINAPI * lpfnInsertMenuItemW ) (
HMENU hMenu, // handle to menu
UINT uItem, // identifier or position
BOOL fByPosition, // meaning of uItem
LPCMENUITEMINFOW lpmii // menu item information
);
USER9X_API int ( WINAPI * lpfnDrawTextW ) (
HDC hDC, // handle to DC
LPCWSTR lpString, // text to draw
int nCount, // text length
LPRECT lpRect, // formatting dimensions
UINT uFormat // text-drawing options
);
USER9X_API BOOL ( WINAPI * lpfnDrawStateW ) (
HDC hdc, // handle to device context
HBRUSH hbr, // handle to brush
DRAWSTATEPROC lpOutputFunc, // callback function
LPARAM lData, // image information
WPARAM wData, // more image information
int x, // horizontal location
int y, // vertical location
int cx, // image width
int cy, // image height
UINT fuFlags // image type and state
);
//------------------------------------------------------------------------
// redefine the above undefined macros so that the preprocessor replaces
// all occurrences of this macros with our function pointer
//------------------------------------------------------------------------
#define SendMessageW lpfnSendMessageW
#define CreateWindowExW lpfnCreateWindowExW
#define RegisterClassExW lpfnRegisterClassExW
#define UnregisterClassW lpfnUnregisterClassW
#define RegisterClipboardFormatW lpfnRegisterClipboardFormatW
#define GetClipboardFormatNameW lpfnGetClipboardFormatNameW
#define SetWindowTextW lpfnSetWindowTextW
#define GetWindowTextW lpfnGetWindowTextW
#define InsertMenuItemW lpfnInsertMenuItemW
#define DrawTextW lpfnDrawTextW
#define DrawStateW lpfnDrawStateW
#ifdef __cplusplus
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -233,44 +233,6 @@ DEF10NAME=$(SHL1TARGET)
DEF10EXPORTFILE=export.exp
.ENDIF
.IF "$(TESTAPP)" == "salstattest"
CFLAGS+= -DUSE_SAL_STATIC
OBJFILES+=$(OBJ)$/salstattest.obj
APP10TARGET=salstattest
APP10OBJS=$(OBJ)$/salstattest.obj
APP10STDLIBS=\
$(LB)$/asal.lib\
$(SHELL32LIB)\
$(USER32LIB)\
$(COMDLG32LIB)\
$(ADVAPI32LIB)
APP10DEPN=$(LB)$/asal.lib
.ENDIF # salstattest
.IF "$(TESTAPP)" == "saldyntest"
OBJFILES+=$(OBJ)$/saldyntest.obj
APP10TARGET=saldyntest
APP10OBJS=$(OBJ)$/saldyntest.obj
APP10STDLIBS=\
$(LB)$/isal.lib\
$(SHELL32LIB)\
$(USER32LIB)\
$(COMDLG32LIB)\
$(ADVAPI32LIB)
APP10DEPN=$(LB)$/isal.lib
.ENDIF # salstattest
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <systools/win32/shell9x.h>
#include <systools/win32/kernel9x.h>
int _cdecl main( int argc, char * argv[] )
{
BROWSEINFOW bi;
wchar_t buff[260];
DWORD dwRet;
bi.hwndOwner = NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = buff;
bi.lpszTitle = L"Test";
bi.ulFlags = 0;
bi.lpfn = NULL;
bi.lParam = 0;
SHBrowseForFolderW( &bi );
dwRet = GetCanonicalPathW( L"c:\\", buff, 260 );
return(0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <stdio.h>
#include <systools/win32/shell9x.h>
#include <systools/win32/kernel9x.h>
int _cdecl main( int argc, char * argv[] )
{
BROWSEINFOW bi;
wchar_t buff[260];
DWORD dwRet;
bi.hwndOwner = NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = buff;
bi.lpszTitle = L"Test";
bi.ulFlags = 0;
bi.lpfn = NULL;
bi.lParam = 0;
SHBrowseForFolderW( &bi );
dwRet = GetLongPathNameW( L"c:\\", buff, 260 );
return(0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment