Desktop Functions: Smart Device Functions:
|
Search Results for "SIZE" in [All]winmm
static extern Int32 mciGetErrorString(Int32 errorCode, StringBuilder errorText, Int32 errorTextSize);
Public Declare Auto Function mciGetErrorString Lib "winmm.dll" (ByVal errorCode As Integer, ByRef errorText As StringBuilder, ByVal errorTextSize As Integer) As Integer
static extern Int32 mciSendString(string command, StringBuilder buffer, int bufferSize, IntPtr hwndCallback);
Private Shared Function mciSendString(ByVal command As String, ByVal buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hwndCallback As IntPtr) As Integer
Declare Ansi Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal command As String, ByRef buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hWndCallback As IntPtr) As Integer
static extern Int32 mciSendString(string command, string buffer, int bufferSize, IntPtr hwndCallback); 3: MIDIHDR
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] Use (uint)Marshal.SizeOf(typeof(MIDIINCAPS)) for cbMidiInCaps. 5: MIDIOUTCAPS
[MarshalAs(UnmanagedType.ByValTStr, SizeConst= 32)] int result = midiOutGetDevCaps(deviceID, ref outCaps, Marshal.SizeOf(outCaps)); Use (uint)Marshal.SizeOf(typeof(MIDIOUTCAPS)) for cbMidiOutCaps.
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
midiOutGetDevCaps((UIntPtr) x, out caps, (uint)Marshal.SizeOf(typeof(MIDIOUTCAPS)));
/// <summary>size in bytes of MIXERCONTROLDETAILS</summary>
public UInt32 StructSize
/// <summary>size of _one_ details_XX struct</summary>
public UInt32 DetailsItemSize
private static extern uint MixerGetDevCaps(int mixerId, ref MixerCaps mixerCaps, int mixerCapsSize);
Private Shared Function MixerGetDevCaps(ByVal mixerId As Integer, ByRef mixerCaps As MixerCaps, ByVal mixerCapsSize As Integer) As UInteger
private static extern uint MixerGetDevCaps(int mixerId, ref MixerCaps mixerCaps, int mixerCapsSize);
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
uint result = MixerGetDevCaps(mixerId, ref caps, Marshal.SizeOf(caps));
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MixerXPNative.MIXER_SHORT_NAME_CHARS)]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MixerXPNative.MIXER_LONG_NAME_CHARS)]
/// <summary>size in bytes of <see cref="MIXERCONTROL">MIXERCONTROL</see></summary>
public UInt32 StructSize
/// <summary>size in bytes of custom data</summary> 10: timeGetDevCaps
UInt32 sizeTimeCaps ); Declare Function timeGetDevCaps Lib "winmm.dll" (ByRef lpTimeCaps As TimeCaps, ByVal uSize As UInt32) As UInt32
static extern UInt32 timeGetSystemTime( ref MmTime mmTime, UInt32 sizeMmTime );
ByVal uSize As Integer) As Integer
<System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=32)> _
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 32)] Remember to have the strings marshaled as ByValTStr with size of 32.
waveOutGetDevCaps(i, wc, System.Runtime.InteropServices.Marshal.SizeOf(wc))
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
waveOutGetDevCaps(uDeviceID, ref waveOutCaps, Marshal.SizeOf(typeof(WAVEOUTCAPS)));
waveInGetDevCaps(uDeviceID, ref waveInCaps, Marshal.SizeOf(typeof(WAVEINCAPS)));
/// <param name="cchText">The size of the string</param> 14: waveOutOpen See http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/thread/14926e01-635e-4360-998b-ec6124d888a7 - correct C# signature at the bottom (including uDeviceId). This is based on http://msdn.microsoft.com/en-us/library/windows/desktop/dd743866%28v=vs.85%29.aspx which shows a UINT_PTR for that parameter. Note that the _PTR parameters are the only ones that are different sizes in 32 vs. 64 bit mode. In .Net you use IntPtr for that purpose.
public static extern uint waveOutPrepareHeader(IntPtr hWaveOut, IntPtr pwh, int uSize);
waveHdrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(waveHdr));
waveHdr.dwBufferLength = wf.nSamplesPerSec * wf.nBlockAlign; // it's size
if ((MMRESULT = waveOutPrepareHeader(waveDevice, waveHdrPtr, Marshal.SizeOf(waveHdr))) != MMSYSERR_NOERROR)
if ((MMRESULT = waveOutWrite(waveDevice, waveHdrPtr, Marshal.SizeOf(waveHdr))) != MMSYSERR_NOERROR)
if ((MMRESULT = waveOutUnprepareHeader(waveDevice, waveHdrPtr, Marshal.SizeOf(waveHdr))) != MMSYSERR_NOERROR) msi16: MsiEnumProducts
uint valueSize = 1024;
var valueProductName = new string(new char[valueSize]);
MsiInterop.MsiGetProductInfo(code, MsiInstallerProperty.ProductName, valueProductName, ref valueSize);
uint valueSize = 1024;
var valueProductName = new string(new char[valueSize]);
MsiInterop.MsiGetProductInfo(code, MsiInstallerProperty.ProductName, valueProductName, ref valueSize); 18: MsiGetFileHash
public int dwFileHashInfoSize;
// Set the dwFileHashInfoSize to 20 i.e. 5*4
MSIFILEHASHINFO msifilehashinfo = new MSIFILEHASHINFO { dwFileHashInfoSize = 20 }; 19: MsiGetProperty int stringSize = 256; int value = MsiGetProperty(handle, "ProductVersion", out sb, ref stringSize);
static extern uint MsiProvideAssembly(string assembly, string context, uint mode, int info, System.Text.StringBuilder path, ref int pathSize); twain_3222: TwIdentity
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=34)> _
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=34)> _
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=34)> _ gdiplus
int length, HandleRef fontFamily, int style, float emSize, 24: GdipComment
static extern int GdipComment(HandleRef graphics, int sizeData, byte[] data); 25: GdipEmfToWmfBits
/// <param name="_bufferSize">
/// The size of the buffer used to store the Windows Metafile bits returned
static extern IntPtr GdipEmfToWmfBits(HandleRef hEmf, uint uBufferSize,
ByVal bufferSize as UInteger, ByVal buffer() as byte, ByVal mappingMode as Integer, _ urlmon26: CopyMemory
// const int size = 200;
// IntPtr memorySource = Marshal.AllocHGlobal(size);
// IntPtr memoryTarget = Marshal.AllocHGlobal(size);
// CopyMemory(memoryTarget,memorySource,size);
int size = data.Length * sizeof(int);
byte[] dst = new byte[size]
fixed (byte* pd = dst){ fixed(int* ps = data){ CopyMemory(pd, ps, size); } }
BitConverter.ToInt32(dst, dst.GetUpperBound(0) - sizeof(int)) == data[data.GetUpperBound(0)]); 27: FindMimeFromData
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I1, SizeParamIndex=3)]
int cbSize,
<MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.I1, SizeParamIndex:=3)> ByVal _
ByVal cbSize As Integer, _
cbSize As Long, _ user32If the system must increase the size of the multiple-window- position structure beyond the initial size specified by the nNumWindows parameter but cannot allocate enough memory to do so, the system fails the entire window positioning sequence (BeginDeferWindowPos
d.cb = Marshal.SizeOf(d);
public uint size;
Public cbSize As UInteger
filterStatus.size= (uint) Marshal.SizeOf(filterStatus); 31: ClientToScreen
width = button.Size.Width;
height = button.Size.Height; 32: CreatePopupMenu
mii.cbSize = 48;
sep.cbSize = 48;
mii.cbSize = 48; 33: CreateWindow
mStuctLength = Marshal.SizeOf(typeof(SecurityAttributes)); 34: CreateWindowEx
Win32.CW_USEDEFAULT, // initial x size
Win32.CW_USEDEFAULT, // initial y size
///<Summary>Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.</Summary>
///<Summary>Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned.</Summary>
///<Summary>Retains the current size (ignores the cx and cy parameters).</Summary>
SWP_NOSIZE = 0x0001,
'''<Summary>Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.</Summary>
'''<Summary>Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned.</Summary>
'''<Summary>Retains the current size (ignores the cx and cy parameters).</Summary>
SWP_NOSIZE = &H0001
SWP_NOSIZE As Integer = &H0001 36: DeleteMenu
internal const UInt32 SC_SIZE =0xF000;
SC_SIZE = &HF000 37: DragDetect
Size range = new Size(Math.Abs(newPt.X - pt.X), Math.Abs(newPt.Y - pt.Y));
if (range.Height > SystemInformation.DragSize.Height
|| range.Width > SystemInformation.DragSize.Width)
public RECT(System.Drawing.Point location, System.Drawing.Size size)
Right = location.X + size.Width;
Bottom = location.Y + size.Height;
RECT from = new RECT(form.Location, form.Size);
(System.Windows.Forms.SystemInformation.FrameBorderSize.Height * 2);
RECT(System::Drawing::Point location, System::Drawing::Size size) {
Right = location.X + size.Width;
Bottom = location.Y + size.Height;
RECT^ from=gcnew RECT(this->Location, this->Size);
/// Size grip in lower-right corner of window
DFCS_SCROLLSIZEGRIP = 8,
/// Size grip in lower-left corner of window. This is used with right-to-left languages such as Arabic or Hebrew.
DFCS_SCROLLSIZEGRIPRIGHT = 0x10, The buttons are drawn by vectors so to draw a "menu" close icon simply draw a DFCS_CAPTIONCLOSE button with the size of SM_CXMENUCHECK/SM_CYMENUCHECK.
d.cb=Marshal.SizeOf(d);
d.cb=Marshal.SizeOf(d);
dispDev1.cb = Marshal.SizeOf(dispDev1)
mi.size = (uint)Marshal.SizeOf(mi); 42: FlashWindow
public UInt32 cbSize;
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
Public cbSize As Long
.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(fwi) 43: FlashWindowEx
public UInt32 cbSize;
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
Public cbSize As Long
.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(fwi) 44: GetAsyncKeyState The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a KeyboardKey class to detect keyboard state and synthesize keyboard events. 45: GetClassInfo Be sure to set cbSize member of WNDCLASSEX structure before calling the GetClassInfoEx function.
WNDCLASSEX wndClass = new WNDCLASSEX { cbSize = (uint)Marshal.SizeOf(typeof(WNDCLASSEX)) }; 46: GetClassInfoEx Be sure to set cbSize member of WNDCLASSEX structure before calling the GetClassInfoEx function.
WNDCLASSEX wndClass = new WNDCLASSEX { cbSize = (uint)Marshal.SizeOf(typeof(WNDCLASSEX)) }; 47: GetClassLong
if (IntPtr.Size > 4)
If IntPtr.Size > 4 Then Testing the size of the IntPtr is the easiest way to determine if the platform is 64-bit. 48: GetClassLongPtr
if (IntPtr.Size > 4)
If IntPtr.Size > 4 Then Testing the size of the IntPtr is the easiest way to determine if the platform is 64-bit. 49: GetClipboardData
UIntPtr Length = GlobalSize(ClipboardDataPointer); 50: GetComboBoxInfo
public Int32 cbSize;
Public cbSize As Int32
cbi.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cbi);
cbi.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cbi) 51: GetCursorInfo
public Int32 cbSize; // Specifies the size, in bytes, of the structure.
// The caller must set this to Marshal.SizeOf(typeof(CURSORINFO)).
/// <summary>Must initialize cbSize</summary>
pci.cbSize = Marshal.SizeOf(typeof(CURSORINFO)); 52: GetDesktopWindow
ByVal location As Point, ByVal size As Size) As Image
Dim myImage As Image = New Bitmap(size.Width, size.Height)
BitBlt(destDeviceContext, 0, 0, size.Width, size.Height, _
ByVal area As System.Drawing.Size) _ 53: GetGUIThreadInfo
public int cbSize;
public IntPtr hwndMoveSize;
threadInfo.cbSize = Marshal.SizeOf( threadInfo );
public int cbSize;
public int hwndMoveSize;
guiThreadInfo.cbSize = Marshal.SizeOf(guiThreadInfo);
public int cbSize;
public IntPtr hwndMoveSize;
info.cbSize = Marshal.SizeOf(info); 54: GetKeyNameText
int nSize); The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a KeyboardKey class to detect keyboard state and synthesize keyboard events. It can also give you names of keys. 55: GetLastInputInfo
size : int
lastInputInfo.cbSize = (uint)Marshal.SizeOf( lastInputInfo );
lastInputInf.cbSize = Marshal.SizeOf(lastInputInf)
lastInputInfo.cbSize = (UInt32)Marshal::SizeOf(lastInputInfo);
let size = Marshal.SizeOf (typeof<LastInputInfo>)
let mutable info = { size = size; dwTime = 0u }
lastInputInfo.cbSize = sizeof (lastInputInfo); 56: GetMenuBarInfo Make sure you set pmbi.cbSize to Marshal.SizeOf(typeof(MENUBARINFO)) before calling this function. 57: GetMenuItemInfo
public uint cbSize;
mif.cbSize = (uint)Marshal.SizeOf(typeof(MENUITEMINFO)); 58: GetMonitorInfo
mon_info.cbSize = (uint)Marshal.SizeOf(mon_info);
static extern int GetMouseMovePointsEx(uint cbSize, [In] ref MOUSEMOVEPOINT
uint cbSize,
int cpt = GetMouseMovePointsEx((uint)(Marshal.SizeOf(mp_in)), ref mp_in, mp_out, nNumPointsRequired, mode); 60: GetRawInputData
/// <param name="pcbSize">Number of bytes in the array.</param>
/// <param name="cbSizeHeader">Size of the header.</param>
public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, out RAWINPUT pData, ref int pcbSize, int cbSizeHeader);
/// <param name="pcbSize">Number of bytes in the array.</param>
/// <param name="cbSizeHeader">Size of the header.</param>
public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, byte[] pData, ref int pcbSize, int cbSizeHeader);
int outSize = 0;
int size = Marshal.SizeOf(typeof(RAWINPUT));
outSize = Win32API.GetRawInputData(m.LParam, RawInputCommand.Input, out input, ref size, Marshal.SizeOf(typeof(RAWINPUTHEADER)));
if (outSize != -1) Cut off search results after 60. Please refine your search. |