First of all, your variable naming implies that you are expecting tmpProcess->Handle to be a window handle. It is not; it is a process handle. Also, in C++, since Process is a reference type, it must be declared as a pointer:
System::Diagnostics::Process* tmpProcess;
The op_Explicit() operator you are calling exists for implicit casting purposes in C# -- convert the value held by the IntPtr to an __int64, int, or void*. (Recall that the native size of the value of an IntPtr is determined by the platform; on 32bit hardware it is 32 bits, would be 64bits on 64bit hardware). I'll ask around, but I think in C++ it is impossible to disambiguate this function-call because in C++ it is illegal to overload a function based soely on its return type, which is what is happening here. You can get the same functionality by calling one of the conversion members: IntPtr::ToInt32(), IntPtr::ToInt64(), or IntPtr::ToPointer():
long l = hWnd->ToInt32();
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.