Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a42c0728
Commit
a42c0728
authored
May 04, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
May 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rundll32: Recognize entry points passed as ordinal numbers.
parent
de83c530
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
17 deletions
+31
-17
rundll32.c
programs/rundll32/rundll32.c
+31
-17
No files found.
programs/rundll32/rundll32.c
View file @
a42c0728
...
...
@@ -119,30 +119,44 @@ 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
;
/* first try the W version */
*
unicode
=
TRUE
;
strcat
(
entryA
,
"W"
);
if
(
!
(
ret
=
GetProcAddress
(
module
,
entryA
)))
*
unicode
=
TRUE
;
ret
=
GetProcAddress
(
module
,
(
LPCSTR
)
ordinal
)
;
}
else
{
/* now the A version */
*
unicode
=
FALSE
;
entryA
[
strlen
(
entryA
)
-
1
]
=
'A'
;
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
);
/* first try the W version */
*
unicode
=
TRUE
;
strcat
(
entryA
,
"W"
);
if
(
!
(
ret
=
GetProcAddress
(
module
,
entryA
)))
{
/* now the version without suffix */
entryA
[
strlen
(
entryA
)
-
1
]
=
0
;
ret
=
GetProcAddress
(
module
,
entryA
);
/* now the A version */
*
unicode
=
FALSE
;
entryA
[
strlen
(
entryA
)
-
1
]
=
'A'
;
if
(
!
(
ret
=
GetProcAddress
(
module
,
entryA
)))
{
/* now the version without suffix */
entryA
[
strlen
(
entryA
)
-
1
]
=
0
;
ret
=
GetProcAddress
(
module
,
entryA
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
entryA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
entryA
);
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment