[3/3] rundll32: Recognize entry points passed as ordinal numbers. (try 2)

Alexandre Julliard julliard at winehq.org
Tue May 4 05:56:48 CDT 2010


Andrew Nguyen <anguyen at codeweavers.com> writes:

> @@ -119,30 +119,43 @@ static FARPROC16 get_entry_point16( HINSTANCE16 inst, LPCWSTR entry )
>  static void *get_entry_point32( HMODULE module, LPCWSTR entry, BOOL *unicode )
>  {
>      void *ret;
> -    DWORD len = WideCharToMultiByte( CP_ACP, 0, entry, -1, NULL, 0, NULL, NULL );
> -    char *entryA = HeapAlloc( GetProcessHeap(), 0, len + 1 );
> -
> -    if (!entryA)
> -        return NULL;
>  
> -    WideCharToMultiByte( CP_ACP, 0, entry, -1, entryA, len, NULL, NULL );
> +    /* determine if the entry point is an ordinal */
> +    if (entry[0] == '#')
> +    {
> +        int ordinal = atoiW( entry + 1 );
> +        if (ordinal <= 0)
> +            return NULL;

You don't set the unicode flag in this case.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list