Results 1 to 4 of 4

Thread: How to put getprivateprofilestring comments in the program

  1. #1
    Join Date
    Dec 2008
    Posts
    70

    How to put getprivateprofilestring comments in the program

    I've written a function GetINIString which basically wraps the GetPrivateProfileString function. Interoping GetPrivateProfileString is giving me this Exception in certain cases: This function is being called by a multi-threaded application. Till now i was using very simple methods to get the INIString but my other colleauge have suggested that this function has worked fine for mutli-threaded application when calling GetINIString.

  2. #2
    Join Date
    Dec 2008
    Posts
    161

    Re: How to put getprivateprofilestring comments in the program

    This function is being called by a multi-threaded application. This function has worked fine for a long while, but recently the mutli-threaded application hangs when calling GetINIString. Pointer to the buffer that receives the retrieved string. Good judgement comes from experience, and experience comes from bad judgement.

  3. #3
    Join Date
    Dec 2008
    Posts
    183

    Re: How to put getprivateprofilestring comments in the program

    The GetPrivateProfileString function returns the string value of the Entry found in the Section part of the file FileName. You need to initialize the StringBuilder with the appropriate initial size. StringBuilder _strInDir = new StringBuilder(80);The GetPrivateProfileString function searches the specified initialization file for a key that matches the name specified by the lpKeyName parameter under the section heading specified by the lpAppName parameter.

  4. #4
    Join Date
    Jan 2009
    Posts
    96

    Re: How to put getprivateprofilestring comments in the program

    I am also using WritePrivateProfileString and whenever I want to assign a value to the string builder before I do a WritePrivateProfileString, The GetPrivateProfileString function is not case-sensitive. The Section and Entry arguments may contain any combination of uppercase and lowercase letters.have I no choice but to do a new StringBuilder(value), every time I want to assign a new value to the StringBuilder type variable.

Similar Threads

  1. Can't view comments on my ipad
    By AARON Carter in forum Portable Devices
    Replies: 3
    Last Post: 01-10-2010, 10:20 AM
  2. Why pre-processor gives a space in comments?
    By KAILEY in forum Software Development
    Replies: 5
    Last Post: 06-03-2010, 05:37 PM
  3. How to include comments in HTML
    By rooki in forum Software Development
    Replies: 5
    Last Post: 25-12-2009, 01:06 PM
  4. Comments on the images
    By StarTraveller in forum Customize Desktop
    Replies: 1
    Last Post: 28-11-2008, 07:28 PM
  5. Add comments inside Powershell
    By Bruno Guerpillon in forum Windows Server Help
    Replies: 1
    Last Post: 07-02-2007, 05:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,037,349.71456 seconds with 16 queries