Solved

Int 21h (5Ch) record lock example

Posted on 2001-09-10
3
329 Views
Last Modified: 2012-08-14
I need a short example program that shows how to lock a region of bytes in a file using DOS function 92.  Thanks!
0
Comment
Question by:whatsup050300
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
kulina earned 300 total points
ID: 6472854
Can you use LockFile and UnlockFile? These are wrappers for int 21h 5ch. Here are the links anyway:
http://msdn.microsoft.com/library/en-us/fileio/hh/winbase/filesio_63xh.asp?frame=true

http://msdn.microsoft.com/library/en-us/fileio/hh/winbase/filesio_1jl1.asp?frame=true

Let me know if you need an example.
0
 

Author Comment

by:whatsup050300
ID: 6472871
LockFile and UnlockFile sound like they'd work fine... trick is whether they'll play nice with an old (network aware) DOS app.  I'll do some experimenting but if you've got a moment to put together a short example program it'd be much appreciated... the c skills are quite rusty at this point.  Thanks!
0
 
LVL 3

Expert Comment

by:kulina
ID: 6472892
OK, will do. Meanwhile you may browse through Microsoft's example; it may help:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/hh/winbase/filesio_8l6b.asp

Regards.
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Inorder binary search tree 5 164
C dll call freezes 5 101
Finding a good hash function 4 124
why "." vs "->" 23 120
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

778 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