Sync to Wine-0_9_3:
[reactos.git] / reactos / lib / shell32 / shell32_main.h
index 996b578..3d8be25 100644 (file)
@@ -121,9 +121,9 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
        };
 
 #define KeyStateToDropEffect(kst)\
-       (((kst) & MK_CONTROL) ?\
-       (((kst) & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY):\
-       DROPEFFECT_MOVE)
+    ((((kst)&(MK_CONTROL|MK_SHIFT))==(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_LINK :\
+    (((kst)&(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_COPY :\
+    DROPEFFECT_MOVE))
 
 HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
 HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
@@ -179,7 +179,7 @@ inline static BOOL SHELL_OsIsUnicode(void)
        };
 inline static void __SHCloneStrA(char ** target,const char * source)
 {
-       *target = SHAlloc(strlen(source)+1);
+       *target = (char*)SHAlloc(strlen(source)+1);
        strcpy(*target, source);
 }
 
@@ -192,7 +192,7 @@ inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source)
 
 inline static void __SHCloneStrW(WCHAR ** target, const WCHAR * source)
 {
-       *target = SHAlloc( (strlenW(source)+1) * sizeof(WCHAR) );
+       *target = (WCHAR*)SHAlloc( (strlenW(source)+1) * sizeof(WCHAR) );
        strcpyW(*target, source);
 }
 
@@ -210,10 +210,10 @@ inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source)
 #define HINSTANCE_32(h16)      ((HINSTANCE)(ULONG_PTR)(h16))
 #define HINSTANCE_16(h32)      (LOWORD(h32))
 
-typedef UINT (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
+typedef UINT_PTR (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
                            LPSHELLEXECUTEINFOW sei, LPSHELLEXECUTEINFOW sei_out);
 
-BOOL WINAPI ShellExecuteExW32(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc);
+BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc);
 
 UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
                           LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args);
@@ -227,4 +227,7 @@ extern const GUID CLSID_UnixDosFolder;
 /* Default shell folder value registration */
 HRESULT SHELL_RegisterShellFolders(void);
 
+/* Detect Shell Links */
+BOOL SHELL_IsShortcut(LPCITEMIDLIST);
+
 #endif