Re: [3/3] rundll32: Recognize entry points passed as ordinal numbers. (try 2)
Andrew Nguyen <anguyen(a)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(a)winehq.org
participants (1)
-
Alexandre Julliard