Commit 6d17c610 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Small fixes.

parent 6afc68aa
......@@ -77,7 +77,7 @@ init Shell32LibMain
69 stub SHGetNetResource
70 stdcall SHCreateDefClassObject(long long long long long)SHCreateDefClassObject
71 stdcall Shell_GetImageList(ptr ptr) Shell_GetImageList
72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexA # ASCII!!!
72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexAW
73 stdcall SHShellFolderView_Message(long long long) SHShellFolderView_Message
74 stub SHCreateStdEnumFmtEtc
75 stdcall PathYetAnotherMakeUniqueName(ptr ptr) PathYetAnotherMakeUniqueNameA
......@@ -304,7 +304,7 @@ init Shell32LibMain
295 stub ShellHookProc # exported by name
296 stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIcon
297 stdcall Shell_NotifyIconA(long ptr) Shell_NotifyIconA
298 stub Shell_NotifyIconW # exported by name
298 stdcall Shell_NotifyIconW(long ptr) Shell_NotifyIconW
299 stub Shl1632_ThunkData32
300 stub Shl3216_ThunkData32
301 stub StrChrA # proper ordinal unknown
......
......@@ -816,7 +816,8 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
}
SIC_Initialize();
SYSTRAY_Init();
break;
case DLL_THREAD_ATTACH:
......
......@@ -138,4 +138,7 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
(((kst) & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY):\
DROPEFFECT_MOVE)
/* Systray */
BOOL SYSTRAY_Init(void);
#endif
......@@ -1454,3 +1454,14 @@ BOOL WINAPI Win32DeleteFile(LPSTR fName)
return TRUE;
}
/*
LPSTR WINAPI StrCpyNA(LPSTR psz1, LPCSTR psz2, int cchMax)
{
return lstrcpynA(psz1, psz2, cchMax);
}
LPWSTR WINAPI StrCpyNW(LPWSTR psz1, LPCWSTR psz2, int cchMax)
{
return lstrcpynW(psz1, psz2, cchMax);
}
*/
......@@ -651,9 +651,11 @@ VOID WINAPI PathUnquoteSpacesW(LPWSTR str)
return;
}
VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
{ if(VERSION_OsIsUnicode())
{
if(VERSION_OsIsUnicode())
PathUnquoteSpacesW(str);
PathUnquoteSpacesA(str);
else
PathUnquoteSpacesA(str);
}
......@@ -890,7 +892,7 @@ BOOL WINAPI SHGetSpecialFolderPathA (
case CSIDL_PROGRAMS:
hRootKey = HKEY_CURRENT_USER;
strcpy(szValueName, "Programs");
strcpy(szDefaultPath, "StatrMenu\\Programs");
strcpy(szDefaultPath, "StartMenu\\Programs");
break;
case CSIDL_COMMON_PROGRAMS:
......@@ -1012,31 +1014,22 @@ BOOL WINAPI SHGetSpecialFolderPathAW (
*
*/
LPSTR WINAPI PathRemoveBackslashA(
LPSTR lpPath
)
LPSTR WINAPI PathRemoveBackslashA( LPSTR lpPath )
{
LPSTR temp = lpPath;
LPSTR prev = lpPath;
LPSTR p = lpPath;
while (*temp)
{
prev = temp++;
}
if ( *prev == (CHAR)'\\')
{
*prev = (CHAR)'\0';
}
return prev;
while (*lpPath) p = lpPath++;
if ( *p == (CHAR)'\\') *p = (CHAR)'\0';
return p;
}
LPWSTR WINAPI PathRemoveBackslashW(
LPWSTR lpPath
)
LPWSTR WINAPI PathRemoveBackslashW( LPWSTR lpPath )
{
FIXME("(%p),stub!\n", lpPath);
return lpPath;
LPWSTR p = lpPath;
while (*lpPath); p = lpPath++;
if ( *p == (WCHAR)'\\') *p = (WCHAR)'\0';
return p;
}
/*
......
/*
* see www.geocities.com/SiliconValley/4942/filemenu.html
*/
#include <assert.h>
#include <string.h>
#include "wine/obj_base.h"
......@@ -61,7 +60,11 @@ LPFMINFO FM_GetMenuInfo(HMENU hmenu)
menudata = (LPFMINFO)MenuInfo.dwMenuData;
assert ((menudata != 0) && (MenuInfo.cbSize == sizeof(MENUINFO)));
if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO)))
{
ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize);
return 0;
}
return menudata;
......@@ -122,7 +125,11 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl)
menudata = (LPFMINFO)MenuInfo.dwMenuData;
assert ((menudata != 0) && (MenuInfo.cbSize == sizeof(MENUINFO)));
if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO)))
{
ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize);
return 0;
}
if (menudata->bInitialized)
return 0;
......@@ -334,7 +341,12 @@ BOOL WINAPI FileMenu_AppendItemA(
return FALSE;
menudata = (LPFMINFO)MenuInfo.dwMenuData;
assert ((menudata != 0) && (MenuInfo.cbSize == sizeof(MENUINFO)));
if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO)))
{
ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize);
return 0;
}
menudata->bFixedItems = TRUE;
SetMenuInfo(hMenu, &MenuInfo);
......
......@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include "heap.h"
#include "shellapi.h"
#include "shell32_main.h"
#include "windows.h"
......@@ -421,6 +422,23 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
}
/*************************************************************************
* Shell_NotifyIconA [SHELL32.297]
*/
BOOL WINAPI Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW pnid )
{
BOOL ret;
PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA));
memcpy(p, pnid, sizeof(NOTIFYICONDATAA));
if (*(pnid->szTip))
lstrcpynWtoA (p->szTip, pnid->szTip, 64 );
ret = Shell_NotifyIconA(dwMessage, p );
HeapFree(GetProcessHeap(),0,p);
return ret;
}
/*************************************************************************
* Shell_NotifyIcon [SHELL32.296]
*/
BOOL WINAPI Shell_NotifyIcon(DWORD dwMessage, PNOTIFYICONDATAA pnid)
......
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