We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello!
I had no problems building CRegistryPlugin64.dll for x64. But doing the same for x86 yields a bunch of C++ errors due to my_ssize_t etc.:
CRegistryPlugin64.dll
x64
x86
my_ssize_t
RegistryPlugin.cpp(103): error C2664: 'HRESULT Deviare2::INktHookInfo::get_Address(__int64 *)': cannot convert argument 1 from 'long *' to ' __int64 *' RegistryPlugin.cpp(103): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast RegistryPlugin.cpp(103): note: while trying to match the argument list '(long *)' RegistryPlugin.cpp(117): error C2664: 'HRESULT Deviare2::INktHookInfo::get_Address(__int64 *)': cannot convert argument 1 from 'long *' to '__int64 *' RegistryPlugin.cpp(117): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast ...
I'm not sure how this should be fixed. But these are my patches:
--- a/RegistryPlugin.cpp 2022-12-27 12:27:45 +++ b/RegistryPlugin.cpp 2022-12-30 08:28:50 @@ -96,13 +96,13 @@ __in LPCWSTR szParametersW) { CComBSTR functionName; - my_ssize_t address; + __int64 address; CHAR szBufA[1024]; lpHookInfo->get_FunctionName(&functionName); lpHookInfo->get_Address(&address); sprintf_s(szBufA, 1024, "MyRegistryPlugin::OnHookAdded called [Hook: %S @ 0x%IX / Chain:%lu]", - (BSTR)functionName, address, dwChainIndex); + (BSTR)functionName, (my_ssize_t)address, dwChainIndex); ::OutputDebugStringA(szBufA); return S_OK; } @@ -110,13 +110,13 @@ MY_EXPORT VOID WINAPI OnHookRemoved(__in INktHookInfo *lpHookInfo, __in DWORD dwChainIndex) { CComBSTR functionName; - my_ssize_t address; + __int64 address; CHAR szBufA[1024]; lpHookInfo->get_FunctionName(&functionName); lpHookInfo->get_Address(&address); sprintf_s(szBufA, 1024, "MyRegistryPlugin::OnHookRemoved called [Hook: %S @ 0x%IX / Chain:%lu]", - (BSTR)functionName, address, dwChainIndex); + (BSTR)functionName, (my_ssize_t)address, dwChainIndex); ::OutputDebugStringA(szBufA); return; } @@ -126,7 +126,7 @@ { CComBSTR functionName, tempBStr[2]; CComPtr<INktParamsEnum> paramsEnum; - my_ssize_t address; + __int64 address; CHAR szBufA[1024]; WCHAR szBufW[64]; long i, paramCount; @@ -135,7 +135,7 @@ lpHookInfo->get_FunctionName(&functionName); lpHookInfo->get_Address(&address); sprintf_s(szBufA, 1024, "MyRegistryPlugin::OnFunctionCall called [Hook: %S @ 0x%IX / Chain:%lu]", - (BSTR)functionName, address, dwChainIndex); + (BSTR)functionName, (my_ssize_t)address, dwChainIndex); ::OutputDebugStringA(szBufA); hRes = lpHookCallInfoPlugin->Params(¶msEnum); @@ -183,7 +183,7 @@ if (param != NULL) { CComBSTR type, paramNo; - my_size_t size; + DWORD64 size; hRes = param->get_TypeName(&type); if (SUCCEEDED(hRes) && type != NULL && wcscmp(type, L"HKEY") == 0)
It now compiles w/o warnings for both x86 and x64. Remains to be tested. But how?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
I had no problems building
CRegistryPlugin64.dll
forx64
.But doing the same for
x86
yields a bunch of C++ errors due tomy_ssize_t
etc.:I'm not sure how this should be fixed. But these are my patches:
It now compiles w/o warnings for both
x86
andx64
.Remains to be tested. But how?
The text was updated successfully, but these errors were encountered: