-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DetourCreateProcessWithDll*W
do not use wide char for the dlls names
#159
Comments
Because the import table does not have a wide character version. |
Yes but then how does one load a DLL using full path or subdirectories containing wide characters then? |
You should use MBCS whenever possible |
Ah, I've been using Unicode since it is recommended here https://docs.microsoft.com/en-us/cpp/text/support-for-multibyte-character-sets-mbcss?view=msvc-160 I suppose the only way to fix this issue would be to use another method for the dll injection than patching the import table. (would detouring the child process entry point work)? |
Modifying the import table is currently the most reliable method. Of course, if you need it, you can try CreateRemoteThread+LoadLibraryW to inject. It is also possible to modify AddressOfEntryPoint code. |
Thanks I'll look into it if I ever have issues with import tables! |
All variants of
DetourCreateProcessWithDllExW
are takingLPCSTR
instead ofLPCWSTR
for the dll names.It seems to be due to the fact that deep down
UPDATE_IMPORTS_XX
does not have a widechar version.Would changing this be conceivable ?
This is an issue if the dll is in a path requiring it.
The text was updated successfully, but these errors were encountered: