Solved

Int 21h (5Ch) record lock example

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
port mapped I/o query 10 206
C#, VS15, StructLayout 1 135
C++ vs C compilers 13 160
TCP/IP Socket - connection close results in data lost 14 140
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…
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 recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

860 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