Desktop Functions: Smart Device Functions:
|
Search Results for "RECT" in [All]coredll
Dim AppPathOnly As String = System.IO.Path.GetDirectoryName(FullAppName)
SetUInt32(offset, DirectCast(Val, UInt32))
SetStringUni(DirectCast(Val, String), offset, DirectCast(Val, String).Length)
'Return DirectCast(GetUInt32(72), DM_Fields)
'Return DirectCast(GetInt16(76), DM_Orient)
'Return DirectCast(GetUInt32(188), DMD) 3: CreateEvent
' This code added by Visual Basic to correctly implement the disposable pattern.
string lpCurrentDirectory,
static extern bool GetDiskFreeSpaceEx(string lpDirectoryName,
ByVal lpDirectoryName As String, _
(ByVal lpDirectoryName As String, _ 6: GetLastError It is recommended that you do not call the Win32 GetLastError method directly. Because of the way P/Invoke works, the error message may get reset between Win32 calls in your code. Instead, call the Marshal.GetLastWin32Error method, which can be combined with the ever useful Marshal.ThrowExceptionForHR method. See below for an example.
// close IME(direct input for Alphabet and Number)
/// Invalidates a rectangle for a given window
/// <param name="rect">Rectangle to invalidate</param>
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public extern static void InvalidateRect( IntPtr handle, Rectangle rect, bool erase );
/// Invalidates a rectangle for a given control
/// <param name="rect">Rectangle to invalidate</param>
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public static void InvalidateRect( Control control, Rectangle rect, bool erase )
InvalidateRect( control.Handle, rect, erase );
internal extern static void InvalidateRect( IntPtr handle, IntPtr dummy, bool erase );
/// <param name="erase">Rectangle to invalidate</param>
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public static void InvalidateRect( IntPtr handle, bool erase )
InvalidateRect( handle, IntPtr.Zero, erase );
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public static void InvalidateRect( Control control, bool erase )
InvalidateRect( control.Handle, IntPtr.Zero, erase );
/// Invalidates a rectangle for a given window
/// <param name="rect">Rectangle to invalidate</param>
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public extern static void InvalidateRect( IntPtr handle, Rectangle rect, bool erase );
/// Invalidates a rectangle for a given control
/// <param name="rect">Rectangle to invalidate</param>
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public static void InvalidateRect( Control control, Rectangle rect, bool erase )
InvalidateRect( control.Handle, rect, erase );
internal extern static void InvalidateRect( IntPtr handle, IntPtr dummy, bool erase );
/// <param name="erase">Rectangle to invalidate</param>
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public static void InvalidateRect( IntPtr handle, bool erase )
InvalidateRect( handle, IntPtr.Zero, erase );
/// <remarks>See the documentation for the WinCE version of InvalidateRect</remarks>
public static void InvalidateRect( Control control, bool erase )
InvalidateRect( control.Handle, IntPtr.Zero, erase ); 10: KernelIoControl
private const uint METHOD_IN_DIRECT = 1;
private const uint METHOD_OUT_DIRECT = 2; 11: Le8mEr It is necessary to search correctly. By the way, who to share the helpful information? Where it is possible to find? , 12: PlaySound (correct function is in coredll)
throw new Exception("RAS: error retrieving correct connection count"); 14: Rectangle
[DllImport("coredll", EntryPoint="Rectangle", SetLastError=true)]
private static extern uint RectangleCE(IntPtr hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
Declare Function Rectangle Lib "coredll.dll" (TODO) As TODO
const int CSIDL_FAVORITES = 0x0006; //The file system directory that serves as a common repository for the user's favorite items.
const int CSIDL_PERSONAL = 0x0005; //The file system directory that serves as a common repository for documents.
const int CSIDL_PROGRAMS = 0x0002; //The file system directory that contains the user's program groups, which are also file system directories.
const int CSIDL_STARTUP = 0x0007; //The file system directory that corresponds to the user's Startup program group. The system starts these programs when a device is powered on. 16: WinIOCTL
public const uint METHOD_IN_DIRECT = 1;
public const uint METHOD_OUT_DIRECT = 2; fbwflib17: FbwfAddExclusion
msi20: MsiGetSourcePath
21: MsiGetTargetPath
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; 23: MsiSetTargetPath
odbc3224: SQLDataSources
/// <param name="Direction">[Input] Determines which data source the Driver Manager returns information on.</param>
static extern short SQLDataSources(IntPtr EnvironmentHandle, short Direction,
Declare Function SQLDataSources Lib "odbc32.dll" (ByVal EnvironmentHandle As Integer, ByVal Direction As Short, _ Depending on the value of Direction, you may access System DSN, User DSN or both. Since the same DSN name may be used in User and System DSN, watch out for possible duplicate values. 25: SQLExecDirect
static extern short SQLExecDirect (int statementHandle,
Private Shared Function SQLExecDirect(ByVal statementHandle As IntPtr, ByVal statementText As String, _ misc26: 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. gdiplus
static extern int GdipAddPathRectanglesI(HandleRef path,
HandleRef rects, int count);
Declare Function GdipAddPathRectanglesI Lib "gdiplus.dll" (TODO) As TODO
static extern int GdipAddPathRectangleI(HandleRef path, int x, int y,
Declare Function GdipAddPathRectangleI Lib "gdiplus.dll" (TODO) As TODO
static extern int GdipAddPathRectangles(HandleRef path,
HandleRef rects, int count);
Declare Function GdipAddPathRectangles Lib "gdiplus.dll" (TODO) As TODO
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
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); mapi3237: MAPILogon The calling application's working directory may be changed after using this function. string currentDirectory = System.IO.Directory.GetCurrentDirectory(); // Restore the proper working directory. System.IO.Directory.SetCurrentDirectory (currentDirectory); winscard39: SCardConnect SCARD_SHARE_DIRECT = 0x00000003 - Direct control of the reader, even without a card Structures40: ACTCTX
public string lpAssemblyDirectory;
Public lpAssemblyDirectory As String 41: AVISTREAMINFO
public RECT rcFrame;
Public rcFrame As RECT 42: 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. 44: 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: 45: COMBOBOXINFO
46: COMRECT
public class COMRECT
public COMRECT()
public COMRECT(int left, int top, int right, int bottom)
Structure COMRECT 47: 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 49: 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. 50: DNS_RPC_RECORD
51: DTBGOPTS
52: 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; 54: ENHMETAHEADER
public RECT rclBounds;
public RECT rclFrame;
public IntPtr RootDirectory; 56: GRADIENT_RECT
public struct GRADIENT_RECT
public GRADIENT_RECT(uint upLeft, uint lowRight)
Public Structure GRADIENT_RECT 57: 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: 58: GUITHREADINFO
public RECT rcCaret;
Public rcCaret As RECT 59: IMAGEINFO
public RECT rcImage;
Public rcImage As RECT
public struct IMAGE_DATA_DIRECTORY
Public Structure IMAGE_DATA_DIRECTORY
Public Type IMAGE_DATA_DIRECTORY Cut off search results after 60. Please refine your search. |