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 "StringBuilder" in [All]

Structures

.

                StringBuilder sb = new StringBuilder();

.

     Dim sb As New StringBuilder()

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

            var builder = new StringBuilder((int) length);

.

System.Text.StringBuilder sbDisplayName = new System.Text.StringBuilder(256);

.

using LPTSTR = System.Text.StringBuilder;

.

Imports LPTSTR = System.Text.StringBuilder

crypt32

.

static extern UInt32 CertGetNameString(IntPtr CertContext, UInt32 lType, UInt32 lFlags, IntPtr pTypeParameter, System.Text.StringBuilder str, UInt32 cch);

.

        StringBuilder Buffer = new StringBuilder(255);

.

    private static extern uint _certNameToStr(uint dwCertEncodingType, IntPtr pName, uint dwStrType, StringBuilder psz, uint csz);

.

        StringBuilder psz = null;

.

            psz = new StringBuilder((int)ret);

.

        StringBuilder ppszError);

.

    Public Shared Function CertStrToName(dwCertEncodingType As UInteger, pszX500 As String, dwStrType As UInteger, pvReserved As IntPtr, pbEncoded As Byte(), ByRef pcbEncoded As UInteger, ppszError As StringBuilder) As Boolean

.

    StringBuilder szDataDescr,

.

     ByVal szDataDescr As StringBuilder, _

Constants

.

        ' stringbuilder for converting value to text

.

        Dim winText As New StringBuilder()

.

        winText = New StringBuilder(ptrLength + 1)

hid

.

            StringBuilder Buffer,

.

         ByVal Buffer As System.Text.StringBuilder, _

.

Use of StringBuilder to create a variable to obtain the Manufacturer string instead of using MarshalAs. This approach is cleaner and doesn't require defining a Struct.

.

StringBuilder manufacturerString = new StringBuilder(128);

urlmon

.

private static extern int UrlMkGetSessionOption(int dwOption, StringBuilder pBuffer, int dwBufferLength, ref int pdwBufferLength, int dwReserved);

.

     ByVal pBuffer As StringBuilder, _

.

Dim buffer As New StringBuilder(255)

msvcrt

13: scanf
.

Use System.Text.StringBuilder instead of System.String.

.

            StringBuilder s = new StringBuilder();

.

    StringBuilder buffer,

.

    StringBuilder buffer,

.

static extern int sprintf([In,Out]StringBuilder buffer, String fmt,

.

static extern int sprintf([In,Out]StringBuilder buffer, String fmt,

.

static extern int sprintf([In,Out]StringBuilder buffer, String fmt,

.

  Public Shared Function sprintf(ByVal TargetString As System.Text.StringBuilder,

.

StringBuilder buffer = new StringBuilder(255);

.
VB.NET
Investigate the use of System.Text.StringBuilder.AppendFormat before using sprintf.

quickusb

.

private static extern int QuickUsbFindModules(StringBuilder nameList, int bufferLength);

ipaqutil

.

public static extern bool iPAQGetModelID([Out]StringBuilder lpszModelID);

.

                    StringBuilder buffer = new StringBuilder(40);

.

private static extern bool iPAQGetSerialNumber([Out] StringBuilder SerialNumber);

.

    StringBuilder sSerial = new StringBuilder(40);

setupapi

.

static extern int CM_Get_Device_IDA(int dnDevInst, StringBuilder Buffer, int BufferLen, int ulFlags);

.

        Dim sbDesc As New StringBuilder("")

.

        Dim sbHWID As New StringBuilder("")

.

static extern int CM_Request_Device_EjectA(int dnDevInst, ref int pVetoType, StringBuilder pszVetoName, int ulNameLength, int ulFlags);

.

    static extern int CM_Request_Device_Eject(UInt32 devinst, out PNP_VETO_TYPE pVetoType, System.Text.StringBuilder pszVetoName, int ulNameLength, int ulFlags);

.

        System.Text.StringBuilder sb = new System.Text.StringBuilder(255);

.

           StringBuilder sb = new StringBuilder(1024);

.

    ByVal ClassName As StringBuilder, _

.

    Dim ClassName As New StringBuilder("net")

.

    StringBuilder ClassName,

.

  StringBuilder className = null;

.

  className = new StringBuilder((int)classNameLen);

.

   StringBuilder DeviceInstanceId,

.

                StringBuilder sb = new StringBuilder(nBytes);

.

   StringBuilder winDir = new StringBuilder(256);

pdh

.

static extern UInt32 PdhLookupPerfNameByIndex(string szMachineName, uint dwNameIndex, StringBuilder szNameBuffer, ref uint pcchNameBufferSize);

.

StringBuilder buffer = new StringBuilder(1024);

kernel32

.

        out StringBuilder TargetBuffer,

.

        StringBuilder[] lpTargetBuffer,

.

        out StringBuilder ExeNameBuffer,

.

        out StringBuilder ConsoleTitle,

.

        [Out] StringBuilder lpConsoleTitle,

.

        [Out] StringBuilder lpBuffer,

.

        [Out] StringBuilder lpCharacter,

.

   [Out] StringBuilder ComputerName, ref uint nSize);

.

        StringBuilder data = new StringBuilder(500);

.

        StringBuilder data = new StringBuilder(500);

.

    public static extern int GetLocaleInfoEx(String lpLocaleName, LCTYPE LCType, StringBuilder lpLCData, int cchData);

.

    public static extern int LCIDToLocaleName(uint Locale, StringBuilder lpName, int cchName, int dwFlags);

.

    StringBuilder data = new StringBuilder(500);

.

    StringBuilder data = new StringBuilder(500);

.

    public static extern int GetLocaleInfoEx(String lpLocaleName, LCTYPE LCType, StringBuilder lpLCData, int cchData);

.

    public static extern int LCIDToLocaleName(uint Locale, StringBuilder lpName, int cchName, int dwFlags);

.

public static extern int ExpandEnvironmentStrings([MarshalAs(UnmanagedType.LPTStr)] String source, [Out] StringBuilder destination, int size);

.

                                <MarshalAs(UnmanagedType.LPTStr)>lpDst As System.Text.StringBuilder, _

.

static extern IntPtr FindFirstVolume([Out] StringBuilder lpszVolumeName,

.

  Declare Function FindFirstVolumeW Lib "kernel32.dll" (ByVal lpszVolumeName As System.Text.StringBuilder, ByVal cchBufferLength As UInteger) As IntPtr

.

    static extern FindVolumeSafeHandle FindFirstVolume([Out] StringBuilder lpszVolumeName, uint cchBufferLength);

.

    static extern bool FindNextVolume(FindVolumeSafeHandle hFindVolume, [Out] StringBuilder lpszVolumeName, uint cchBufferLength);

.

        StringBuilder volume = new StringBuilder((int)bufferLength, (int)bufferLength);

.

static extern bool FindNextVolume(IntPtr hFindVolume, [Out] StringBuilder

.

   uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer,

.

static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer, uint nSize, string[] Arguments);

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByVal lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As StringBuilder, ByVal nSize As Integer, ByVal Arguments As IntPtr) As Integer

.

        StringBuilder msgBuilder = new StringBuilder(101);

.

   uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer,

.

static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, [Out] StringBuilder lpBuffer, uint nSize, string[] Arguments);

.

Public Shared Function FormatMessage(ByVal dwFlags As Integer, ByVal lpSource As IntPtr, ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByRef lpBuffer As StringBuilder, ByVal nSize As Integer, ByVal Arguments As IntPtr) As Integer

.

        StringBuilder msgBuilder = new StringBuilder(101);

.

    [MarshalAs(UnmanagedType.LPWStr)] StringBuilder sbAppUserModelID);

.

            StringBuilder sbName = new StringBuilder((int)cchLen);

.

            sbName = new StringBuilder((int)cchLen);

.

static extern uint GetAtomName(ushort nAtom, [Out] StringBuilder lpBuffer, int nSize);

.

   StringBuilder lpBuffer, ref uint lpnSize);

.

Private Shared Function GetComputerNameEx(ByVal NameType As COMPUTER_NAME_FORMAT, ByVal lpBuffer As StringBuilder, ByRef lpnSize As UInt32) As Boolean

.

        StringBuilder lpBuffer, ref uint lpnSize);

.

        StringBuilder name = new StringBuilder(260);

.

   StringBuilder lpBuffer, ref uint lpnSize);

.

Private Shared Function GetComputerNameEx(ByVal NameType As COMPUTER_NAME_FORMAT, ByVal lpBuffer As StringBuilder, ByRef lpnSize As UInt32) As Boolean

.

        out StringBuilder lpBuffer, ref uint lpnSize);

.

        StringBuilder name = new StringBuilder(260);

.

        out StringBuilder ExeNameBuffer,

.

        StringBuilder lpConsoleTitle,

.

        StringBuilder lpConsoleTitle,

.

    [MarshalAs(UnmanagedType.LPWStr)] StringBuilder sbAppUserModelID);

.

   [Out] StringBuilder lpBuffer);

.

static extern uint GetCurrentDirectoryW(uint nBufferLength, StringBuilder lpBuffer);

.

StringBuilder nameBuffer = new StringBuilder((int)MAX_DEEP_PATH + 3);

.

static extern int GetDateFormat(uint locale, uint dwFlags, ref SystemTime date, string format, StringBuilder sb, int sbSize);

.

        string lpFormat, StringBuilder lpDateStr, int cchDate

.

        StringBuilder sb = new StringBuilder(format.Length + 16);

.

            sb = new StringBuilder(res);

.

   [Out] StringBuilder lpBuffer, uint nSize);

.

   [Out] StringBuilder lpBuffer, out StringBuilder lpFilePart);

.

