S
Steve Ricketts
I'm new to C# and converting a lot of VB6 programs to it. I have one sub
that stops a process and I'm having some difficulty getting it to build in
C#. The VB6 code looks like:
Public Sub stopProcess(ByVal hWindow As Long)
Call PostMessage(hWindow, WM_CLOSE, vbNull, vbNull)
Call WaitForSingleObject(hWindow, INFINITE)
End Sub
I've included the DllImports for PostMessage and WaitForSingleObject but
"hWinow" is a different type. PostMessages uses HandleRef for hWindow and
WaitForSingleObject uses IntPtr. How do I resolve the two so I can stop the
desired process?
Thanks,
sr
that stops a process and I'm having some difficulty getting it to build in
C#. The VB6 code looks like:
Public Sub stopProcess(ByVal hWindow As Long)
Call PostMessage(hWindow, WM_CLOSE, vbNull, vbNull)
Call WaitForSingleObject(hWindow, INFINITE)
End Sub
I've included the DllImports for PostMessage and WaitForSingleObject but
"hWinow" is a different type. PostMessages uses HandleRef for hWindow and
WaitForSingleObject uses IntPtr. How do I resolve the two so I can stop the
desired process?
Thanks,
sr