Findwindow/FindwindowEX on VMWare program in VB6
Hey all, i am trying to grab some text input from notepad thats within a VMWare virtual machine running Windows 7. I can get a handle of the VMWare form but nothing within it (the windows 7 OS running inside it).
This is the code i am currently using:
Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Sub Commandcc_Click()
Dim FromHwnd As Long
Dim hWin As Long
Dim count As Integer
FromHwnd = FindWindow("VMUIFrame", vbNullString)
hWin = FindWindowEx(FromHwnd, 0&, "MKSEmbedded", "")
End Sub
I am getting a value for FromHwnd just fine, but once it goes into the EX, i get no value. The **MKSEmbedded** is the window inside the VMWare that Windows 7 is running in.
Is there something i am missing or need to do in order to grab that window inside VMWare?
Thanks!
David
Re: Findwindow/FindwindowEX on VMWare program in VB6
That isn't a standard error key. Check their support page
Re: Findwindow/FindwindowEX on VMWare program in VB6
If I understand correctly what you are trying to do, there is little chance that you will get that to work. The host OS that both your app and VMWare run on doesn't know anything about what's going on inside the VM. Your best bet could be that VMWare would provide some API that allows to access VM internals, but I'm afraid something like that doesn't exist either or it wouldn't be able to do what you want.
Sorry.