mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:35:59 +00:00
[RUNDLL32] Try to resolve the manifest file manually
This fixes f.e. Ctrl+A not working in the Create Shortcut wizard CORE-16669
This commit is contained in:
parent
0452d3415a
commit
8e16f28789
1 changed files with 13 additions and 1 deletions
|
@ -337,6 +337,7 @@ int WINAPI _tWinMain(
|
||||||
|
|
||||||
LPTSTR *argv;
|
LPTSTR *argv;
|
||||||
LPTSTR lptCmdLine,lptDllName,lptFuncName,lptMsgBuffer;
|
LPTSTR lptCmdLine,lptDllName,lptFuncName,lptMsgBuffer;
|
||||||
|
WCHAR ResolvedFile[MAX_PATH + 1] = {0}, *lpManifestName;
|
||||||
LPSTR lpFuncName,lpaCmdLine;
|
LPSTR lpFuncName,lpaCmdLine;
|
||||||
LPWSTR lpwCmdLine;
|
LPWSTR lpwCmdLine;
|
||||||
HMODULE hDll;
|
HMODULE hDll;
|
||||||
|
@ -386,7 +387,18 @@ int WINAPI _tWinMain(
|
||||||
else
|
else
|
||||||
lptCmdLine = _T("");
|
lptCmdLine = _T("");
|
||||||
|
|
||||||
ActCtx.lpSource = lptDllName;
|
lpManifestName = lptDllName;
|
||||||
|
if (GetFileAttributesW(lptDllName) == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{
|
||||||
|
LPWSTR FilePart = NULL;
|
||||||
|
if (SearchPathW(NULL, lptDllName, NULL, _countof(ResolvedFile) - 1, ResolvedFile, &FilePart))
|
||||||
|
{
|
||||||
|
lpManifestName = ResolvedFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: If there is a .manifest file next to the input file, we should use that instead!
|
||||||
|
ActCtx.lpSource = lpManifestName;
|
||||||
ActCtx.lpResourceName = (LPCWSTR)123;
|
ActCtx.lpResourceName = (LPCWSTR)123;
|
||||||
hActCtx = CreateActCtx(&ActCtx);
|
hActCtx = CreateActCtx(&ActCtx);
|
||||||
bActivated = (hActCtx != INVALID_HANDLE_VALUE ? ActivateActCtx(hActCtx, &cookie) : FALSE);
|
bActivated = (hActCtx != INVALID_HANDLE_VALUE ? ActivateActCtx(hActCtx, &cookie) : FALSE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue