Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "GetParent" in [All]

user32

.

private const uint GA_PARENT = 1; // Retrieves the parent window.This does not include the owner, as it does with the GetParent function.

.

private const uint GA_ROOTOWNER = 3; // Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.

.
Summary
.

public static extern IntPtr GetParent(IntPtr hWnd);

.

Public Shared Function GetParent(ByVal hWnd As IntPtr) As IntPtr

.

class method GetParent(hWnd: IntPtr): IntPtr; external;

.

Public Declare Function GetParent Lib "user32" _

.

Public Declare PtrSafe Function GetParent Lib "user32" (ByVal hwnd as LongPtr) as LongPtr

.

GetParent sets LastError

.

IntPtr GetParentSafe(IntPtr handle) {

.

   IntPtr result = GetParent(handle);

.

'NativeMethods.GetParentSafe(IntPtr)' calls into 'Marshal.GetLastWin32Error()' which has a LinkDemand. By making this call, 'Marshal.GetLastWin32Error()' is indirectly exposed to user code. Review the following protection:

.

->'NativeMethods.GetParentSafe(IntPtr)'

.

->'NativeMethods.GetParentSafe(IntPtr)'

.
Documentation
[GetParent] on MSDN

ntdll

.

    public static int GetParentProcessId()

Enums

.

    /// Retrieves the parent window. This does not include the owner, as it does with the GetParent function.

.

    GetParent = 1,

.

    /// Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.

.

    GetParent = 1

kernel32

.

    public static Process GetParentProcess(int pid)

.

        return GetParentProcess(Process.GetCurrentProcess().Id);


 
Access PInvoke.net directly from VS: