clipboard.c \
control.c \
cpanelfolder.c \
+ dde.c \
dataobject.c \
debughlp.c \
dialogs.c \
{
const IAutoCompleteVtbl *lpVtbl;
const IAutoComplete2Vtbl *lpvtblAutoComplete2;
- DWORD ref;
+ LONG ref;
BOOL enabled;
HWND hwndEdit;
HWND hwndListBox;
#define MAX_EXTENSION_LENGTH 20
-BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot)
+BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot)
{
HKEY hkey;
WCHAR szTemp[MAX_EXTENSION_LENGTH + 2];
return TRUE;
}
-BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot)
+BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot)
{
HKEY hkey;
char szTemp[MAX_EXTENSION_LENGTH + 2];
char sTemp[MAX_PATH];
char sNum[5];
- if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len))
+ if (!RegQueryValueExA(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len))
{
if (dwType == REG_EXPAND_SZ)
{
szDest[0] = 0;
if (HCR_RegOpenClassIDKey(riid, &hkey))
{
- if (!RegQueryValueExA(hkey,"",0,NULL,szDest,&len))
+ if (!RegQueryValueExA(hkey,"",0,NULL,(LPBYTE)szDest,&len))
{
ret = TRUE;
}
(LPVOID*)&psfFolder);
if (SUCCEEDED(hr)) {
hr = IShellFolder_GetAttributesOf(psfFolder, 0, NULL, pdwAttributes);
+ IShellFolder_Release(psfFolder);
}
+ IShellFolder_Release(psfDesktop);
}
- IShellFolder_Release(psfFolder);
- IShellFolder_Release(psfDesktop);
if (FAILED(hr)) return FALSE;
} else {
lResult = RegQueryValueExW(hSFKey, wszAttributes, 0, NULL, (LPBYTE)&dwTemp, &dwLen);
typedef struct {
const IShellFolder2Vtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
const IPersistFolder2Vtbl *lpVtblPersistFolder2;
const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW;
const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA;
{
/* IUnknown fields */
const IEnumFORMATETCVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
/* IEnumFORMATETC fields */
UINT posFmt;
UINT countFmt;
{
/* IUnknown fields */
const IDataObjectVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
/* IDataObject fields */
LPITEMIDLIST pidl;
--- /dev/null
+/*
+ * Shell DDE Handling
+ *
+ * Copyright 2004 Robert Shearman
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "ddeml.h"
+#include "shellapi.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shell);
+
+/* String handles */
+static HSZ hszProgmanTopic;
+static HSZ hszProgmanService;
+static HSZ hszAsterisk;
+static HSZ hszShell;
+static HSZ hszAppProperties;
+static HSZ hszFolders;
+/* DDE Instance ID */
+static DWORD dwDDEInst;
+
+
+static inline BOOL Dde_OnConnect(HSZ hszTopic, HSZ hszService)
+{
+ if ((hszTopic == hszProgmanTopic) && (hszService == hszProgmanService))
+ return TRUE;
+ if ((hszTopic == hszProgmanTopic) && (hszService == hszAppProperties))
+ return TRUE;
+ if ((hszTopic == hszShell) && (hszService == hszFolders))
+ return TRUE;
+ if ((hszTopic == hszShell) && (hszService == hszAppProperties))
+ return TRUE;
+ return FALSE;
+}
+
+static inline void Dde_OnConnectConfirm(HCONV hconv, HSZ hszTopic, HSZ hszService)
+{
+ FIXME("stub\n");
+}
+
+static inline BOOL Dde_OnWildConnect(HSZ hszTopic, HSZ hszService)
+{
+ FIXME("stub\n");
+ return FALSE;
+}
+
+static inline HDDEDATA Dde_OnRequest(UINT uFmt, HCONV hconv, HSZ hszTopic,
+ HSZ hszItem)
+{
+ FIXME("stub\n");
+ return NULL;
+}
+
+static inline DWORD Dde_OnExecute(HCONV hconv, HSZ hszTopic, HDDEDATA hdata)
+{
+ BYTE * pszCommand;
+
+ pszCommand = DdeAccessData(hdata, NULL);
+ if (!pszCommand)
+ return DDE_FNOTPROCESSED;
+
+ FIXME("stub: %s\n", pszCommand);
+
+ DdeUnaccessData(hdata);
+
+ return DDE_FNOTPROCESSED;
+}
+
+static inline void Dde_OnDisconnect(HCONV hconv)
+{
+ FIXME("stub\n");
+}
+
+static HDDEDATA CALLBACK DdeCallback(
+ UINT uType,
+ UINT uFmt,
+ HCONV hconv,
+ HSZ hsz1,
+ HSZ hsz2,
+ HDDEDATA hdata,
+ ULONG_PTR dwData1,
+ ULONG_PTR dwData2)
+{
+ switch (uType)
+ {
+ case XTYP_CONNECT:
+ return (HDDEDATA)Dde_OnConnect(hsz1, hsz2);
+ case XTYP_CONNECT_CONFIRM:
+ Dde_OnConnectConfirm(hconv, hsz1, hsz2);
+ return NULL;
+ case XTYP_WILDCONNECT:
+ return (HDDEDATA)Dde_OnWildConnect(hsz1, hsz2);
+ case XTYP_REQUEST:
+ return (HDDEDATA)Dde_OnRequest(uFmt, hconv, hsz1, hsz2);
+ case XTYP_EXECUTE:
+ return (HDDEDATA)Dde_OnExecute(hconv, hsz1, hdata);
+ case XTYP_DISCONNECT:
+ Dde_OnDisconnect(hconv);
+ return NULL;
+ default:
+ return NULL;
+ }
+}
+
+/*************************************************************************
+ * ShellDDEInit (SHELL32.@)
+ *
+ * Registers the Shell DDE services with the system so that applications
+ * can use them.
+ *
+ * PARAMS
+ * bInit [I] TRUE to initialize the services, FALSE to uninitalize.
+ *
+ * RETURNS
+ * Nothing.
+ */
+void WINAPI ShellDDEInit(BOOL bInit)
+{
+ TRACE("bInit = %s\n", bInit ? "TRUE" : "FALSE");
+
+ if (bInit)
+ {
+ static const WCHAR wszProgman[] = {'P','r','o','g','m','a','n',0};
+ static const WCHAR wszAsterisk[] = {'*',0};
+ static const WCHAR wszShell[] = {'S','h','e','l','l',0};
+ static const WCHAR wszAppProperties[] =
+ {'A','p','p','P','r','o','p','e','r','t','i','e','s',0};
+ static const WCHAR wszFolders[] = {'F','o','l','d','e','r','s',0};
+
+ DdeInitializeW(&dwDDEInst, DdeCallback, CBF_FAIL_ADVISES | CBF_FAIL_POKES, 0);
+
+ hszProgmanTopic = DdeCreateStringHandleW(dwDDEInst, wszProgman, CP_WINUNICODE);
+ hszProgmanService = DdeCreateStringHandleW(dwDDEInst, wszProgman, CP_WINUNICODE);
+ hszAsterisk = DdeCreateStringHandleW(dwDDEInst, wszAsterisk, CP_WINUNICODE);
+ hszShell = DdeCreateStringHandleW(dwDDEInst, wszShell, CP_WINUNICODE);
+ hszAppProperties = DdeCreateStringHandleW(dwDDEInst, wszAppProperties, CP_WINUNICODE);
+ hszFolders = DdeCreateStringHandleW(dwDDEInst, wszFolders, CP_WINUNICODE);
+
+ DdeNameService(dwDDEInst, hszFolders, 0, DNS_REGISTER);
+ DdeNameService(dwDDEInst, hszProgmanService, 0, DNS_REGISTER);
+ DdeNameService(dwDDEInst, hszShell, 0, DNS_REGISTER);
+ }
+ else
+ {
+ /* unregister all services */
+ DdeNameService(dwDDEInst, 0, 0, DNS_UNREGISTER);
+
+ DdeFreeStringHandle(dwDDEInst, hszFolders);
+ DdeFreeStringHandle(dwDDEInst, hszAppProperties);
+ DdeFreeStringHandle(dwDDEInst, hszShell);
+ DdeFreeStringHandle(dwDDEInst, hszAsterisk);
+ DdeFreeStringHandle(dwDDEInst, hszProgmanService);
+ DdeFreeStringHandle(dwDDEInst, hszProgmanTopic);
+
+ DdeUninitialize(dwDDEInst);
+ }
+}
if (icList > 0)
{
pszList = HeapAlloc( GetProcessHeap(), 0, icList) ;
- if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, pszList, &icList))
+ if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, (LPBYTE)pszList, &icList))
MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ;
}
else
pszCmd = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ;
else
pszCmd = HeapAlloc(GetProcessHeap(), 0, icCmd) ;
- if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, pszCmd, &icCmd))
+ if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, (LPBYTE)pszCmd, &icCmd))
MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ;
if (NULL != pszLatest)
memmove (&pszList[1], pszList, Nix) ;
pszList[0] = cMatch ;
szIndex[0] = cMatch ;
- RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ;
+ RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ;
}
}
memmove (&pszList[1], pszList, icList - 1) ;
pszList[0] = cMatch ;
szIndex[0] = cMatch ;
- RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ;
+ RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ;
}
- RegSetValueExA (hkey, "MRUList", 0, REG_SZ, pszList, strlen (pszList) + 1) ;
+ RegSetValueExA (hkey, "MRUList", 0, REG_SZ, (LPBYTE)pszList, strlen (pszList) + 1) ;
HeapFree( GetProcessHeap(), 0, pszCmd) ;
HeapFree( GetProcessHeap(), 0, pszList) ;
typedef struct {
const IDropTargetHelperVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
} IDropTargetHelperImpl;
static const IDropTargetHelperVtbl vt_IDropTargetHelper;
typedef struct
{
const IEnumIDListVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
LPENUMLIST mpFirst;
LPENUMLIST mpLast;
LPENUMLIST mpCurrent;
typedef struct
{
const IExtractIconWVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
const IPersistFileVtbl *lpvtblPersistFile;
const IExtractIconAVtbl *lpvtblExtractIconA;
LPITEMIDLIST pidl;
case SHGDFIL_FINDDATA:
pfd = dest;
- if (_ILIsDrive(pidl))
+ if (_ILIsDrive(pidl) || _ILIsSpecialFolder(pidl))
return E_INVALIDARG;
if (len < sizeof(WIN32_FIND_DATAA))
*
*************************************************************************
*/
-LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size)
+LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
{
LPITEMIDLIST pidlOut = NULL;
* - two bytes are the NULL PIDL terminator
* Sets type of the returned PIDL to type.
*/
-LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size);
+LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size);
/* Creates a PIDL with guid format and type type, which must be one of PT_GUID,
* PT_SHELLEXT, or PT_YAGUID.
#include <stdarg.h>
#include <string.h>
+#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "shlguid.h"
#include "shell32_main.h"
+#include "shfldr.h"
#include "wine/debug.h"
static HRESULT register_coclasses(struct regsvr_coclass const *list);
static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
+struct regsvr_namespace
+{
+ CLSID const *clsid; /* CLSID of the namespace extension. NULL for end of list */
+ LPCWSTR parent; /* Mount point (MyComputer, Desktop, ..). */
+ LPCWSTR value; /* Display name of the extension. */
+};
+
+static HRESULT register_namespace_extensions(struct regsvr_namespace const *list);
+static HRESULT unregister_namespace_extensions(struct regsvr_namespace const *list);
+
/***********************************************************************
* static string constants
*/
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
}
+/**********************************************************************
+ * register_namespace_extensions
+ */
+static WCHAR *get_namespace_key(struct regsvr_namespace const *list) {
+ static const WCHAR wszExplorerKey[] = {
+ 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
+ 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
+ 'E','x','p','l','o','r','e','r','\\',0 };
+ static const WCHAR wszNamespace[] = { '\\','N','a','m','e','s','p','a','c','e','\\',0 };
+ WCHAR *pwszKey, *pwszCLSID;
+
+ pwszKey = HeapAlloc(GetProcessHeap(), 0, sizeof(wszExplorerKey)+sizeof(wszNamespace)+
+ sizeof(WCHAR)*(lstrlenW(list->parent)+CHARS_IN_GUID));
+ if (!pwszKey)
+ return NULL;
+
+ lstrcpyW(pwszKey, wszExplorerKey);
+ lstrcatW(pwszKey, list->parent);
+ lstrcatW(pwszKey, wszNamespace);
+ if (FAILED(StringFromCLSID(list->clsid, &pwszCLSID))) {
+ HeapFree(GetProcessHeap(), 0, pwszKey);
+ return NULL;
+ }
+ lstrcatW(pwszKey, pwszCLSID);
+ CoTaskMemFree(pwszCLSID);
+
+ return pwszKey;
+}
+
+static HRESULT register_namespace_extensions(struct regsvr_namespace const *list) {
+ WCHAR *pwszKey;
+ HKEY hKey;
+
+ for (; list->clsid; list++) {
+ pwszKey = get_namespace_key(list);
+
+ /* Create the key and set the value. */
+ if (pwszKey && ERROR_SUCCESS ==
+ RegCreateKeyExW(HKEY_LOCAL_MACHINE, pwszKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL))
+ {
+ RegSetValueExW(hKey, NULL, 0, REG_SZ, (LPBYTE)list->value, sizeof(WCHAR)*(lstrlenW(list->value)+1));
+ RegCloseKey(hKey);
+ }
+
+ HeapFree(GetProcessHeap(), 0, pwszKey);
+ }
+ return S_OK;
+}
+
+static HRESULT unregister_namespace_extensions(struct regsvr_namespace const *list) {
+ WCHAR *pwszKey;
+
+ for (; list->clsid; list++) {
+ pwszKey = get_namespace_key(list);
+ RegDeleteKeyW(HKEY_LOCAL_MACHINE, pwszKey);
+ HeapFree(GetProcessHeap(), 0, pwszKey);
+ }
+ return S_OK;
+}
+
/***********************************************************************
* regsvr_key_guid
*/
{ NULL } /* list terminator */
};
+/***********************************************************************
+ * namespace extensions list
+ */
+static const WCHAR wszDesktop[] = { 'D','e','s','k','t','o','p',0 };
+static const WCHAR wszSlash[] = { '/', 0 };
+
+static struct regsvr_namespace const namespace_extensions_list[] = {
+ { NULL }
+};
+
/***********************************************************************
* DllRegisterServer (SHELL32.@)
*/
hr = register_interfaces(interface_list);
if (SUCCEEDED(hr))
hr = SHELL_RegisterShellFolders();
+ if (SUCCEEDED(hr))
+ hr = register_namespace_extensions(namespace_extensions_list);
return hr;
}
hr = unregister_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = unregister_interfaces(interface_list);
+ if (SUCCEEDED(hr))
+ hr = unregister_namespace_extensions(namespace_extensions_list);
return hr;
}
202 stub SHLocalReAlloc
203 stub AddCommasW
204 stub ShortSizeFormatW
- 205 stub Printer_LoadIconsW
+ 205 stdcall Printer_LoadIconsW(wstr ptr ptr)
206 stub Link_AddExtraDataSection
207 stub Link_ReadExtraDataSection
208 stub Link_RemoveExtraDataSection
210 stub LargeIntegerToString
211 stub Printers_GetPidl
212 stub Printers_AddPrinterPropPages
- 213 stub Printers_RegisterWindowW
- 214 stub Printers_UnregisterWindow
+ 213 stdcall Printers_RegisterWindowW(wstr long ptr ptr)
+ 214 stdcall Printers_UnregisterWindow(long long)
215 stdcall -noname SHStartNetConnectionDialog(long str long)
243 stdcall @(long long) shell32_243
244 stdcall -noname SHInitRestricted(ptr ptr)
<file>control.c</file>
<file>cpanelfolder.c</file>
<file>dataobject.c</file>
+ <file>dde.c</file>
<file>debughlp.c</file>
<file>dialogs.c</file>
<file>dragdrophelper.c</file>
PUSHBUTTON "&Procurar...", 12288, 170, 63, 50, 14, WS_TABSTOP
}
-/*
- special folders
-*/
STRINGTABLE DISCARDABLE
{
+ /* columns in the shellview */
+ IDS_SHV_COLUMN1 "Arquivo"
+ IDS_SHV_COLUMN2 "Tamanho"
+ IDS_SHV_COLUMN3 "Tipo"
+ IDS_SHV_COLUMN4 "Modificado"
+ IDS_SHV_COLUMN5 "Atributos"
+ IDS_SHV_COLUMN6 "Tamanho"
+ IDS_SHV_COLUMN7 "Disponível"
+ IDS_SHV_COLUMN8 "Nome"
+ IDS_SHV_COLUMN9 "Comentários"
+ IDS_SHV_COLUMN10 "Dono"
+ IDS_SHV_COLUMN11 "Grupo"
+
+ /* special folders */
IDS_DESKTOP "Área de trabalho"
IDS_MYCOMPUTER "Meu computador"
-}
-/*
- context menus
-*/
-STRINGTABLE DISCARDABLE
-{
+ /* context menus */
IDS_VIEW_LARGE "Ícones &grandes"
IDS_VIEW_SMALL "Ícones &pequenos"
IDS_VIEW_LIST "&Lista"
IDS_VIEW_DETAILS "&Detalhes"
IDS_SELECT "Selecionar"
IDS_OPEN "Abrir"
-}
-STRINGTABLE DISCARDABLE
-{
IDS_CREATEFOLDER_DENIED "Não pode criar nova pasta: Permissão negada."
IDS_CREATEFOLDER_CAPTION "Erro durante a criação da nova pasta"
IDS_DELETEITEM_CAPTION "Confirmar exclusão de arquivo"
IDS_DELETEMULTIPLE_TEXT "Você tem certeza que deseja excluir estes %1 itens?"
IDS_OVERWRITEFILE_TEXT "Sobreescrever arquivo %1?"
IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescrever arquivo"
-}
-/* colunas no shellview */
-STRINGTABLE
-BEGIN
- IDS_SHV_COLUMN1 "Arquivo"
- IDS_SHV_COLUMN2 "Tamanho"
- IDS_SHV_COLUMN3 "Tipo"
- IDS_SHV_COLUMN4 "Modificado"
- IDS_SHV_COLUMN5 "Atributos"
- IDS_SHV_COLUMN6 "Tamanho"
- IDS_SHV_COLUMN7 "Disponível"
- IDS_SHV_COLUMN8 "Nome"
- IDS_SHV_COLUMN9 "Comentários"
-END
+ /* message box strings */
+ IDS_RESTART_TITLE "Reiniciar"
+ IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?"
+ IDS_SHUTDOWN_TITLE "Desligar"
+ IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no ReactOS?"
-/* message box strings */
-STRINGTABLE DISCARDABLE
-{
- IDS_RESTART_TITLE "Reiniciar"
- IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?"
- IDS_SHUTDOWN_TITLE "Desligar"
- IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no ReactOS?"
-}
-
-/* shell folder path default values - */
-STRINGTABLE DISCARDABLE
-{
+ /* shell folder path default values */
IDS_PROGRAMS "Menu Iniciar\\Programas"
IDS_PERSONAL "Meus Documentos"
IDS_FAVORITES "Favoritos"
return NULL;
}
+/*************************************************************************
+ * Printer_LoadIconsW [SHELL32.205]
+ */
+VOID WINAPI Printer_LoadIconsW(LPCWSTR wsPrinterName, HICON * pLargeIcon, HICON * pSmallIcon)
+{
+ INT iconindex=IDI_SHELL_PRINTER;
+
+ TRACE("(%s, %p, %p)\n", debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon);
+
+ /* We should check if wsPrinterName is
+ 1. the Default Printer or not
+ 2. connected or not
+ 3. a Local Printer or a Network-Printer
+ and use different Icons
+ */
+ if((wsPrinterName != NULL) && (wsPrinterName[0] != 0))
+ {
+ FIXME("(select Icon by PrinterName %s not implemented)\n", debugstr_w(wsPrinterName));
+ }
+
+ if(pLargeIcon != NULL)
+ *pLargeIcon = LoadImageW(shell32_hInstance,
+ (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON,
+ 0, 0, LR_DEFAULTCOLOR|LR_DEFAULTSIZE);
+
+ if(pSmallIcon != NULL)
+ *pSmallIcon = LoadImageW(shell32_hInstance,
+ (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON,
+ 16, 16, LR_DEFAULTCOLOR);
+}
+
+/*************************************************************************
+ * Printers_RegisterWindowW [SHELL32.213]
+ * used by "printui.dll":
+ * find the Window of the given Type for the specific Printer and
+ * return the already existent hwnd or open a new window
+ */
+BOOL WINAPI Printers_RegisterWindowW(LPCWSTR wsPrinter, DWORD dwType,
+ HANDLE * phClassPidl, HWND * phwnd)
+{
+ FIXME("(%s, %lx, %p (%p), %p (%p)) stub!\n", debugstr_w(wsPrinter), dwType,
+ phClassPidl, (phClassPidl != NULL) ? *(phClassPidl) : NULL,
+ phwnd, (phwnd != NULL) ? *(phwnd) : NULL);
+
+ return FALSE;
+}
+
+/*************************************************************************
+ * Printers_UnregisterWindow [SHELL32.214]
+ */
+VOID WINAPI Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd)
+{
+ FIXME("(%p, %p) stub!\n", hClassPidl, hwnd);
+}
+
+/*************************************************************************/
+
typedef struct
{
LPCWSTR szApp;
}
-/*************************************************************************
- * ShellDDEInit (SHELL32.@)
- */
-void WINAPI ShellDDEInit(BOOL start)
-{
- FIXME("stub: %d\n", start);
-}
-
/***********************************************************************
* DllGetVersion [SHELL32.@]
*
INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags );
/* Classes Root */
-BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot);
+BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot);
BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len );
BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr);
BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr);
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len);
/* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */
-BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);
+BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot);
BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len);
extern WCHAR swShell32Name[MAX_PATH];
+BOOL UNIXFS_is_rooted_at_desktop(void);
extern const GUID CLSID_UnixFolder;
extern const GUID CLSID_UnixDosFolder;
const IShellExtInitVtbl *lpvtblShellExtInit;
const IContextMenuVtbl *lpvtblContextMenu;
- DWORD ref;
+ LONG ref;
/* data structures according to the informations in the link */
LPITEMIDLIST pPidl;
static HRESULT Stream_LoadLocation( IStream *stm,
volume_info *volume, LPWSTR *path )
{
- unsigned char *p = NULL;
+ char *p = NULL;
LOCATION_INFO *loc;
HRESULT r;
int n;
typedef struct
{
const IClassFactoryVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
CLSID *rclsid;
LPFNCREATEINSTANCE lpfnCI;
const IID * riidInst;
- ULONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */
+ LONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */
} IDefClFImpl;
static const IClassFactoryVtbl dclfvt;
}
void SHELL_FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags);
+BOOL SHELL_FS_HideExtension(LPWSTR pwszPath);
typedef struct {
const IShellFolder2Vtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
CLSID *pclsid;
typedef struct {
const IUnknownVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
const IShellFolder2Vtbl *lpvtblShellFolder;
const IPersistFolder3Vtbl *lpvtblPersistFolder3;
const IDropTargetVtbl *lpvtblDropTarget;
LPCITEMIDLIST rpidl = NULL;
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
- if(SUCCEEDED(hr))
+ if(SUCCEEDED(hr)) {
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
+ IShellFolder_Release(psfParent);
+ }
}
else {
while (cidl > 0 && *apidl) {
static const WCHAR NeverShowExtW[] = { 'N','e','v','e','r','S','h','o','w','E',
'x','t',0 };
-static BOOL hide_extension(LPWSTR szPath)
+/******************************************************************************
+ * SHELL_FS_HideExtension [Internal]
+ *
+ * Query the registry if the filename extension of a given path should be
+ * hidden.
+ *
+ * PARAMS
+ * szPath [I] Relative or absolute path of a file
+ *
+ * RETURNS
+ * TRUE, if the filename's extension should be hidden
+ * FALSE, otherwise.
+ */
+BOOL SHELL_FS_HideExtension(LPWSTR szPath)
{
HKEY hKey;
DWORD dwData;
if (!(dwFlags & SHGDN_FORPARSING) &&
((dwFlags & SHGDN_INFOLDER) || (dwFlags == SHGDN_NORMAL))) {
MultiByteToWideChar(CP_ACP, 0, szPath, -1, pathW, MAX_PATH);
- if (hide_extension(pathW) && szPath[0] != '.')
+ if (SHELL_FS_HideExtension(pathW) && szPath[0] != '.')
PathRemoveExtensionA (szPath);
}
}
} else
lstrcpynW(szDest, lpName, MAX_PATH);
- if(!(dwFlags & SHGDN_FORPARSING) && hide_extension(szSrc)) {
+ if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) {
WCHAR *ext = PathFindExtensionW(szSrc);
if(*ext != '\0') {
INT len = strlenW(szDest);
typedef struct {
const IShellFolder2Vtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
const IPersistFolder2Vtbl *lpVtblPersistFolder2;
/* both paths are parsible from the desktop */
LPCITEMIDLIST rpidl = NULL;
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
- if(SUCCEEDED(hr))
+ if(SUCCEEDED(hr)) {
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
+ IShellFolder_Release(psfParent);
+ }
} else {
while (cidl > 0 && *apidl) {
pdump (*apidl);
/******************************************************************
* dde_cb
*
- * callback for the DDE connection. not really usefull
+ * callback for the DDE connection. not really useful
*/
static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hData,
IPersistFolder *pPF;
IPersistFolder3 *ppf;
- if (SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf))) {
+ if (_ILIsFolder(pidlChild) &&
+ SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf)))
+ {
PERSIST_FOLDER_TARGET_INFO ppfti;
char szDestPath[MAX_PATH];
typedef struct
{
const IFileSystemBindDataVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
WIN32_FIND_DATAW findFile;
} IFileSystemBindDataImpl;
typedef struct
{
const IShellViewVtbl* lpVtbl;
- DWORD ref;
+ LONG ref;
const IOleCommandTargetVtbl* lpvtblOleCommandTarget;
const IDropTargetVtbl* lpvtblDropTarget;
const IDropSourceVtbl* lpvtblDropSource;
{
const IContextMenu2Vtbl *lpVtbl;
IShellFolder* pSFParent;
- DWORD ref;
+ LONG ref;
BOOL bDesktop;
} BgCmImpl;
*/
typedef struct
{ const IContextMenu2Vtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
IShellFolder* pSFParent;
LPITEMIDLIST pidl; /* root pidl */
LPITEMIDLIST *apidl; /* array of child pidls */
LPITEMIDLIST * ppidl,
DWORD *attributes);
-LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path);
-LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path);
-
/*
string functions
*/
void WINAPI ExitWindowsDialog(HWND hwndOwner);
-BOOL WINAPI GetFileNameFromBrowse(
- HWND hwndOwner,
- LPSTR lpstrFile,
- DWORD nMaxFile,
- LPCSTR lpstrInitialDir,
- LPCSTR lpstrDefExt,
- LPCSTR lpstrFilter,
- LPCSTR lpstrTitle);
-
BOOL WINAPI SHFindComputer(
LPCITEMIDLIST pidlRoot,
LPCITEMIDLIST pidlSavedSearch);