Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-08-2009
Member
 
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.
Reply With Quote
  #2  
Old 08-08-2009
Member
 
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.
Reply With Quote
  #3  
Old 08-08-2009
Member
 
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.
Reply With Quote
  #4  
Old 08-08-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 06:53 PM.