Desktop Functions: Smart Device Functions:
|
Search Results for "RECT" in [All]Structures1: 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. 5: COLORREF 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: 6: COMBOBOXINFO 7: COMRECT
public class COMRECT
public COMRECT()
public COMRECT(int left, int top, int right, int bottom)
Structure COMRECT
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 10: DEVMODE 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. 11: DNS_RPC_RECORD 12: DTBGOPTS 13: DTTOPTS
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; 15: ENHMETAHEADER
public RECT rclBounds;
public RECT rclFrame;
public IntPtr RootDirectory; 17: GRADIENT_RECT
public struct GRADIENT_RECT
public GRADIENT_RECT(uint upLeft, uint lowRight)
Public Structure GRADIENT_RECT 18: GSVersion 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: 19: GUITHREADINFO
public RECT rcCaret;
Public rcCaret As RECT 20: IMAGEINFO
public RECT rcImage;
Public rcImage As RECT
public struct IMAGE_DATA_DIRECTORY
Public Structure IMAGE_DATA_DIRECTORY
Public Type IMAGE_DATA_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;
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 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) 27: LOGFONT 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. 28: LPNMTBCUSTOMDRAW
public RECT rcText;
Public rcText As RECT
public IntPtr RootDirectory;
Dim RootDirectory As IntPtr 30: 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 31: MEMORYSTATUS
// 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. 32: MIB_IPFORWARDROW
Direct = 3,
Indirect = 4
Direct = 3
Indirect = 4
Return DirectCast(m_state, MIB_TCP_STATE) 34: MSG 35: MULTI_QI 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. 37: NMCUSTOMDRAW
public RECT rc;
Public rc As RECT
Return DirectCast(msg.GetLParam(GetType(NMCUSTOMDRAW)), NMCUSTOMDRAW) 38: NMHDR
Return DirectCast(msg.GetLParam(GetType(NMHDR)), NMHDR) 39: NMLVCUSTOMDRAW
public RECT rcText; 40: NMREBARCHEVRON
public RECT rc;
Public rc As RECT 41: NMTOOLBAR
public RECT rcButton;
Public rcButton As RECT
Public RootDirectory As IntPtr
RootDirectory = IntPtr.Zero
Return DirectCast(Marshal.PtrToStructure(m_objectName, GetType(UNICODE_STRING)), UNICODE_STRING)
public IntPtr RootDirectory;
RootDirectory = IntPtr.Zero; 44: OpenFileName
''' The initial directory. The algorithm for selecting the initial directory varies on different platforms.
InitialDirectory As String
public RECT rtMinMargin;
public RECT rtMargin;
Public rtMinMargin As RECT
Public rtMargin As RECT 47: PAINTSTRUCT
POWER_ACTION_UI_ALLOWED = 0x00000002, // Applications can prompt the user for directions on how to prepare for suspension. Sets bit 0 in the Flags parameter passed in the lParam parameter of WM_POWERBROADCAST.
POWER_ACTION_UI_ALLOWED = 0x00000002 ' Applications can prompt the user for directions on how to prepare for suspension. Sets bit 0 in the Flags parameter passed in the lParam parameter of WM_POWERBROADCAST. 49: RAWINPUT
/// The motion in the X direction. This is signed relative motion or
/// The motion in the Y direction. This is signed relative motion or absolute motion,
/// The motion in the X direction. This is signed relative motion or
/// The motion in the Y direction. This is signed relative motion or absolute motion, 50: RAWINPUTMOUSE
/// The motion in the X direction. This is signed relative motion or
/// The motion in the Y direction. This is signed relative motion or absolute motion,
/// The motion in the X direction. This is signed relative motion or
/// The motion in the Y direction. This is signed relative motion or absolute motion, 51: READERMODEINFO
Dim rect As New RECT(Me.Width / 2 - 20, Me.Height / 2 - 20, Me.Width / 2 + 20, Me.Height / 2 + 20)
Dim pnt As IntPtr = Marshal.AllocHGlobal(Marshal.SizeOf(rect))
Marshal.StructureToPtr(rect, pnt, True) 52: RECT
public struct RECT
public RECT(int left, int top, int right, int bottom)
public RECT(System.Drawing.Rectangle r) : this(r.Left, r.Top, r.Right, r.Bottom) { }
public static implicit operator System.Drawing.Rectangle(RECT r)
return new System.Drawing.Rectangle(r.Left, r.Top, r.Width, r.Height);
public static implicit operator RECT(System.Drawing.Rectangle r)
return new RECT(r);
public static bool operator ==(RECT r1, RECT r2)
public static bool operator !=(RECT r1, RECT r2)
public bool Equals(RECT r)
if (obj is RECT)
return Equals((RECT)obj);
else if (obj is System.Drawing.Rectangle)
return Equals(new RECT((System.Drawing.Rectangle)obj));
return ((System.Drawing.Rectangle)this).GetHashCode();
Public Structure RECT
Public Sub New(ByVal Rectangle As Rectangle)
Me.New(Rectangle.Left, Rectangle.Top, Rectangle.Right, Rectangle.Bottom)
Public Shared Widening Operator CType(ByVal Rectangle As RECT) As Rectangle
Return New Rectangle(Rectangle.Left, Rectangle.Top, Rectangle.Width, Rectangle.Height)
Public Shared Widening Operator CType(ByVal Rectangle As Rectangle) As RECT
Return New RECT(Rectangle.Left, Rectangle.Top, Rectangle.Right, Rectangle.Bottom)
Public Shared Operator =(ByVal Rectangle1 As RECT, ByVal Rectangle2 As RECT) As Boolean
Return Rectangle1.Equals(Rectangle2)
Public Shared Operator <>(ByVal Rectangle1 As RECT, ByVal Rectangle2 As RECT) As Boolean
Return Not Rectangle1.Equals(Rectangle2)
Public Overloads Function Equals(ByVal Rectangle As RECT) As Boolean
Return Rectangle.Left = _Left AndAlso Rectangle.Top = _Top AndAlso Rectangle.Right = _Right AndAlso Rectangle.Bottom = _Bottom
If TypeOf [Object] Is RECT Then
Return Equals(DirectCast([Object], RECT))
ElseIf TypeOf [Object] Is Rectangle Then
Return Equals(New RECT(DirectCast([Object], Rectangle)))
Public Type RECT The Win32 RECT structure is not compatible with the .NET System.Drawing.Rectangle structure. The RECT structure has left, top, right and bottom members, but the System.Drawing.Rectangle structure has left, top, width and height members internally.
if (Directory.Exists(rppFolder))
Directory.Delete(rppFolder, true);
Directory.CreateDirectory(rppFolder);
// Open the file to with correct access to write the Reparse Point 54: RGNDATAHEADER
RECT rcBound;
static extern bool CreateDirectory(string lpPathName, SECURITY_ATTRIBUTES lpSecurityAttributes);
DirectorySecurity security = new DirectorySecurity();
CreateDirectory(path, lpSecurityAttributes); 56: SetServiceStatus 1) The Microsoft MSDN Site is incorrect in their example for C#! They do not call the lpServiceStatus argument using the ref modifier. 57: SHARE_INFO_2
Corrected Struct against msdn http://msdn.microsoft.com/en-us/library/windows/desktop/bb525408(v=vs.85).aspx 58: SHFILEOPSTRUCT
Don't declare a value for the Pack size. If you omit it, the correct value is used when marshaling and a single SHFILEOPSTRUCT can be used for both 32-bit and 64-bit operation. 59: STAT_CHUNK
/// the derived text. A nonzero value means that no such direct 60: STRRET The example given previously was incorrect - the cStr member should be an array of MAX_PATH (260) bytes, not a single IntPtr. I've added the Size=264 parameter to the StructLayout attribute to make this work. I know this is right in C#, have no idea about VB. These codes are correct in 64bit platforms? Cut off search results after 60. Please refine your search. |