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 "POINT" in [All]

oleacc

.
Summary
The AccessibleObjectFromPoint function retrieves the address of the IAccessible interface pointer for the object at a specified point on the screen.
.

public static extern IntPtr AccessibleObjectFromPoint(POINT pt, [Out, MarshalAs(UnmanagedType.Interface)] out IAccessible accObj, [Out] out object ChildID);

.

Declare Function AccessibleObjectFromPoint  Lib "oleacc.dll" (TODO) As TODO

.

POINT

.

This function retrieves the lowest-level accessible object in the object hierarchy at the given point specified in screen coordinates where 0, 0 is the upper left corner. If the element at the point is not an accessible object (that is, does not support IAccessible), then the function retrieves the IAccessible interface of the parent object. The parent object must provide information about the child element through the IAccessible interface.

.

public static IAccessible GetAccessibleObject(POINT pt, out int ChildID)

.

     IntPtr success = AccessibleObjectFromPoint(pt, out accObj, out varChildID);

.
Documentation
.
Summary
The AccessibleObjectFromPoint function retrieves the address of the IAccessible interface pointer for the object at a specified point on the screen.
.

public static extern IntPtr AccessibleObjectFromPoint(POINT pt, [Out, MarshalAs(UnmanagedType.Interface)] out IAccessible accObj, [Out] out object ChildID);

.

    Shared Function AccessibleObjectFromPoint(ByVal pt As Point, <MarshalAs(UnmanagedType.Interface)> ByRef accObj As IAccessible, ByRef ChildID As Object) As IntPtr

.

The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a SystemAccessibleObject class to access accessible objects, that can be instantiated from a point.

.

This function retrieves the lowest-level accessible object in the object hierarchy at a given point in screen coordinates where (0, 0) is the upper left corner. If the element at the point is not an accessible object (that is, does not support IAccessible), then the function retrieves the IAccessible interface of the parent object. The parent object must provide information about the child element through the IAccessible interface.

.

public static IAccessible GetAccessibleObject(POINT pt, out int ChildID)

.

     IntPtr success = AccessibleObjectFromPoint(pt, out accObj, out varChildID);

.
Documentation
.
Summary
Retrieves a requested interface pointer for an accessible object based on a previously generated object reference
.

   //MouseHook.POINT structure type of POINT

.

    public static IntPtr GetControlHandlerFromPoint(MouseHook.POINT location)

.

        handler = AccessibleObjectFromPoint(location,out iAccessible,out ChildId);

.

    public static extern IntPtr AccessibleObjectFromPoint(MouseHook.POINT pt, [Out, MarshalAs(UnmanagedType.Interface)] out IAccessible accObj, [Out] out object ChildID);

query

.

Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.

version

.

Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.

userenv

.

            short* start = (short*)env.ToPointer();

.

    <DllImport("userenv.dll", EntryPoint:="LoadUserProfile", SetLastError:=True, CharSet:=CharSet.Auto)> _

.

[in, out] Pointer to a PROFILEINFO structure. LoadUserProfile will fail and return ERROR_INVALID_PARAMETER if the dwSize member of the structure is not set to sizeof(PROFILEINFO) or if the lpUserName member is NULL. For more information, see the following Remarks section.

mapi32

.

[DllImport(@"C:\Program Files\Microsoft Office\Office15\OLMAPI32.dll", EntryPoint = "HrGetAutoDiscoverXML", CharSet = CharSet.Unicode)]

.

To get the Message ID of the first message, lpszSeedMessageID should be null or should point to an empty string. Pass null or an empty string for lpszMessageType to find InterPersonal Message (IPM).

.

[DllImport(@"C:\Program Files\Microsoft Office\Office15\OLMAPI32.dll", EntryPoint = "MAPIInitialize", CharSet = CharSet.Unicode)]

.

[DllImport(@"C:\Program Files\Microsoft Office\Office15\OLMAPI32.dll", EntryPoint = "MAPIUninitialize", CharSet = CharSet.Unicode)]

hhctrl

.

[DllImport("hhctrl.ocx", SetLastError=true, EntryPoint = "HtmlHelpW", CharSet = CharSet.Unicode)]

.

<DllImport("hhctrl.ocx", SetLastError:=True, EntryPoint:="HtmlHelpW", CharSet:=CharSet.Unicode)> _

.

[DllImport("hhctrl.ocx", SetLastError = true, EntryPoint = "HtmlHelpW", CharSet = CharSet.Unicode)]

.

    class POINT

.

        public POINT()

.

        public POINT(int x, int y)

.

        internal POINT pt;

.

    Point current_cursor_location = Control.MousePosition;

.

    param.pt = new POINT(current_cursor_location.X, current_cursor_location.Y);

