Solved

GetPrivateProfileString() lock the file?

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

777 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