Solved

GetPrivateProfileString() lock the file?

Posted on 1997-05-16
4
954 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
ID: 1397381
What operating system are you talking about?
0
 

Author Comment

by:gidon
ID: 1397382
Edited text of question
0
 
LVL 2

Accepted Solution

by:
amartin030297 earned 200 total points
ID: 1397383
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
ID: 1397384
What can i do to stop this locking?
Should i write my own version of GetPrivateProfileString()?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is COM supported from Apache 1 45
What .NET website keeps me current? 9 58
Problem to open text file 11 75
What namespace do I need to import? 2 14
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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…

863 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

25 Experts available now in Live!

Get 1:1 Help Now