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
using "mmap().MapImage()" how to pass a parameter to lpvReserved In DllMain
targetProcess.mmap().MapImage(L"TestDll.dll",blackbone::NoFlags, nullptr,nullptr/*,CustomArgs_t*/);
BOOL WINAPI DllMain(HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved) { switch (dwReason) { case DLL_PROCESS_ATTACH: if((INT)lpvReserved== 123456) MessageBox(0, L"ATTACH", L"TestDll", 0); return TRUE;
The text was updated successfully, but these errors were encountered:
In loader
struct DllArgs { char fmt[80]; char cval[16]; int ival; float fval; bool bval; } dll_args; strcpy_s( dll_args.fmt, "DllArgs received. cval: %s, ival: %d, fval: %0.3f, bval: %i\r\n" ); strcpy_s( dll_args.cval, "Some text" ); dll_args.ival = 12345; dll_args.fval = 7.567f; dll_args.bval = true; CustomArgs_t cargs( &dll_args ); targetProcess.mmap().MapImage( path, flags, nullptr, nullptr, &cargs );
In DLL
struct ArgsBase { long long size; }; struct CustomArgs : ArgsBase { char fmt[80]; char cval[16]; int ival; float fval; bool bval; }; BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { auto pArgs = (CustomArgs*)lpReserved; printf( pArgs->fmt, pArgs->cval, pArgs->ival, pArgs->fval, pArgs->bval ); ... }
Sorry, something went wrong.
No branches or pull requests
using "mmap().MapImage()" how to pass a parameter to lpvReserved In DllMain
The text was updated successfully, but these errors were encountered: