Solved

GetPrivateProfileString() lock the file?

Posted on 1997-05-16
4
993 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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