Desktop Functions: Smart Device Functions:
|
Search Results for "RECT" in [All]msvcrt1: fopen
// "incorrect" way
// "correct" way 2: memcmp
3: memcpy
new Rectangle(0, 0, width, height),
new Rectangle(0, 0, width, height), comctl324: DoReaderMode
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)
public static void Draw(this ImageList imageList, Graphics g, Rectangle bounds, int index, ImageListDrawColor bgColor, ImageListDrawColor fgColor, NativeMethods.ImageListDrawingStyle style = NativeMethods.ImageListDrawingStyle.Normal, int overlayImageIndex = 0)
public static void Draw(this ImageList imageList, Graphics g, Rectangle bounds, int index, ImageListDrawColor bgColor, ImageListDrawColor fgColor, NativeMethods.ImageListDrawingStyle style = NativeMethods.ImageListDrawingStyle.Normal, int overlayImageIndex = 0) 7: TaskDialog
static extern HRESULT TaskDialogIndirect
public static extern IntPtr TaskDialogIndirect TaskDialogIndirect(ref config, out ret, out selRadio, out setVerification);
Declare Function TaskDialogIndirect Lib "comctl32.dll" (TODO) As TODO
Private Shared Function TaskDialogIndirect(<[In]> pTaskConfig As TASKDIALOGCONFIG, <Out> ByRef pnButton As Integer, <Out> ByRef pnRadioButton As Integer, <MarshalAs(UnmanagedType.Bool), Out> ByRef pfverificationFlagChecked As Boolean) As HRESULT A full wrapper for Vista's TaskDialog & TaskDialogIndirect can be found here:
/// <summary>The TaskDialogIndirect function creates, displays, and operates a task dialog. The task dialog contains application-defined icons, messages, title, verification check box, command links, push buttons, and radio buttons. This function can register a callback function to receive notification messages.</summary>
internal static extern Result TaskDialogIndirect([In] TaskDialogConfig taskConfig, [Out] out int button, [Out] out int radioButton, [MarshalAs(UnmanagedType.Bool), Out] out bool verificationFlagChecked);
static extern HRESULT TaskDialogIndirect
public static extern IntPtr TaskDialogIndirect TaskDialogIndirect(ref config, out ret, out selRadio, out setVerification);
Declare Function TaskDialogIndirect Lib "comctl32.dll" (TODO) As TODO
Private Shared Function TaskDialogIndirect(<[In]> pTaskConfig As TASKDIALOGCONFIG, <Out> ByRef pnButton As Integer, <Out> ByRef pnRadioButton As Integer, <MarshalAs(UnmanagedType.Bool), Out> ByRef pfverificationFlagChecked As Boolean) As HRESULT A full wrapper for Vista's TaskDialog & TaskDialogIndirect can be found here:
/// <summary>The TaskDialogIndirect function creates, displays, and operates a task dialog. The task dialog contains application-defined icons, messages, title, verification check box, command links, push buttons, and radio buttons. This function can register a callback function to receive notification messages.</summary>
internal static extern Result TaskDialogIndirect([In] TaskDialogConfig taskConfig, [Out] out int button, [Out] out int radioButton, [MarshalAs(UnmanagedType.Bool), Out] out bool verificationFlagChecked); InterfacesAdd StaThread attribute to main application, for correct functionality 10: IADs
11: IAutoComplete2
/// direction as the text in its parent window. If
/// direction from the text in the parent window.</summary>
// hence the read goes directly to e.g. socket
,BINDF_DIRECT_READ = 0x00020000
,BINDSTATUS_REDIRECTING
,BINDSTATUS_DIRECTBIND
INET_E_REDIRECT_FAILED = 0x800C0014,//INET_E_REDIRECTING
INET_E_REDIRECT_TO_DIR = 0x800C0015,
string destdir=Path.GetDirectoryName(this.LocalPath);
if(!Directory.Exists(destdir))
Directory.CreateDirectory(destdir);
case HRESULTS.INET_E_REDIRECT_FAILED:
Description = "Redirect Failed.";break;
case HRESULTS.INET_E_REDIRECT_TO_DIR:
Description = "Redirect To Dir.";break; 13: IDataObject
IEnumFORMATETC EnumFormatEtc(DATADIR direction); 14: IDeskBand
int ResizeBorderDW(ref RECT rcBorder, [In, MarshalAs(UnmanagedType.IUnknown)] ref object punkToolbarSite, [MarshalAs(UnmanagedType.Bool)] bool fReserved);
BandObjectSite = DirectCast(pUnkSite, IInputObjectSite)
Explorer = DirectCast(Marshal.CreateWrapperOfType(TryCast(w, IWebBrowser), GetType(WebBrowserClass)), WebBrowserClass)
Dim boa As BandObjectAttribute() = DirectCast(t.GetCustomAttributes(GetType(BandObjectAttribute), False), BandObjectAttribute())
Dim boa As BandObjectAttribute() = DirectCast(t.GetCustomAttributes(GetType(BandObjectAttribute), False), BandObjectAttribute()) 15: IDeskBand2
int ResizeBorderDW(ref RECT rcBorder, [In, MarshalAs(UnmanagedType.IUnknown)] ref object punkToolbarSite, [MarshalAs(UnmanagedType.Bool)] bool fReserved);
BandObjectSite = DirectCast(pUnkSite, IInputObjectSite)
Explorer = DirectCast(Marshal.CreateWrapperOfType(TryCast(w, IWebBrowser), GetType(WebBrowserClass)), WebBrowserClass)
Dim boa As BandObjectAttribute() = DirectCast(t.GetCustomAttributes(GetType(BandObjectAttribute), False), BandObjectAttribute())
Dim boa As BandObjectAttribute() = DirectCast(t.GetCustomAttributes(GetType(BandObjectAttribute), False), BandObjectAttribute()) 16: IDocHostShowUI The original definition on this page marshalled the strings as UnmanagedType.BStr which I think was incorrect since the underlying type is LPOLESTR. I experienced heap corruption and instability. ShowMessage also did not appear to be called reliably. 17: IKnownFolder
void Redirect ( [In] ref Guid rfid, [In] IntPtr hwnd, [In] uint Flags,
void Redirect ( [In] ref Guid rfid, [In] IntPtr hwnd, [In] uint Flags,
/// <param name="szAppBase">[in] The root directory in which to search for the given assembly. If this value is set to null, <c>FindAssembliesByName</c> will look only in the global assembly cache for the assembly.</param>
/// <param name="szPrivateBin">[in] A list of semicolon-delimited subdirectories (for example, "bin;bin2"), under the root directory, in which to search for the assembly. These directories are probed in addition to those specified in the default probing rules.</param> 20: IObjectWithSite
/// Often, an object needs to communicate directly with a container site that is managing the
/// Defines the directions a table can have
public struct TableDirectionValues
public const string NODIRECTION = "none";
//set initial directory the my documents folder
openDialog.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
openDialog.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
openDialog.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
saveFileDialog.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
/// Sets/Gets the search direction
public int FindReplaceOptionSearchDirection
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.GetFindReplaceOptionSearchDirection),typeof(int)),CultureInfo.CurrentCulture
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.SetFindReplaceOptionSearchDirection, value));
#region Table Direction
/// Sets/Gets the direction of the table
/// <return type=string>value of direction ("LTR" (Left To Right) or "RTL" (Right To Left))</return>
public string TableDirection
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.GetTableDirection),typeof(string)),CultureInfo.CurrentCulture
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.SetTableDirection, value));
/// Gets the number of suggested corrections
/// Corrects the misspelled word
/// <param name="correct">correction of the misspelled word</param>
public void CorrectMisspelledWord(string misspelled, string correct)
if (!String.IsNullOrEmpty(misspelled) && !String.IsNullOrEmpty(correct))
object[] vaIn = { misspelled, correct };
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.CorrectMisspelledWord, vaIn));
throw new InvalidDataException("The misspelled word and the corrected word cannot be null or empty");
/// Corrects all the occurences of this misspelled word
/// <param name="misspelled">the word to correct</param>
/// <param name="correct">correction of the misspelled word</param>
public void CorrectAllOfMisspelledWord(string misspelled, string correct)
if (!String.IsNullOrEmpty(misspelled) && !String.IsNullOrEmpty(correct))
object[] vaIn = { misspelled, correct };
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.CorrectAllOfMisspelledWord, vaIn));
throw new InvalidDataException("The misspelled word and the corrected word cannot be null or empty");
#region Form Direction
/// Checks if the current direction of the form is left to right
public bool IsFormDirectionLeftToRight
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.IsFormDirectionLeftToRight),typeof(uint)),CultureInfo.CurrentCulture
/// Checks if the current direction of the form is right to left
public bool IsFormDirectionRightToLeft
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.IsFormDirectionRightToLeft),typeof(uint)),CultureInfo.CurrentCulture
#region Text Direction
/// Sets the direction of the text to be the default direction
public void SetTextDirectionDefault()
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.SetTextDirectionDefault));
/// Sets the direction of the text to be left to right
public void SetTextDirectionLeftToRight()
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.SetTextDirectionLeftToRight));
/// Sets the direction of the text to be right to left
public void SetTextDirectionRightToLeft()
ChkResult(ExecuteCommand(FormControlCommandIds.CommandIds.SetTextDirectionRightToLeft)); 22: IOleObject
void DoVerb(uint iVerb, uint lpmsg, object pActiveSite, uint lindex, uint hwndParent, uint lprcPosRect); 23: IServiceProvider The IServiceProvider defined here is different with "System.IServiceProvider". To remove name collisition, rename "IServiceProvider" to other name such as "UCOMIServiceProvider". Otherwise, you should use fully qualified namespace to the interface since you will normally use "using System" directive. 24: IShellLinkA
/// <summary>Retrieves the name of the working directory for a Shell link object</summary>
void GetWorkingDirectory([Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszDir, int cchMaxPath);
/// <summary>Sets the name of the working directory for a Shell link object</summary>
void SetWorkingDirectory([MarshalAs(UnmanagedType.LPStr)] string pszDir);
'[helpstring("Retrieves the name of the shell link working directory")]
Sub GetWorkingDirectory(<Out(), MarshalAs(UnmanagedType.LPStr)> ByVal pszDir As StringBuilder, ByVal cchMaxPath As Integer)
'[helpstring("Sets the name of the shell link working directory")]
Sub SetWorkingDirectory(<MarshalAs(UnmanagedType.LPStr)> ByVal pszDir As String) 25: IShellLinkW
/// <summary>Retrieves the name of the working directory for a Shell link object</summary>
void GetWorkingDirectory([Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cchMaxPath);
/// <summary>Sets the name of the working directory for a Shell link object</summary>
void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
''' <summary>Retrieves the name of the working directory for a Shell link object</summary>
<PreserveSig()> Function GetWorkingDirectory( _
''' <summary>Sets the name of the working directory for a Shell link object</summary>
<PreserveSig()> Function SetWorkingDirectory( _ 26: IShellView
[In, Out] ref RECT prcView,
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix"), Flags] 27: IShellView3
[In, Out] ref RECT prcView, 28: ITrayDeskband Guid {E6442437-6C68-4f52-94DD-2CFED267EFB9} leads to the correct TrayDeskband object. 29: IUnknown It is usually not necessary to call IUnknown's methods directly in your .NET code. The interop runtime code will insert the appropriate method calls for reference counting when the managed proxy objects are created and freed, and will translate typecast, "is", and "as" operators into calls to QueryInterface. 30: IViewObject
void Draw([MarshalAs(UnmanagedType.U4)] int dwDrawAspect, int lindex, IntPtr pvAspect, DVTARGETDEVICE ptd, IntPtr hdcTargetDev, IntPtr hdcDraw, COMRECT lprcBounds, COMRECT lprcWBounds, IntPtr pfnContinue, int dwContinue);
Sub Draw(<MarshalAs(UnmanagedType.U4)> ByVal dwDrawAspect As UInt32, ByVal lindex As Integer, ByVal pvAspect As IntPtr, <[In]()> ByVal ptd As IntPtr, ByVal hdcTargetDev As IntPtr, ByVal hdcDraw As IntPtr, <MarshalAs(UnmanagedType.Struct)> ByRef lprcBounds As _RECTL, <[In]()> ByVal lprcWBounds As IntPtr, ByVal pfnContinue As IntPtr, <MarshalAs(UnmanagedType.U4)> ByVal dwContinue As UInt32) odbccp32SQLInstallerError does not post error values for itself. SQLInstallerError returns SQL_NO_DATA when it is unable to retrieve any error information (in which case pfErrorCode is undefined). If SQLInstallerError cannot access error values for any reason that would normally return SQL_ERROR, SQLInstallerError returns SQL_ERROR but does not post any error values. If either the lpszErrorMsg argument is NULL or the cbErrorMsgMax is less than or equal to 0, this function returns SQL_ERROR. If the buffer for the error message is too short, SQLInstallerError returns SQL_SUCCESS_WITH_INFO and returns the correct pfErrorCode value for SQLInstallerError. rapi
public static extern bool CeCreateDirectory( function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeCreateDirectoryRAPI.asp
CeCreateDirectory("\\test", System.IntPtr.Zero); 33: CeCreateFile
34: CeFindFirstFile
Structures36: ACTCTX
public string lpAssemblyDirectory;
Public lpAssemblyDirectory As String 37: AVISTREAMINFO
public RECT rcFrame;
Public rcFrame As RECT 38: 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. 40: 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: 41: COMBOBOXINFO
42: COMRECT
public class COMRECT
public COMRECT()
public COMRECT(int left, int top, int right, int bottom)
Structure COMRECT 43: 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 45: 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. 46: DNS_RPC_RECORD
47: DTBGOPTS
48: 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; 50: ENHMETAHEADER
public RECT rclBounds;
public RECT rclFrame;
public IntPtr RootDirectory; 52: GRADIENT_RECT
public struct GRADIENT_RECT
public GRADIENT_RECT(uint upLeft, uint lowRight)
Public Structure GRADIENT_RECT 53: 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: 54: GUITHREADINFO
public RECT rcCaret;
Public rcCaret As RECT 55: 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. Cut off search results after 60. Please refine your search. |