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

faultrep

.

Enables an application to "manually" report faults to Microsoft. Although you can use this function to report application crashes, Microsoft recommends that applications not handle fatal errors directly but instead rely on the crash reporting capability provided by the operating system.

ntdsapi

.
Summary
The DsCrackNames function converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. For example, user objects can be identified by SAM account names (domain\username), user principal name (username@domain.com), or distinguished name.
.

The success of the name conversion request depends on where the client is bound. Clients bind to specific instances of the directory service using some variant of DsBind. If bound to a global catalog, the scope of the name mapping is the entire forest. If not bound to a global catalog, the scope of the name mapping is the domain not covered by a global catalog for that domain controller. If not bound to a global catalog and a name is not found, but the input name unambiguously identifies its domain and this domain is in the forest, then the return data identifies the DNS domain name for the domain of interest. Clients are expected to use this data to bind to the correct domain controller or global catalog and call DsCrackNames again with the new bind handle.

.

System.DirectoryServices.ActiveDirectory.

.
Summary
The DsUnBind function finds an RPC session with a domain controller and unbinds a handle to the directory service (DS).

secur32

.

#region Using directives

.
Summary
Converts a directory service object name from one format to another.

msi

.
Summary
Returns the full source path for a folder in the Directory table.
.
Summary
Returns the full target path for a folder in the Directory table.
.

    const int MSIDBOPEN_DIRECT =       2;  // database direct read/write without transaction

.

    const int MSIDBOPEN_CREATEDIRECT = 4;  // create new database, direct mode read/write

.

        int iOpenMode = MSIDBOPEN_DIRECT;

.
Summary
Sets the full target path for a folder in the Directory table.

mpr

.

        RESOURCEDISPLAYTYPE_DIRECTORY,

.

        CONNECT_REDIRECT = 0X80,

.
Summary
The WNetAddConnection2 function makes a connection to a network resource. The function can redirect a local device to the network resource.
.

  //      RESOURCEDISPLAYTYPE_DIRECTORY,

.

    Directory = 0x09,

.

        RESOURCEDISPLAYTYPE_DIRECTORY,

.

    RESOURCEDISPLAYTYPE_DIRECTORY = 0x00000009,

.

    RESOURCEDISPLAYTYPE_DIRECTORY = &H9

.
Summary
Makes a connection to a network resource. The function can redirect a local device to a network resource.
.

    DIRECTORY    = 0x00000009,

.

    REDIRECT        = 0x00000080,

msdrm

.
Summary
The DRMRegisterContent function informs the Active Directory Rights Management Services (AD RMS) client that an AD RMS-protected document is being or is no longer being displayed.

gdiplus

.

static extern int GdipAddPathRectanglesI(HandleRef path,

.

   HandleRef rects, int count);

.

Declare Function GdipAddPathRectanglesI Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipAddPathRectanglesI] on MSDN
.

static extern int GdipAddPathRectangleI(HandleRef path, int x, int y,

.

Declare Function GdipAddPathRectangleI Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipAddPathRectangleI] on MSDN
.

static extern int GdipAddPathRectangles(HandleRef path,

.

   HandleRef rects, int count);

.

Declare Function GdipAddPathRectangles Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipAddPathRectangles] on MSDN
.

   ref GPRECT layoutRect, HandleRef format);

.

   ref GPRECT dstRect, ref GPRECT srcRect, int unit, out int state);

.

static extern int GdipBitmapLockBits(HandleRef bitmap, ref GPRECT rect,

.

static extern int GdipCombineRegionRectI(HandleRef region,

.

   ref GPRECT gprect, CombineMode mode);

.

Declare Function GdipCombineRegionRectI Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipCombineRegionRectI] on MSDN
.

internal static extern int GdipMeasureString(HandleRef graphics, string textString, int length, HandleRef font, ref GPRECTF layoutRect, HandleRef stringFormat, [In, Out] ref GPRECTF boundingBox, out int codepointsFitted, out int linesFilled);

Structures

24: ACTCTX
.

     public string lpAssemblyDirectory;

.

    Public lpAssemblyDirectory As String

.

            public RECT        rcFrame;

.

    Public rcFrame As RECT

.

    public Rectangle Exclude

.

      get { return (Rectangle)Marshal.PtrToStructure(prcExclude, typeof(RECT)); }

.

      prcExclude = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(RECT)));

.

        public string        lpDirectory;       // might be NULL (indicating no specific directory)

.

        public string        lpDirectoryW;        // Unicode directory, for those commands that can use it.

.

Actually, there's no COLORREF structure in native Win32. It is typedef-ed to DWORD, which means that in the managed world its direct counterpart is [System.Int32] (aka int in C#). So, when faced with interop involving COLORREF'S you'd better treat them as int's. Also have in mind that the color components are stored in reverse order, i.e. the Red component is in the lowest-byte. In short, the format is 0x00BBGGRR. You can use a code similar to the following to obtain a COLORREF:

.

    public RECT rcItem;

.

    public RECT rcButton;

.

    rcItem As RECT

.

    rcButton As RECT

.

ComboBoxButtonState, RECT

.

public class COMRECT

.

    public COMRECT()

.

    public COMRECT(int left, int top, int right, int bottom)

.

Structure COMRECT

.
Documentation
[COMRECT] on MSDN
.

public struct GEORECT

.

   public MessageType Type { get; set; }           // MessageType.FV_RUBBERBAND_GEORECT_MSG (3)

.

// containing a geocoordinate rectangle

.

       var pData = Marshal.PtrToStructure<GEORECT>(msg.lpData);

.

       if (MessageType.FV_RUBBERBAND_GEORECT_MSG == pData.Type

.

       else if (MessageType.FV_RUBBERBAND_GEORECT_CANCELED == pData.Type)

.

public static extern bool CreateProcessWithTokenW(IntPtr hToken, LogonFlags dwLogonFlags, string lpApplicationName, string lpCommandLine, CreationFlags dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, [In] ref STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);

.

    Public Shared Function CreateProcessWithTokenW(hToken As IntPtr, dwLogonFlags As Integer, lpApplicationName As String, lpCommandLine As String, dwCreationFlags As Integer, lpEnvironment As IntPtr, lpCurrentDirectory As IntPtr, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean

.

As of .net 3.5 the DEVMODE structure is declared incorrectly causing incorrect values to be returned after dmBitsPerPel. The structures above have been updated to reflect the correct implementation.

.

POINTL was incorrectly declared to use longs instead of ints, this has been fixed.

.
WARNING
The documentation (from which I created this structure) seems to have REVERSED the fields dwTimeStamp and dwReserved. When I look at live data on the server, the field which is allegedly "dwTimeStamp" is zero, but "dwReserved" contains a value equal to the time stamp (An integer value representing the number of hours that have elapsed since midnight (00:00:00), January 1, 1601 UTC). The LDP.exe tool parses the data correctly. So I'm going to switch my struct above to reflect reality.
.

    public RECT rcClip;

.

    Public rcClip As RECT

.

RECT, DrawThemeBackgroundFlags

.

delegate int DTT_CALLBACK_PROC(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLen, ref RECT rc, int flags, IntPtr lParam);

.

public delegate int DrawThemeTextCallback(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLen, ref RECT rc, int flags, IntPtr lParam);

.

   public bool ReturnCalculatedRectangle

.

     get { return (dwFlags & DrawThemeTextOptionsFlags.CalcRect) == DrawThemeTextOptionsFlags.CalcRect; }

.

     set { SetFlag(DrawThemeTextOptionsFlags.CalcRect, value); }

.

        public pub.Rect rcDestination;

.

        public pub.Rect rcSource;

.

    public RECT rclBounds;

.

    public RECT rclFrame;

.

  public IntPtr RootDirectory;

.

public struct GRADIENT_RECT

.

    public GRADIENT_RECT(uint upLeft, uint lowRight)

.

Public Structure GRADIENT_RECT

.
Documentation
[GRADIENT_RECT] on MSDN
.

Using IntPtr instead allows the struct to be passed correctly but requires a manual conversion. One way to accomplish this transparently is by making those two fields private and adding the following properties to the struct:

.

    public RECT        rcCaret;

.

    Public rcCaret As RECT

.

    public RECT rcImage;

.

      Public rcImage As RECT

.

    public struct IMAGE_DATA_DIRECTORY

.

  Public Structure IMAGE_DATA_DIRECTORY

.

  Public Type IMAGE_DATA_DIRECTORY

.
Documentation
[IMAGE_DATA_DIRECTORY] on MSDN
.

    public struct IMAGE_EXPORT_DIRECTORY

.

    Public Structure IMAGE_EXPORT_DIRECTORY

.
Documentation
[IMAGE_EXPORT_DIRECTORY] on MSDN
.

        public IMAGE_DATA_DIRECTORY ExportTable;

.

        public IMAGE_DATA_DIRECTORY ImportTable;

.

        public IMAGE_DATA_DIRECTORY ResourceTable;

.

        public IMAGE_DATA_DIRECTORY ExceptionTable;

.

        public IMAGE_DATA_DIRECTORY CertificateTable;

.

        public IMAGE_DATA_DIRECTORY BaseRelocationTable;

.

        public IMAGE_DATA_DIRECTORY Debug;

.

        public IMAGE_DATA_DIRECTORY Architecture;

.

        public IMAGE_DATA_DIRECTORY GlobalPtr;

.

        public IMAGE_DATA_DIRECTORY TLSTable;

.

        public IMAGE_DATA_DIRECTORY LoadConfigTable;

.

        public IMAGE_DATA_DIRECTORY BoundImport;

.

        public IMAGE_DATA_DIRECTORY IAT;

.

        public IMAGE_DATA_DIRECTORY DelayImportDescriptor;

.

        public IMAGE_DATA_DIRECTORY CLRRuntimeHeader;

.

        public IMAGE_DATA_DIRECTORY Reserved;

.

        public IMAGE_DATA_DIRECTORY ExportTable;

.

        public IMAGE_DATA_DIRECTORY ImportTable;

.

        public IMAGE_DATA_DIRECTORY ResourceTable;

.

        public IMAGE_DATA_DIRECTORY ExceptionTable;

.

        public IMAGE_DATA_DIRECTORY CertificateTable;

.

        public IMAGE_DATA_DIRECTORY BaseRelocationTable;

.

        public IMAGE_DATA_DIRECTORY Debug;

.

        public IMAGE_DATA_DIRECTORY Architecture;

.

        public IMAGE_DATA_DIRECTORY GlobalPtr;

.

        public IMAGE_DATA_DIRECTORY TLSTable;

.

        public IMAGE_DATA_DIRECTORY LoadConfigTable;

.

        public IMAGE_DATA_DIRECTORY BoundImport;

.

        public IMAGE_DATA_DIRECTORY IAT;

.

        public IMAGE_DATA_DIRECTORY DelayImportDescriptor;

.

        public IMAGE_DATA_DIRECTORY CLRRuntimeHeader;

.

        public IMAGE_DATA_DIRECTORY Reserved;

.

    ''' doesn't directly point to main, WinMain, or DllMain. Rather, it points to  

.

    '''  IMAGE_DATA_DIRECTORY structures. This field contains the number of entries in

.

    '''  A pointer to the first IMAGE_DATA_DIRECTORY structure in the data directory.

.

    '''  The number of directories is not fixed. Check the NumberOfRvaAndSizes member before looking for a specific directory.

.

    Public DataDirectory(15) As IMAGE_DATA_DIRECTORY

.

    ' destructions.  In most executables, this address doesn't directly point to main, WinMain,

.

    ' At the end of the IMAGE_NT_HEADERS structure is an array of IMAGE_DATA_DIRECTORY structures.

.

    ' A pointer to the first IMAGE_DATA_DIRECTORY structure in the data directory.  The number of

.

    ' directories is not fixed.  Check NumberOfRvaAndSizes before looking for a specific directory.

.

    DataDirectory(0 To 15) As IMAGE_DATA_DIRECTORY

.

    ' destructions.  In most executables, this address doesn't directly point to main, WinMain,

.

    ' At the end of the IMAGE_NT_HEADERS structure is an array of IMAGE_DATA_DIRECTORY structures.

.

    ' A pointer to the first IMAGE_DATA_DIRECTORY structure in the data directory.  The number of

.

    ' directories is not fixed.  Check NumberOfRvaAndSizes before looking for a specific directory.

.

    DataDirectory(0 To 15) As IMAGE_DATA_DIRECTORY

.

IMAGE_DATA_DIRECTORY

.

From MSDN: The number of directories is not fixed. Check the NumberOfRvaAndSizes member before looking for a specific directory.

.

    public IMAGE_DATA_DIRECTORY ExportTable;

.

    public IMAGE_DATA_DIRECTORY ImportTable;

.

    public IMAGE_DATA_DIRECTORY ResourceTable;

.

    public IMAGE_DATA_DIRECTORY ExceptionTable;

.

    public IMAGE_DATA_DIRECTORY CertificateTable;

.

    public IMAGE_DATA_DIRECTORY BaseRelocationTable;

.

    public IMAGE_DATA_DIRECTORY Debug;

.

    public IMAGE_DATA_DIRECTORY Architecture;

.

    public IMAGE_DATA_DIRECTORY GlobalPtr;

.

    public IMAGE_DATA_DIRECTORY TLSTable;

.

    public IMAGE_DATA_DIRECTORY LoadConfigTable;

.

    public IMAGE_DATA_DIRECTORY BoundImport;

.

    public IMAGE_DATA_DIRECTORY IAT;

.

    public IMAGE_DATA_DIRECTORY DelayImportDescriptor;

.

    public IMAGE_DATA_DIRECTORY CLRRuntimeHeader;

.

    public IMAGE_DATA_DIRECTORY Reserved;

.

        /// The section contains comments or other information. The .drectve section has this type. This is valid for object files only.

.

                Return DirectCast(dwICC, CommonControls)

.

The .NET Framework class Font, has a method, Font::FromLogfont that takes an Object reference as it's method parameter. You must define a managed LOGFONT class using the same format as the C# signature above. When using the StructLayout attribute on the class definition, you must set the CharSet property to Auto (the default is Ansi, which will not work correctly). The only difficulty encountered is passing the string value (the designated Font Face Name) to the FromLogfont method; apparently, this must have the attribute: [MarshalAs(UnmanagedType::ByValTStr)] enum value for the method to work correctly. Then, when instantiating a new Font in your managed application, you must cast the LOGFONT class (with appropriate member values assigned) to a System::Object for the function to work without generating a runtime exception.

.

        public RECT rcText;

.

        Public rcText As RECT

.

   public IntPtr RootDirectory;

.

   Dim RootDirectory As IntPtr

53: MAPI
.

    /// This path should include the disk drive letter and directory name.

.

  /// decoding the file, choosing the correct application to launch when opening it, or any use that

.

    ''' This path should include the disk drive letter and directory name.

.

    ''' decoding the file, choosing the correct application to launch when opening it, or any use that

.

       // Alternate, Structure Version.  This One Allows Correct Marshalling As A "ref" Parameter,

.

       // But You Have To Ensure The Value Of dwLength Gets Set Correctly Via A Wrapper Method.

.

    Direct = 3,

.

    Indirect = 4

.

    Direct = 3

.

    Indirect = 4

.

            Return DirectCast(m_state, MIB_TCP_STATE)

57: MSG
.
Summary
.

Change public Guid pIID to IntPtr and marshal your guid directly to an allocated memory block and this struct will work with CoCreateInstanceEx.

.

   RECT[] rgrc;

.

    Type: RECT[3]

.

    An array of rectangles. The meaning of the array of rectangles changes during the processing of the WM_NCCALCSIZE message.

.

    When the window procedure receives the WM_NCCALCSIZE message, the first rectangle contains the new coordinates of a window that has been moved or resized, that is, it is the proposed new window coordinates. The second contains the coordinates of the window before it was moved or resized. The third contains the coordinates of the window's client area before the window was moved or resized. If the window is a child window, the coordinates are relative to the client area of the parent window. If the window is a top-level window, the coordinates are relative to the screen origin.

.

    When the window procedure returns, the first rectangle contains the coordinates of the new client rectangle resulting from the move or resize. The second rectangle contains the valid destination rectangle, and the third rectangle contains the valid source rectangle. The last two rectangles are used in conjunction with the return value of the WM_NCCALCSIZE message to determine the area of the window to be preserved.

.

        public RECT rc;

.

        Public rc As RECT

.

            Return DirectCast(msg.GetLParam(GetType(NMCUSTOMDRAW)), NMCUSTOMDRAW)

.

RECT, NMHDR

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


 
Access PInvoke.net directly from VS: