Actually, the above problem was fixed due to visual basic syntax errors. Darn C++ messing up my Visual Basic. :-P
Anyways, the following error is what I believe to be a true problem with the call to CreateRemoteThread. It is being passed all correct data, and should work. It returns false, though. Anyone know why, maybe?
procInfo.hThread = CreateRemoteThread(procInfo.dwProcessId, 0, 0, GetProcAddress(procInfo.hLibrary, "LoadLibraryA"), procInfo.rAddress, 0, 0)
If procInfo.hThread = 0 Then
Call VirtualFreeEx(procInfo.hProcess, ByVal procInfo.rAddress, Len(procInfo.szLibrary), MEM_RELEASE Or MEM_DECOMMIT)
Inject = False
Exit Function
End If
Debug.Print "CreateRemoteThread OK (" & procInfo.hThread & ")"