Shared Function GetFullPathName(ByVal lpFileName As String, ByVal nBufferLength As Int32, <Out()> ByVal lpBuffer As System.Text.StringBuilder, <Out()> ByVal lpFilePart As System.Text.StringBuilder) As Int32

.

StringBuilder sbFull = new StringBuilder(bufsz);          // Full resolved path will go here

.

StringBuilder sbFile = new StringBuilder(bufsz);          // Filename will go here

.

   sbFull = new StringBuilder(bufsz);                 // Re-create objects w/ proper size

.

   sbFile = new StringBuilder(bufsz);                 // "

.

public static extern int GetLocaleInfoEx(String lpLocaleName, LCTYPE LCType, StringBuilder lpLCData, int cchData);

.

    StringBuilder data = new StringBuilder(500);

.

    public static extern int GetLocaleInfoEx(String lpLocaleName, LCTYPE LCType, StringBuilder lpLCData, int cchData);

.

public static extern int GetLocaleInfoEx(String lpLocaleName, LCTYPE LCType, StringBuilder lpLCData, int cchData);

.

    StringBuilder data = new StringBuilder(500);

.

    public static extern int GetLocaleInfoEx(String lpLocaleName, LCTYPE LCType, StringBuilder lpLCData, int cchData);

.

DO NOT define using a StringBuilder, because only the first string would be returned.

.

static extern uint GetLogicalDriveStrings(uint bufferLength, [Out] StringBuilder buffer);

.

//    [Out] StringBuilder lpBuffer); --- Don't do this!

.

// if we were to use the StringBuilder, only the first string would be returned

.

        StringBuilder lpszLongPath,

.

    StringBuilder builder = new StringBuilder(255);

.

        builder = new StringBuilder(result);

.

    StringBuilder lpFilename,

.

Public Function GetModuleFileName(<[In]()> ByVal hModule As IntPtr, <Out()> ByVal lpFilename As StringBuilder, <[In]()> <MarshalAs(UnmanagedType.U4)> ByVal nSize As Integer) As UInteger

.

        StringBuilder fileName = new StringBuilder(255);

.

    Dim sb As New StringBuilder

.

    Dim sb As New StringBuilder

.

   StringBuilder lpReturnedString,

.

                            ByVal lpReturnedString As StringBuilder, _

.

   StringBuilder^ lpReturnedString,

.

To avoid casting of the StringBuilder.Capacity to uint you can also declare the nSize parameter as int.

.

If you need to get all the section names by passing a null lpAppName or all the key names by passing a null lpKeyName, then you'll need to use a technique like is shown for [GetPrivateProfileSection] to handle the double null-terminated result. .NET's marshaler will truncate the StringBuilder at the first null it finds, so to get back the full double null-terminated result string, you have to manage your own memory buffer.

.

An alternative to the technique above is to use a char[] in place of a StringBuilder when you need to obtain all key names or all section names. The char[] will not truncate at the first null it finds.

.

       StringBuilder sb = new StringBuilder(500);

.

     string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);

.

                ByVal lpReturnedString As StringBuilder, _

.

    Dim sb As StringBuilder

.

    sb = New StringBuilder(500)

.

   StringBuilder lpszShortPath,

.

static extern int GetShortPathName(string pathName, System.Text.StringBuilder shortName, int cbShortName);

.

          <MarshalAs(UnmanagedType.LPTStr)> ByVal ShortPath As System.Text.StringBuilder, _

.

   Declare Unicode Function GetShortPathName Lib "kernel32.dll" Alias "GetShortPathNameW" (ByVal longPath As String, <MarshalAs(UnmanagedType.LPTStr)> ByVal ShortPath As System.Text.StringBuilder, <MarshalAs(UnmanagedType.U4)> ByVal bufferSize As Integer) As Integer

.

    System::Text::StringBuilder^ lpszShortPath,

.

    // donĀ“t allocate stringbuilder here but outside of the function for fast access

.

    StringBuilder shortNameBuffer = new StringBuilder((int)bufferSize);

.

    var sb = new StringBuilder(sz + 1);

.

      ByVal ShortPath As System.Text.StringBuilder, _

.

      Dim sb As New System.Text.StringBuilder(1024)

.

static extern uint GetSystemDirectory([Out] StringBuilder lpBuffer,

.

Public Function GetSystemDirectory(<MarshalAs(UnmanagedType.LPTSTR)>lpBuffer As System.Text.StringBuilder, _

.

    StringBuilder sbSystemDir = new StringBuilder(256);

.

    StringBuilder pwszLanguagesBuffer,

.

    StringBuilder languagesBuffer = new StringBuilder();

.

public static extern int GetSystemWow64Directory([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder lpBuffer, [MarshalAs(UnmanagedType.U4)] uint size);

.

    private static extern int GetSystemWow64Directory([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder lpBuffer, [MarshalAs(UnmanagedType.U4)] uint size);

.

    var buffer = new StringBuilder(260); // MAX_PATH

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


 
Access PInvoke.net directly from VS: