Solved

Int 21h (5Ch) record lock example

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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 how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

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