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? -- Pedro Alves ------------------------------------------------------------------------- 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