473,322 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Opening raw character device in DOS/Windows 98

Hello all,

I want to create my own filesystem on a flash memory card. How can I
open the card as a raw character device?

On a unix-like system I can just open /dev/hdx as a file and do
whatever I want. How can I achieve the same thing under MS DOS or
Windows 98?

Thanks!

Hof

May 2 '07 #1
3 1917
In article <11**********************@e65g2000hsc.googlegroups .com>,
<rx******@yahoo.co.ukwrote:
>I want to create my own filesystem on a flash memory card. How can I
open the card as a raw character device?
filesystems and flash memory cards and raw character devices
are all system-specific, not mentioned by the standard C language.

>On a unix-like system I can just open /dev/hdx as a file and do
whatever I want. How can I achieve the same thing under MS DOS or
Windows 98?
You'd need to ask in a system specific newsgroup. All that
C provides is fopen() with a "b" modifier on the file mode
(to indicate binary). Determining the correct filename to open
(or whatever else needs to be done to get a hook to the device)
is system specific.
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes
May 2 '07 #2
In article <11**********************@e65g2000hsc.googlegroups .com>,
<rx******@yahoo.co.ukwrote:
>Hello all,

I want to create my own filesystem on a flash memory card. How can I
open the card as a raw character device?

On a unix-like system I can just open /dev/hdx as a file and do
whatever I want. How can I achieve the same thing under MS DOS or
Windows 98?
Let me just say, with all sincerity and love:

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Useful clc-related links:

http://en.wikipedia.org/wiki/Aspergers
http://en.wikipedia.org/wiki/Clique
http://en.wikipedia.org/wiki/C_programming_language

May 2 '07 #3
On 2 May, 18:48, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
In article <1178127733.755392.297...@e65g2000hsc.googlegroups .com>,

<rxhof...@yahoo.co.ukwrote:
I want to create my own filesystem on a flash memory card. How can I
open the card as a raw character device?

filesystems and flash memory cards and raw character devices
are all system-specific, not mentioned by the standard C language.
On a unix-like system I can just open /dev/hdx as a file and do
whatever I want. How can I achieve the same thing under MS DOS or
Windows 98?

You'd need to ask in a system specific newsgroup. All that
C provides is fopen() with a "b" modifier on the file mode
(to indicate binary). Determining the correct filename to open
(or whatever else needs to be done to get a hook to the device)
is system specific.
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes


Thanks, Walter. Apologies for the off-topic post - I wondered if there
was some strange and wonderful system call provided on DOS platforms
that C experts would be familiar with. All the DOS newsgroups seem to
have very little activity.

Regards,

Hof

May 2 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: CMiYC | last post by:
I'm attempting to open an USB HID device using createfile from kernel32. The open attempt always fails. This is the call I'm using: CreateFile(HidName$, &HC0000000, 3, 0, 3, 0 ,0) HidName$...
1
by: John | last post by:
Hi We have an access db which records daily orders. We would like the orders to be downloaded to a windows mobile 2003 device via usb cradle. Drivers then take along the device and get...
11
by: Mars | last post by:
char c; int i; scanf("%d",&i); c=getchar(); I want to read a integer and a character in 2 lines. Why the getchar always get the \n character from the last line????? (Sorry for my newbie...
8
by: Tony Liu | last post by:
I am having a "Null Device is Missing" compile error when compiling a c++ project. The documentation from MSDN said it could be caused by low system resource or the user account does not have...
11
by: aldrin | last post by:
I'm trying to run this code under windows xp sp2 using codeblocks v1.0 compiler with great difficulty.There is no problem with running this under KDevelop in linux. Any help would be greatly...
6
by: davetelling | last post by:
I am a total newbie, trying to slog through the Visual C# Express application. I need to be able to convert a single ASCII character (can be anything from 0 to 255) to an int for use in other...
9
by: jraul | last post by:
1) Am I correct that C++ does not have a defined character set? In particular, a platform might not use the ASCII character set? 2) C++ supports wchar_t types. But again, this has no defined...
1
by: gallois | last post by:
hello everyone, i've been trying to write something that checks the inputs from the possible devices where a mouse can be connected (debian/linux) in order to make it configure the system...
34
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.