Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Win95 in MS-DOS mode and IOCTL functions

Posted on 1997-04-15
2
Medium Priority
?
248 Views
Last Modified: 2013-12-03
Hello,

I want to lock logical volume (int 21h, func 440Dh, Minor Code 4Ah) because my program does absolute writes to the disk. I am using a FAT32 drive and OEM Service Release 2. It seems that the IOCTL functions (int 21h, 440Dh) return 1
(function invalid) in MS-DOS mode, but work in Windows mode. So how does one lock a drive in software in MS-DOS mode ?  

Am I missing something in Config.Sys or Autoexec.bat?

( COMMAND.COM handles it when you type "LOCK"  at command prompt, so it can be done!)

Thanks in advance,
Riaz
0
Comment
Question by:RAT
[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 Comments
 

Accepted Solution

by:
brien earned 100 total points
ID: 1334605
Riaz,

The reason you need to lock a volume to do absolute writes is because Windows is a multitasking environment and other disk activity may interfere with yours if it occurs simultaneously.

Locking the disk gives you exclusive access to it while you hold the lock.

In MSDOS mode your program is the only one running, so there is no need to lock the volume.  The IOCTL fails because it is not implemented in MSDOS mode.

0
 

Author Comment

by:RAT
ID: 1334606
Brien, my problem was that the lock level I was setting was 1,
when it should have been 0. Thanks for answering.

For that, 50 points!
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 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