?
Solved

Win95 in MS-DOS mode and IOCTL functions

Posted on 1997-04-15
2
Medium Priority
?
247 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

770 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