Solved

Int 21h (5Ch) record lock example

Posted on 2001-09-10
3
328 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dll Dynamic way c/c++ 9 139
Beginner Probleme with my IDE Code::Blocks C++ 5 233
Can case within switch statement specify range of values ? 3 76
An API detour question 7 79
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files 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.

867 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

16 Experts available now in Live!

Get 1:1 Help Now