Solved

Help in Disk programming

Posted on 2001-09-03
7
244 Views
Last Modified: 2010-05-18
dear x-perts
iam trying to work with disk read/write , MBR reading Boot sector reading, to understand the basic of disk
MY advance thanks to experts
please help me by giving some clue how do i write disk programming with interrupt int86x ....

Iam working with MS VC++ to write C++ programming

thank u
regards
cpearl



0
Comment
Question by:cpearl_s
7 Comments
 
LVL 1

Expert Comment

by:doryz
ID: 6452355
Hi,
  well in order to access hardware directly and not through win32 api you should write code in ring 0 (Kernel mode).
There are 2 modes on Windows - Kernel Mode (direct access to hardware and working low level, User Mode (application level, using Virtual Drivers and APIs).
 
In order to get working with it you need first to download the Microsoft DDK (Driver Development Kit).
For windows NT/2000 you write a Device Driver and for 98/Me/95 you need to write a VxD.
goto:
http://www.microsoft.com/DDK
they also have samples there of many types of drivers and direct access.
  Hope this helps.
0
 
LVL 1

Expert Comment

by:doryz
ID: 6452371
Hi,
  well in order to access hardware directly and not through win32 api you should write code in ring 0 (Kernel mode).
There are 2 modes on Windows - Kernel Mode (direct access to hardware and working low level, User Mode (application level, using Virtual Drivers and APIs).
 
In order to get working with it you need first to download the Microsoft DDK (Driver Development Kit).
For windows NT/2000 you write a Device Driver and for 98/Me/95 you need to write a VxD.
goto:
http://www.microsoft.com/DDK
they also have samples there of many types of drivers and direct access.
  Hope this helps.
0
 

Author Comment

by:cpearl_s
ID: 6452706
To doryz,
Hi ,
That's fine, but iam not going to develope with Device driver application.
I would like to explore the the disk basic ,
see in tc (dos )version  we use int86x or int86 to access floopy disk info or Harddisk information

Again my doubt, is it required DDK to work with to access hard disk info or floppy info's . If so i can do that.

Is it possible for me to go through win32Api ???

Still iam confused , what is the correct way to approch this.
I want to practice , Disk read, write, MBR & Boot record Read,(if possible fixing problems ) like utility tool doing.
please re-consider ? and tell me the correct approch for that .
I want to this win api.
I found some api in msdn, will it work for my need or i have to go for some other way
Iam going to work on windows2000 proffessional and MS-Vc++6.0 to write C++ Programm


Regards
cpearl









0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 3

Expert Comment

by:mh2
ID: 6452759
Hi cpearl_s,

I no expert at low-level Win32 coding, but I do agree with doryz.

Windows, and especially NT/2000 class of OS, are very strict about low-level access to resources, and to my knowledge severly restrict or totally inhibit interupt/register level access to hardware resources.

I agree that you would need to develop some form of VxD to perform this kind of low-level coding.

Regards,
Mark
0
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 6452856
0
 

Author Comment

by:cpearl_s
ID: 6456018

hi doyrz and mh2

i accept what u both said , but when i go through jhance's URL , i found coding example that which is useful for me.
I hope that will help me more.
Thank's ro doyrz ,mmh2 and jhance for immediate reply .

regards
cpearl
 
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6457495
Hello cpearl,
Based on the grading guidelines that I have posted here, it seems that jhance's answer qualifies for the A grade.  For that reason, I am changing the grade.  Please read the grading guidelines posted and thank you.

Computer101
Community Support Moderator


How Do I Know What Grade to Give?
Although we use an A-D scale here at Experts Exchange, it works differently than, say, school grades. If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade, since they have taken the time to provide you with a working solution. If a possible solution is incomplete - ask for clarification or details before accepting the answer and grading it. People should not be given lower grades because of incorrect grammar or because you just accepted their answer or comment to close the question. Keep in mind, your question and any follow-up comments should be focused so that there can be a specific answer. The following is a good guideline to follow when grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.

Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

776 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