On Sun, 5 Oct 2008 15:53:26 +0100, Pedro Alves <[EMAIL PROTECTED]> wrote:
> On Saturday 27 September 2008 07:05:40, Vincent Torri wrote:
> 
>> actually, SHGetShortcutTarget() is good, but SHCreateShortcutEx() is not

> 
>> declared and the returned type of SHCreateShortcut() is not correct.
> 
> Wow, somebody messed up in MSFT's headers:
>  
>  [SHCreateShortcut]
>  http://msdn.microsoft.com/en-us/library/aa932552.aspx
> 
> "This function is not prototyped correctly in Shellapi.h. It returns a
> BOOL instead of a DWORD. "
> 
>  [SHCreateShortcutEx]
>  http://msdn.microsoft.com/en-us/library/aa930644.aspx
> 
> " Return Value
> This function is not prototyped correctly in Shellapi.h. It returns a
BOOL
> instead of a DWORD.  TRUE indicates success. FALSE indicates failure. "
> 
> Let's do the same, in case some c++ app is taking the address of
> these functions into a function pointer returning DWORD...
> 
>> 
>> Also, it seems that SHCreateShortcutEx() exists only for "Windows CE
.NET
>>
>> 4.2 and later", so should the declaration be something like:
>> 
>> #if (_WIN32_WCE >= 0x420)
>> DWORD WINAPI SHCreateShortcutEx(LPTSTR,LPTSTR,LPTSTR,LPDWORD);
>> #endif
>> 
>> ?
> 
> Thanks.  I've checked in a patch to address these issues.
> 
> I noticed something else.  We're linking SHCreateShortcut from
> both ceshell.dll's and coredll.dll's import libs.  :-/.
> 
>  [~/cegcc/trunk/cegcc/src/w32api/libce]> grep CreateShort *
>  ceshell.def:SHCreateShortcut
>  coredll.def:SHCreateShortcut
>  coredll.def:SHCreateShortcutEx
> 
> Here, MSDN claims SHCreateShortcut comes from coredll.dll:
> http://msdn.microsoft.com/en-us/library/aa932552.aspx
> 
> What does LoadLibrary/GetProcAddress say to you folks,
> regarding SHCreateShortcut?

SHCreateShortcut is defined in both DLL ...
>From what I see by dissassembling, it's actually implemented in ceshell.dll
because in coredll I can see it only loads
ceshell.dll :


coredll.dll:

.text:1003EFBC                 EXPORT SHCreateShortcut
.text:1003EFBC SHCreateShortcut                        ; DATA XREF:
.pdata:1007F4D0o
.text:1003EFBC                 STMFD   SP!, {R4-R7,LR}
.text:1003EFC0                 MOV     R6, R1
.text:1003EFC4                 MOV     R7, R0
.text:1003EFC8                 LDR     R5, =g_ceshellHInstance
.text:1003EFCC                 MOV     R4, #0
.text:1003EFD0                 LDR     R0, [R5]
.text:1003EFD4                 CMP     R0, #0
.text:1003EFD8                 BNE     loc_1003EFF0
.text:1003EFDC                 LDR     R0, =aCeshell_dll
.text:1003EFE0                 BL      xxx_LoadLibraryW
.text:1003EFE4                 CMP     R0, #0
.text:1003EFE8                 STR     R0, [R5]
.text:1003EFEC                 BEQ     loc_1003F01C
.text:1003EFF0
.text:1003EFF0 loc_1003EFF0                            ; CODE XREF:
SHCreateShortcut+1Cj
.text:1003EFF0                 LDR     R1, =aShcreateshortc
.text:1003EFF4                 BL      xxx_GetProcAddressW
.text:1003EFF8                 MOVS    R3, R0
.text:1003EFFC                 BEQ     loc_1003F014
.text:1003F000                 MOV     R1, R6
.text:1003F004                 MOV     R0, R7
.text:1003F008                 MOV     LR, PC
.text:1003F00C                 BX      R3
.text:1003F010                 MOV     R4, R0
...






-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to