You have a few problems with the declaration, but one that gives you an unsupported error is an attribute parameter. DWORD_PTR is not a pointer, but rather an unsigned integer, not a ref uint, it should be IntPtr.
The declaration I would use is as follows:
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool UpdateProcThreadAttribute(
IntPtr lpAttributeList, uint dwFlags, IntPtr Attribute,
IntPtr lpValue, IntPtr cbSize, IntPtr lpPreviousValue,
IntPtr lpReturnSize);
EDIT:
I tried to do this as a comment, but it is not very well coded.
IntPtr . - :
IntPtr hProcess
IntPtr lpAttributeList
const int PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = 0x00020000;
IntPtr lpValue = Marshal.AllocHGlobal(IntPtr.Size);
Marshal.WriteIntPtr(lpValue, hProcess);
if(UpdateProcThreadAttribute(lpAttributeList, 0, (IntPtr)PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, lpValue, (IntPtr)IntPtr.Size, IntPtr.Zero, IntPtr.Zero))
{
}