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
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "GetPrivateProfile" in [All]

odbccp32

.

static extern int SQLGetPrivateProfileString(string lpszSection, string lpszEntry, string lpszDefault, [Out] char[] retBuffer, int cbRetBuffer, string lpszFileName);

.

Declare Function SQLGetPrivateProfileString Lib "odbccp32.dll" (TODO) As TODO

.

    SQLGetPrivateProfileString(dataSourceName, "Driver", "", value, value.Length, "odbc.ini");

.
Documentation
[SQLGetPrivateProfileString] on MSDN
.

    SQLGetPrivateProfileString(dataSourceName, "Driver", "", value, value.Length, "odbc.ini");

kernel32

.
Summary
.

static extern uint GetPrivateProfileInt(string lpAppName, string lpKeyName,

.

[DllImport("KERNEL32.DLL", CharSet=CharSet::Auto, EntryPoint="GetPrivateProfileInt")]

.

static UInt32 GetPrivateProfileInt(String^ lpAppName, String^ lpKeyName, Int32 nDefault, String^ lpFileName);

.

    <DllImport("kernel32.dll", SetLastError:=True, EntryPoint:="GetPrivateProfileIntA")> _

.

    Public Shared Function GetPrivateProfileInt( _

.

    Declare Function GetPrivateProfileInt Lib "kernel32.dll" _

.

     Alias "GetPrivateProfileIntA" (ByVal lpApplicationName _

.
Documentation
[GetPrivateProfileInt] on MSDN
.

    Shared Function GetPrivateProfileSection( ByVal lpAppName As String, _

.

static extern uint GetPrivateProfileSection(string lpAppName, IntPtr lpszReturnBuffer,

.

    Dim len As Int32 = GetPrivateProfileSection("AppName", ptr, 1024, IniPath)

.

static extern uint GetPrivateProfileSection(string lpAppName, IntPtr lpszReturnBuffer,

.

    uint bytesReturned = GetPrivateProfileSection("AppName", pReturnedString, MAX_BUFFER, m_iniFile);

.
Documentation
[GetPrivateProfileSection] on MSDN
.

    Shared Function GetPrivateProfileSectionNames( _

.

static extern uint GetPrivateProfileSectionNames(IntPtr lpszReturnBuffer,

.

    Dim len As Int32 = GetPrivateProfileSectionNames(ptr, 1024, IniPath)

.

static extern uint GetPrivateProfileSectionNames(IntPtr lpszReturnBuffer,

.

    uint bytesReturned = GetPrivateProfileSectionNames(pReturnedString, MAX_BUFFER, m_iniFile);

.
Documentation
[GetPrivateProfileSectionNames] on MSDN
.
Summary
.

static extern uint GetPrivateProfileString(

.

static extern uint GetPrivateProfileString(

.

    Private Shared Function GetPrivateProfileString(ByVal lpAppName As String, _

.

[DllImport("KERNEL32.DLL", CharSet=CharSet::Auto, EntryPoint="GetPrivateProfileString")]

.

static UInt32 GetPrivateProfileString(

.

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.

.

       uint res = GetPrivateProfileString("AppName", "KeyName", "", sb, (uint)sb.Capacity, @"c:\test.ini");

.

       static extern uint GetPrivateProfileString(

.

    Private Declare Auto Function GetPrivateProfileString Lib "kernel32" (ByVal lpAppName As String, _

.

    res = GetPrivateProfileString("AppName", "KeyName", "", sb, sb.Capacity, "c:\test.ini")

.

    Console.WriteLine("GetPrivateProfileStirng returned : " & res.ToString())

.
Documentation
[GetPrivateProfileString] on MSDN
.

   Private Declare Ansi Function GetPrivateProfileString _

.

      Lib "kernel32.dll" Alias "GetPrivateProfileStringA" _

.

    Private Declare Ansi Function GetPrivateProfileInt _

.

      Lib "kernel32.dll" Alias "GetPrivateProfileIntA" _

.

    intCharCount = GetPrivateProfileString(Section, Key, [Default], objResult, objResult.Capacity, ConfigFile)

.

    Return GetPrivateProfileInt(Section, Key, _


 
Access PInvoke.net directly from VS: