rundll32: Recognize entry points passed as ordinal numbers.
This commit is contained in:
parent
de83c53085
commit
a42c072830
|
@ -119,6 +119,19 @@ static FARPROC16 get_entry_point16( HINSTANCE16 inst, LPCWSTR entry )
|
|||
static void *get_entry_point32( HMODULE module, LPCWSTR entry, BOOL *unicode )
|
||||
{
|
||||
void *ret;
|
||||
|
||||
/* determine if the entry point is an ordinal */
|
||||
if (entry[0] == '#')
|
||||
{
|
||||
int ordinal = atoiW( entry + 1 );
|
||||
if (ordinal <= 0)
|
||||
return NULL;
|
||||
|
||||
*unicode = TRUE;
|
||||
ret = GetProcAddress( module, (LPCSTR)ordinal );
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD len = WideCharToMultiByte( CP_ACP, 0, entry, -1, NULL, 0, NULL, NULL );
|
||||
char *entryA = HeapAlloc( GetProcessHeap(), 0, len + 1 );
|
||||
|
||||
|
@ -143,6 +156,7 @@ static void *get_entry_point32( HMODULE module, LPCWSTR entry, BOOL *unicode )
|
|||
}
|
||||
}
|
||||
HeapFree( GetProcessHeap(), 0, entryA );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue