Solved

GetPrivateProfileString() lock the file?

Posted on 1997-05-16
4
1,006 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

617 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