hid

.

        IntPtr preparsedDataPointer = new System.IntPtr();

.

        success = HidD_GetPreparsedData( hidHandle, ref preparsedDataPointer );

.

        //  Copy the data at PreparsedDataPointer into a byte array.

.

        result = HidP_GetCaps( preparsedDataPointer, ref Capabilities );

.

            result = HidP_GetValueCaps(HidP_Input, ref valueCaps[0], ref Capabilities.NumberInputValueCaps, preparsedDataPointer);

.

            success = HidD_FreePreparsedData( ref preparsedDataPointer );            

.

    Pointer to a caller-allocated HIDD_ATTRIBUTES structure that returns the attributes of the collection specified by DeviceObject.

.

[DllImport("hid.dll", EntryPoint="HidD_GetHidGuid", SetLastError=true)]

.

    Pointer to a caller-allocated output report buffer that the caller uses to specify a report ID.

.

    Pointer to a top-level collection's preparsed data.

.

    Pointer to a caller-allocated buffer that the routine uses to return a collection's HIDP_CAPS structure.

winfax

.

[DllImport("winfax.dll", SetLastError = true, EntryPoint = "FaxCompleteJobParamsW")]

.

[DllImport("winfax.dll", SetLastError = true, EntryPoint = "FaxCompleteJobParamsW")]

.

Be careful ! Don't miss the EntryPoint attribute, beacause string in structures will be in bad format (ANSI).

credui

.

[DllImport("credui.dll", EntryPoint="CredUIConfirmCredentialsW", CharSet = CharSet.Unicode)]

.

[DllImport("credui.dll", EntryPoint="CredUIParseUserNameW", CharSet=CharSet.Unicode)]

.

    <System.Runtime.InteropServices.DllImport("credui.dll", EntryPoint:="CredUIPromptForWindowsCredentials", CharSet:=CharSet.Unicode)> <CLSCompliant(False)> _

.

      /// The credential provider should align the credential BLOB pointed to by the refOutAuthBuffer parameter to a 32-bit boundary, even if the provider is running on a 64-bit system.

kernel32

.

Unsafe Code refers to C# code with Pointers in it.

.

"The use of pointers is rarely required in C#, but there are some situations that require them. Using an 'unsafe' context to allow pointers is warranted [... for use of] Advanced COM or Platform Invoke scenarios that involve structures with pointers in them" e.g.

.

"You cannot return the same exact pointer from a native function that you took as a parameter. If a native function returns the pointer that has been marshaled to it by PInvoke[c or c++ or DllImport in c#], memory corruption and exceptions may ensue." http://msdn.microsoft.com/en-us/library/ms235282.aspx

.

    // TODO: Test - what's an out uint[] during interop? This probably isn't quite right, but provides a starting point:

.

    [DllImport("kernel32.dll", EntryPoint = "ReadConsoleInputW", CharSet = CharSet.Unicode)]

. * IntPtr.Zero - Since I did not need to pass it on to a child process, I decided to leave this pointer as null.
.

     EntryPoint:="CreateEventA")> _

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        byte* p = (byte*)hMVF.ToPointer() + iViewDelta;

.

        /// Main entry point for the application.

.

    [DllImport("kernel32.dll", EntryPoint = "CreateFile", SetLastError = true)]

.

    [DllImport("kernel32.dll", EntryPoint = "PeekNamedPipe", SetLastError = true)]

.

The key is to use Marshal.GetFunctionPointerForDelegate to get an IntPtr to the method that will serve as the thread proc.

.
Summary
Causes a breakpoint exception to occur in the specified process. This allows the calling thread to signal the debugger to handle the exception.
.

DeleteVolumeMountPoint(@"Y:\");

.
Summary
.

static extern bool DeleteVolumeMountPoint(string lpszVolumeMountPoint);

.

DeleteVolumeMountPoint(DriveLetter+":\\");

.
Documentation
[DeleteVolumeMountPoint] on MSDN
.

     FsctlQueryRetrievalPointers = (EFileDevice.FileSystem << 16) | (14 << 2) | EMethod.Neither | (0 << 14),

.

     FsctlGetRetrievalPointers = (EFileDevice.FileSystem << 16) | (28 << 2) | EMethod.Neither | (0 << 14),

.

     FsctlSetReparsePoint = (EFileDevice.FileSystem << 16) | (41 << 2) | EMethod.Buffered | (0 << 14),

.

     FsctlGetReparsePoint = (EFileDevice.FileSystem << 16) | (42 << 2) | EMethod.Buffered | (0 << 14),

.

     FsctlDeleteReparsePoint = (EFileDevice.FileSystem << 16) | (43 << 2) | EMethod.Buffered | (0 << 14),

.

<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _

.

<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _

.

    <DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _

.

    <DllImport("kernel32.dll", CharSet:=CharSet.Unicode, EntryPoint:="EnumResourceNamesW", SetLastError:=True)> _

.

    [DllImport("kernel32.dll", EntryPoint = "EnumResourceNamesW", CharSet = CharSet.Unicode, SetLastError = true)]

.

    [DllImport("kernel32.dll", EntryPoint = "EnumResourceNamesW", CharSet = CharSet.Unicode, SetLastError = true)]

.

    /// The main entry point for the application.

.

<DllImport("kernel32.dll", EntryPoint:="ExpandEnvironmentStringsW", SetLastError:=true, CharSet:=CharSet.Unicode)> _

.

  [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint="CreateFileW")]

.

<DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> _

.

<DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> _

.

<DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> _

.

<DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> _

.

<DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> _

.

<DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> _

.

    <System.Runtime.InteropServices.DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Unicode)>

.

<DllImport("kernel32.dll", SetLastError:=True, EntryPoint:="FreeLibrary")> _

.

The original GetCommandLine function returns a pointer to a buffer allocated and owned by the operating system. When marshaling strings as return types, the interop marshaler assumes it must free the memory that the original LPTSTR type pointed to by the function. To prevent the marshaler from automatically reclaiming this memory, the managed GetCommandLine prototype returns an IntPtr type instead of a string. The Marshal.PtrToStringAuto method copies the unmanaged LPSTR type to a managed string object, widening the character format, if required.

.

    [DllImport("kernel32.dll", SetLastError=true, EntryPoint="GetCompressedFileSize")]

.

      //Need to use reflection to obtain pointer to the console output buffer

.

    [DllImport("kernel32.dll", EntryPoint = "GetConsoleOriginalTitleW", CharSet = CharSet.Unicode, SetLastError = true)]

.

    [DllImport("kernel32.dll", EntryPoint = "GetConsoleTitle", CharSet = CharSet.Unicode, SetLastError = true)]

.

    /// <param name="codePage">The code page 'pointer' to look up.</param>

.

  /// <param name="lpRootPathName">A pointer to a null-terminated string that specifies the root directory and returns information about the disk.A trailing backslash is required. If this parameter is NULL, the function uses the root of the current directory.</param>

.

catch (EntryPointNotFoundException)

.

Otherwise, an unhandled exception of type 'System.EntryPointNotFoundException' is thrown.

.

bufferLength, The maximum size of the buffer pointed to by buffer, in TCHARs. This size does not include the terminating null character. If this parameter is zero, buffer is not used.

.

buffer, A pointer to a buffer that receives a series of null-terminated strings, one for each valid drive in the system, plus with an additional null character. Each string is a device name.

.

[DllImport("KERNEL32.DLL", CharSet=CharSet::Auto, EntryPoint="GetPrivateProfileInt")]

.

    <DllImport("kernel32.dll", SetLastError:=True, EntryPoint:="GetPrivateProfileIntA")> _

.

[DllImport("KERNEL32.DLL", CharSet=CharSet::Auto, EntryPoint="GetPrivateProfileString")]

.

[DllImport("KERNEL32.DLL", CharSet=CharSet::Ansi, EntryPoint="GetProcAddress", ExactSpelling=true)]

.

This API becomes a lot more interesting in .NET v2.0 because the System.Runtime.InteropServices.Marshal class gains a new API called GetDelegateForFunctionPointer(). This means that you will be able to write code like this:

.

DllRegisterServerInvoker drs = (DllRegisterServerInvoker) Marshal.GetDelegateForFunctionPointer( fptr, typeof(DllRegisterServerInvoker) );

.

drs(); // call via a function pointer

.

[DllImport("kernel32", SetLastError = true, EntryPoint = "GetProcAddress")]

.

[DllImport("kernel32.dll", CharSet = CharSet.Unicode, EntryPoint = "GetShortPathNameW", SetLastError = true)]

.

[DllImport("kernel32.dll",EntryPoint="GetStartupInfoW")]

.

     [DllImport("kernel32.dll", SetLastError = true, EntryPoint = "GetStartupInfoA")]

.
Summary
The GetStringTypeEx API returns character information for the characters in the specified string pointer. Three types of character information can be retrieved, depending on the dwInfoType parameter.
.
Summary
The GetStringTypeEx API returns character information for the characters in the specified string pointer. Three types of character information can be retrieved, depending on the dwInfoType parameter.
.

<DllImport("kernel32.dll", SetLastError:=true, EntryPoint:="GetSystemDirectoryW", CharSet:=CharSet.Unicode)> _

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: