Desktop Functions: Smart Device Functions:
|
Search Results for "RECT" in [All]msdrmdhcpsapimisc3: Comments Tried to use the directory but the plus only changes to minus The rapi.dll section needs to be corrected. Rapi is not for running on the .NET Compact Framework, but rather for desktop applications. It does not appear possible to edit this part of the page. Great idea, thanks for creating the site. However, it does have rendering problems on Mozilla (Firefox 0.8 on Win XP to be exact). The directory tree (advapi32, gdi32 etc.) is misplaced (overlaps the "Directory" label) and I can't get them to expand. One question: The APIs here appear to be machanically created from some other source - from things like "System.Windows.Forms.NativeMethods"? The functions are present, but not the structures and data types used in the params. Any plans to do a mechanical dump of the structures as well? The real magic of marshalling is getting the param types set up correctly, which for structures can be quite a pain. How about a directory for the Compact Framework/coredll? - Ian Darling Any ideas about M3JPEG32.dll ? I'm trying to call a function from my code, but I probably don't have the correct parameters. I'll attach it in email. Thanks, Mechi Also see http://custom.programming-in.net/. I tried a couple VB .Net PInvoke's from here that didn't work. I modified them in my code and tried to correct here, but then I stumbled across the other site, that had things that made MDA happy that this site didn't. It doesn't have everything either and I got an error when I tried to submit sample code (and correction) there. Anyway, you might check there if something here is missing/doesn't work.
As long as the setup itself isn't updated, the PInvoke.net front page should not link to the setup directly, but to a page which describes the work-around. - Peter de Bruin I'd love to see all the Platform SDK headers added as HTML pages that could then be searched. Much of the time spent making a function call work is looking for the correct value of a constant or #DEFINE in a header file somewhere. dwmapiA more reliable approach to get the colorization parameters would be to implement your own method that tries to lookup each parameter directly from the Windows registry, with proper exception handling in the case a value cannot be obtained. The colorization parameters can be found under the key "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM". Please note that these are also undocumented and as such can also be changed or removed in the future.
static extern int DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out RECT pvAttribute, int cbAttribute); You cannot call this function directly. This is how to use it (VB.NET): A more reliable approach to set the colorization parameters would be to implement your own method that tries to set each parameter directly in the Windows registry and sends the WM_DWMCOLORIZATIONCOLORCHANGED message to notify all top-level windows about the change, with proper exception handling in the case a value cannot be set. The colorization parameters can be found under the key "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM". Please note that these are also undocumented and as such can also be changed or removed in the future.
public struct RECT
public RECT rcDestination;
public RECT rcSource; Structures11: ACTCTX
public string lpAssemblyDirectory;
Public lpAssemblyDirectory As String 12: AVISTREAMINFO
public RECT rcFrame;
Public rcFrame As RECT 13: BP_PAINTPARAMS
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. 15: 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: 16: COMBOBOXINFO 17: COMRECT
public class COMRECT
public COMRECT()
public COMRECT(int left, int top, int right, int bottom)
Structure COMRECT 18: COPYDATASTRUCT
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 20: 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. 21: DNS_RPC_RECORD 22: DTBGOPTS 23: 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; 25: ENHMETAHEADER
public RECT rclBounds;
public RECT rclFrame;
public IntPtr RootDirectory; 27: GRADIENT_RECT
public struct GRADIENT_RECT
public GRADIENT_RECT(uint upLeft, uint lowRight)
Public Structure GRADIENT_RECT 28: 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: 29: GUITHREADINFO
public RECT rcCaret;
Public rcCaret As RECT 30: 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) 37: 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. 38: LPNMTBCUSTOMDRAW
public RECT rcText;
Public rcText As RECT
public IntPtr RootDirectory;
Dim RootDirectory As IntPtr 40: 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 41: 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. 42: MIB_IPFORWARDROW
Direct = 3,
Indirect = 4
Direct = 3
Indirect = 4
Return DirectCast(m_state, MIB_TCP_STATE) 44: MSG 45: 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. 47: NMCUSTOMDRAW
public RECT rc;
Public rc As RECT
Return DirectCast(msg.GetLParam(GetType(NMCUSTOMDRAW)), NMCUSTOMDRAW) 48: NMHDR
Return DirectCast(msg.GetLParam(GetType(NMHDR)), NMHDR) 49: NMLVCUSTOMDRAW
public RECT rcText; 50: NMREBARCHEVRON
public RECT rc;
Public rc As RECT 51: 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; 54: 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 57: 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. 59: 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, 60: 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, Cut off search results after 60. Please refine your search. |