Solved

Int 21h (5Ch) record lock example

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Statment to match two tables in c# 6 74
sameEnds challenge 3 107
Line meaning 9 77
Using ANSI C how to Read a .csv file 10 52
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
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.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

762 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

18 Experts available now in Live!

Get 1:1 Help Now