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

Invalid conversion from const char [6] to PCHAR in co::detour_attach on Windows #385

Open
gav2xlin opened this issue Jan 30, 2025 · 0 comments

Comments

@gav2xlin
Copy link

Hello. I got this error:
...
1> [CMake] C:\Users\gaald\.conan2\p\b\coost5fd09876535a2\b\src\src\co\hook_win.cc(1383): error C2664: 'void co::detour_attach(PVOID *,PVOID,PCHAR)': cannot convert argument 3 from 'const char [6]' to 'PCHAR' 1> [CMake] C:\Users\gaald\.conan2\p\b\coost5fd09876535a2\b\src\src\co\hook_win.cc(1383): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
... and etc

hook_win.cc:
inline void detour_attach(PVOID** ppbReal, PVOID pbMine, PCHAR psz)

PCHAR is not const

It's defined as follows:
typedef const char * PCCHAR; typedef PCCHAR const CPCCHAR;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant