Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "SIZE" in [All]

gsapi

.

        gsapi_revision(ref version, Marshal.SizeOf(version));

.

    Declare Auto Function gsapi_revision Lib "gsdll32.dll" (ByRef pVer As GSVersion, ByVal pSize As Integer) As Integer

.

        gsapi_revision(ref gsVer, Marshal.SizeOf(gsVer));

.

    lResult = gsapi_revision(lVer, Marshal.SizeOf(lVer))

coredll

.

cHandles should be set to the size of the IntPtr array.

.

  notificationTrigger.Size = (UInt32)Marshal.SizeOf( notificationTrigger ); // This line needs the compile switch /unsafe

.

  notificationTrigger.Size = (UInt32)Marshal.SizeOf( notificationTrigger ); // This line needs the compile switch /unsafe

.

    public UInt32 Size = 0;

.

     [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]

.

     public short dmSize;

.

     public short dmPaperSize;

.

     [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]

.

        public short dmSize;

.

        short dmPaperSize;

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]

.

        devmode.dmSize = (short)Marshal.SizeOf(typeof(DEVMODE));

.

        devmode.dmSize = (short)Marshal.SizeOf(typeof(DEVMODE));

.

    Public Sub New(ByVal size As Integer)

.

        m_data = New Byte(size - 1) {}

.

        dmSize = CUShort(Data.Length)

.

    Public Property dmSize() As UShort

.

    Public Property dmPaperSize() As Short

.

    public uint dwXSize;

.

    public uint dwYSize;

.

            int nInBufferSize,

.

            int nOutBufferSize,

.

                         ByVal lpInBuffer As String, ByVal nInBufferSize As Integer, _

.

                         ByVal lpOutBuffer() As Byte, ByVal nOutBufferSize As Integer, _

.

        int inSize = sizeof(int) * inBuffer.Length;

.

        int outSize = sizeof(int) * outBuffer.Length;

.

        if (!NativeMethods.DeviceIoControl(file, controlCode, inBuffer, inSize, outBuffer, outSize, ref bytesReturned, IntPtr.Zero))

.

    uint size = 12;

.

    byte[] vpm = new byte[size];

.

    //structure size

.

    BitConverter.GetBytes(size).CopyTo(vpm, 0);

.

    ExtEscapeSet(hdc, SETPOWERMANAGEMENT, size, vpm, 0, IntPtr.Zero);

.

        uint size = 12;

.

        byte[] vpm = new byte[size];

.

        //structure size

.

        BitConverter.GetBytes(size).CopyTo(vpm, 0);

.

        ExtEscapeSet(hdc, SETPOWERMANAGEMENT, size, vpm, 0, IntPtr.Zero);

.

    public const int SWP_NOSIZE = 0x0001;

.

    Public Const SWP_NOSIZE As Integer = &H1

.

        int dwMessageId, int dwLanguageId, System.Text.StringBuilder lpBuffer, int nSize, IntPtr[] Arguments);

.

        int dwMessageId, int dwLanguageId, System.Text.StringBuilder lpBuffer, int nSize, IntPtr[] Arguments);

.

    int appDataSize = AppData.Length;

.

    uint SizeOut = 20;

.

    GetDeviceUniqueID(AppData, appDataSize, 1, DeviceOutput, out SizeOut);

.

static extern int GetModuleFileNameEx(IntPtr hProcess, IntPtr hModule, StringBuilder lpFilename, int nSize);

.

Declare Function GetModuleFileNameEx Lib "coredll.dll" (ByVal hProcess As IntPtr, ByVal hModule As IntPtr, ByVal lpFileName As System.Text.StringBuilder, ByVal nSize As Int32) As Int32

.

static extern int GetModuleFileNameEx(IntPtr hProcess, IntPtr hModule, StringBuilder lpFilename, int nSize);

.

Declare Function GetModuleFileNameEx Lib "coredll.dll" (ByVal hProcess As IntPtr, ByVal hModule As IntPtr, ByVal lpFileName As System.Text.StringBuilder, ByVal nSize As Int32) As Int32

.

        public int dwPageSize;

.

        public int dwPageSize;

.

static extern bool GetSystemMemoryDivision(ref uint lpdwStorePages, ref uint lpdwRamPages, ref uint lpdwPageSize);

.

    ByRef ldpwPageSize As UInt32) As Integer

.

    ref UInt32 lpdwPageSize

.

The return is the size of the structure. It returns 0 if there was an error.

.

if (GetSystemPowerStatusEx2(SystemPowerStatusEx2, Marshal.SizeOf(SystemPowerStatusEx2), true) > 0) {

.

The return is the size of the structure. It returns 0 if there was an error.

.

if (GetSystemPowerStatusEx2(ref SystemPowerStatusEx2, Marshal.SizeOf(SystemPowerStatusEx2), true) > 0) {

.

    public static extern bool GetTextExtentExPointW(IntPtr hDc, string lpString, int nLength, int nMaxExtent, int[] lpnFit, int[] alpDx, out Size size);

.

        Size sz;

.

    ''' size of the structure

.

    ''' <remarks> ms.dwLength = Marshal.SizeOf(ms)</remarks>

.

    /// Size of the structure

.

    /// Total size in bytes of physical memory

.

    /// Available size in bytes of physical memory

.

    /// Total size in bytes of page file memory

.

    /// Available size in bytes of page file memory

.

    /// Total size in bytes of virtual memory

.

    /// Available size in bytes of virtual memory

.

    ms.dwLength = Marshal.SizeOf(ms)

.

internal static extern bool KernelIoControl(int dwIoControlCode, byte[] inBuf, int inBufSize, byte[] outBuf, int outBufSize, ref int bytesReturned);

.

        /// <param name="nInBufSize">Size, in bytes, of lpInBuf.</param>

.

        /// <param name="nOutBufSize">Maximum number of bytes that can be returned in

.

        /// <param name="lpBytesReturned">Address of a DWORD that receives the size,

.

            uint nInBufSize,

.

            uint nOutBufSize,

.
Summary
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function (from msdn.microsoft.com)
.

     public uint dwTotalSize;

.

     public uint dwNeededSize;

.

     public uint dwUsedSize;

.

        public uint Size;

.

            notdata.Size = 152;

.

private const int ERROR_INVALID_SIZE = RASBASE + 32;

.

        tempConn[0].dwSize = Marshal.SizeOf(typeof(RASCONN));

.

        int lpcb = tempConn[0].dwSize;

.

        if (ret == ERROR_INVALID_SIZE)

.

        allConnections = new RASCONN[lpcb / Marshal.SizeOf(typeof(RASCONN))];

.

        private UInt32 m_size;

.

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = RAS_MaxEntryName + 1)]

.

        obj.m_size = System.Convert.ToUInt32(Marshal.SizeOf(typeof(_RASCONN)));

.

        UInt32 size = 0, noelements = 0;

.

        size = System.Convert.ToUInt32(Marshal.SizeOf((rasconn = new _RASCONN[1])[0] = _RASCONN.CreateStruct()));

.

        if (RasEnumConnections(rasconn, ref size, ref noelements) != 0x00)

.

            size = System.Convert.ToUInt32(Marshal.SizeOf((rasconn = new _RASCONN[size / Marshal.SizeOf(typeof(_RASCONN))])[0] =                         _RASCONN.CreateStruct()) * rasconn.Length);

.

            if (RasEnumConnections(rasconn, ref size, ref noelements) != 0x00) { rasconn = null; }

.

        public UInt32 dwSize;

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxDeviceType + 1)]

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxDeviceName + 1)]

.

        status.dwSize = (UInt32)Marshal.SizeOf(status);

.

static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

        public static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

    /// 9 COLOR_CAPTIONTEXT Color of the text in a title bar and of the size box and scroll bar arrow box.

.
Summary
.

This function takes one argument - size of storage in memory pages. It returns result code that could be:

.

    private static extern int GetSystemMemoryDivision(ref int storage, ref int ram, ref int pageSize);

.

        int pageSize=0;

.

        int result = GetSystemMemoryDivision( ref storage, ref ram, ref pageSize);

.

        edtPages.Text = string.Format("Get Mem result {0} storage {1} ram {2} pagesize {3}", result, storage, ram, pageSize);

.

    Me.Button1.Size = New System.Drawing.Size(128, 64)

.

     this.Button1.Size = new System.Drawing.Size(128, 64);

.
Summary
This function changes the size, position, and z-order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the z-order.
.

    public const int SWP_NOSIZE = 0x0001;

.

    Public Const SWP_NOSIZE As Integer = &H1

.

        /// <summary>Applies new frame styles set using the SetWindowLong function. 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>

.

        /// contents of the client area are saved and copied back into the client area after the window is sized or

.

        /// <summary>Retains the current size (ignores the cx and cy parameters).</summary>

.

        /// <remarks>SWP_NOSIZE</remarks>

.

        IgnoreResize = 0x0001,

.

            SetWindowPosFlags.IgnoreResize);

.

ByVal uSize As Integer) As Integer

.

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]

.

            testFormat.cbSize = 0;

.

            public ushort cbSize;          

.

     private static extern void memset(IntPtr dest, int c, int size);

.

           memset(gc.AddrOfPinnedObject(), 0, Marshal.SizeOf(o));

fbwflib

.
Summary
Signals an event when the available write cache falls below a specified size.
.

     ref  UInt32 size);

.

uint size = 100;

.

var pBuffer = Marshal.AllocHGlobal((int)size);

.

var returnCode = NativeFbwfMethods.FbwfGetExclusionList(protectedVolume, true, pBuffer, ref size);

.

     ref  UInt32 size);

.

uint size = 100;

.

var pBuffer = Marshal.AllocHGlobal((int)size);

.

NativeMethods.FbwfGetVolumeList(true, pBuffer, ref size);

msi

.

            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);

.

    public int dwFileHashInfoSize;

.

        // Set the dwFileHashInfoSize to 20 i.e. 5*4

.

        MSIFILEHASHINFO msifilehashinfo = new MSIFILEHASHINFO { dwFileHashInfoSize = 20 };

.

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);

.

static extern int MsiRecordDataSize(IntPtr hRecord, int iField);

.
Documentation
[MsiRecordDataSize] on MSDN

MinCore

.
Summary
.

static extern int GetFileVersionInfoSize(string fileName, [Out]IntPtr dummy);

.

Declare Function GetFileVersionInfoSize Lib "Api-ms-win-core-version-l1-1-0.dll" (fileName As String, <Out> dummy As IntPtr) As Integer

.

Use this declaration on Windows 10. On previous versions use http://pinvoke.net/default.aspx/version/GetFileVersionInfoSize.html

.

GetFileVersionInfoSize(@"c:\someFolder\someFile.dll", IntPtr.Zero);

.
Documentation
[GetFileVersionInfoSize] on MSDN

odbc32

.

    private const short DEFAULT_RESULT_SIZE = 1024;

.

        StringBuilder outString = new StringBuilder(DEFAULT_RESULT_SIZE);

.

                DEFAULT_RESULT_SIZE, out lenNeeded))

.

                if (DEFAULT_RESULT_SIZE < lenNeeded)

.

        short error_size;

.

            out error_size)))

.

        int size;

.

        short rc = SQLGetData(statementHandle, colid, SQL_C_CHAR, val, val.Capacity, out size);

misc

.

DWORD __stdcall CodecRead(int hRadio, void *Buf, DWORD Size);

53: FAQ
.

For pointer-sized entities such as handles, they must be defined such that they will be 32 bits on a 32-bit machine and 64 bits on a 64-bit machine. IntPtr (or UIntPtr) accomplishes this. The use of int will appear to be fine if you only run the code on a 32-bit machine, but will likely cause your application/component to crash as soon as it gets on a 64-bit machine.

gdiplus

.

   int length, HandleRef fontFamily, int style, float emSize,

.

static extern int GdipComment(HandleRef graphics, int sizeData, byte[] data);

.

    /// <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, _

oleacc

.

        SIZEGRIP = 0xFFFFFFF9,

.

    Private Shared Function GetRoleText(ByVal role As Integer, ByVal outRole As StringBuilder, ByVal outRoleSize As Integer) As Integer

mapi32

.

        int size = Marshal.SizeOf(typeof(MapiFileDesc));

.

        IntPtr intPtr = Marshal.AllocHGlobal(size);

.

        ptr += size;

winscard

.

    // ref int nStringSize);

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: