Solved

GetPrivateProfileString() lock the file?

Posted on 1997-05-16
4
941 Views
Last Modified: 2013-12-03
I wrote a program using GetPrivateProfileString() API function. It seems to lock the .INI file for writing over the network, so other application can not access it.
Can it be???
I am talking about Windows 95.
0
Comment
Question by:gidon
  • 2
4 Comments
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
What operating system are you talking about?
0
 

Author Comment

by:gidon
Comment Utility
Edited text of question
0
 
LVL 2

Accepted Solution

by:
amartin030297 earned 200 total points
Comment Utility
Yup.. its true.. a lock does occure when over the network.
Since Windows is reading the file (which takes some finite
amount of time which is non-zero)... In theory, at the SAME
time another user could be changing the .INI file (saving it
out)... And there would be a collosion.  So, yes, Win95
will locked the file.... as segmented file locking for
xxxProfileString was not implemented.
   
0
 

Author Comment

by:gidon
Comment Utility
What can i do to stop this locking?
Should i write my own version of GetPrivateProfileString()?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now