Skip to content
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

DetourCreateProcessWithDllsW with LPCWSTR dll names #82

Closed
mwetzko opened this issue Sep 5, 2019 · 3 comments
Closed

DetourCreateProcessWithDllsW with LPCWSTR dll names #82

mwetzko opened this issue Sep 5, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@mwetzko
Copy link

mwetzko commented Sep 5, 2019

Hello Detours Team,

currently, it is not possible to call DetourCreateProcessWithDllsW with wide character dll names, because DetourCreateProcessWithDllsW uses LPCSTR and StringCchLengthA to count the dll name length. Please change the DetourCreateProcessWithDllsW, so that it can consume wide chars for dll names respectively.

Thank you!

BOOL WINAPI DetourCreateProcessWithDllsW(_In_opt_ LPCWSTR lpApplicationName,

@YellowAfterlife
Copy link

I think it comes down to UPDATE_IMPORTS_XX in uimports.cpp. Unfortunately, I do not know enough of process structure to guess what you would need to do with this for it to work with wide LPCWSTRs.

In my case I currently just copy the DLL to the target directory if needed, though have also considered using subst.

@bgianfo bgianfo added the bug Something isn't working label Aug 21, 2020
@sonyps5201314
Copy link
Contributor

use LPCSTR is because createwth.cpp use IAT to inject your dlls to destination process, so the imported dll name items must be ANSI version string,so it is not a problem.

@bgianfo
Copy link
Contributor

bgianfo commented Jan 24, 2021

Closing this as won't fix, as @sonyps5201314's explanation is correct. There's not much we can do here.

@bgianfo bgianfo closed this as completed Jan 24, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants