@@ -16,7 +16,7 @@ static HHOOK _messageHookHandle;
1616// -----------------------------------------------------------------------------
1717// Spying Process functions follow
1818// -----------------------------------------------------------------------------
19- void Injector::Launch (System::IntPtr windowHandle, System::String^ assemblyFile, System::String^ typeFullName, System::String^ methodName)
19+ bool Injector::Launch (System::IntPtr windowHandle, System::String^ assemblyFile, System::String^ typeFullName, System::String^ methodName)
2020{
2121 System::String^ assemblyClassAndMethod = assemblyFile + " $" + typeFullName + " $" + methodName;
2222 pin_ptr<const wchar_t > acmLocal = PtrToStringChars (assemblyClassAndMethod);
@@ -52,6 +52,7 @@ void Injector::Launch(System::IntPtr windowHandle, System::String^ assemblyFile,
5252 LogMessage (" SetWindowsHookEx successful" , true );
5353 ::SendMessage ((HWND)windowHandle.ToPointer(), WM_GOBABYGO, (WPARAM)acmRemote, 0);
5454 ::UnhookWindowsHookEx (_messageHookHandle);
55+ return true ;
5556 }
5657
5758 ::VirtualFreeEx (hProcess, acmRemote, 0 , MEM_RELEASE);
@@ -69,6 +70,8 @@ void Injector::Launch(System::IntPtr windowHandle, System::String^ assemblyFile,
6970 }
7071 ::FreeLibrary (hinstDLL);
7172 }
73+
74+ return false ;
7275}
7376
7477void Injector::LogMessage (String^ message, bool append)
0 commit comments