我写了一个程序(A),从另一个程序(B)读取信息。当B呼叫A.如何找出B的hwnd?用A写的vb6或c#。我可以使用API或其他方式吗?
非常感谢
程序B在调用A时发送自己的进程ID怎么样?
Option Explicit
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Sub execute()
Dim pid As Integer
pid = GetCurrentProcessId()
'Call Program A Pass pid to your Program
End Sub
这是获取Excel processID的示例,您现在可以调用程序,将其作为参数发送。该程序现已确定。