Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

write on disk directly

Hi all,
I want to know if is possible to write directly on disk with visual basic(Not
in a file), i know with
interrupt DOS, it's possible. And if is possible to write any line of code
ASM in visual basic.
Thanks all
[251 byte] By [christophe] at [2007-11-10 0:19:47]
# 1 Re: write on disk directly
Christophe,

>I want to know if is possible to write directly on disk with visual basic(Not
>in a file), i know with interrupt DOS, it's possible.

On Windows 9x, you can probably do this using DeviceIoControl and the
VWIN32 virtual device driver. Check out

http://msdn.microsoft.com/library/psdk/win95/devio_2b1v.htm

Mattias

__________________________________________________
Mattias Sjgren (MCP) - mattiass @ hem.passagen.se
VB+ http://hem.spray.se/mattias.sjogren/
Please send questions/replies to the newsgroups
Mattias Sjgren at 2007-11-11 20:04:41 >
# 2 Re: write on disk directly
Christophe,

>I want to know if is possible to write directly on disk with visual basic(Not
>in a file), i know with interrupt DOS, it's possible.

On Windows 9x, you can probably do this using DeviceIoControl and the
VWIN32 virtual device driver. Check out

http://msdn.microsoft.com/library/psdk/win95/devio_2b1v.htm

Mattias

__________________________________________________
Mattias Sjgren (MCP) - mattiass @ hem.passagen.se
VB+ http://hem.spray.se/mattias.sjogren/
Please send questions/replies to the newsgroups
Mattias Sjgren at 2007-11-11 20:05:44 >
# 3 Re: write on disk directly
His question stated for visual basic, the page you referenced
is for c++.
Mark at 2007-11-11 20:06:37 >
# 4 Re: write on disk directly
His question stated for visual basic, the page you referenced
is for c++.
Mark at 2007-11-11 20:07:39 >
# 5 Re: write on disk directly
Hi Mark --

Do you have reason to suspect that DeviceIoControl is *not* callable from VB?

Later... Karl
--
http://www.mvps.org/vb

"Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
>
> His question stated for visual basic, the page you referenced
> is for c++.
>
>
>
Karl E. Peterson at 2007-11-11 20:08:49 >
# 6 Re: write on disk directly
Hi Mark --

Do you have reason to suspect that DeviceIoControl is *not* callable from VB?

Later... Karl
--
http://www.mvps.org/vb

"Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
>
> His question stated for visual basic, the page you referenced
> is for c++.
>
>
>
Karl E. Peterson at 2007-11-11 20:09:42 >
# 7 Re: write on disk directly
Karl,

It certainly *is* callable -- remember that little ditty I did recently for
Ask The NT Pro on NT file compression?
(http://www.inquiry.com/techtips/nt_pro/10_minute_solutions/10min0900.asp).
Only hard part was the one of the "constants" was actually an ugly little C
macro. Other than that, duck soup...

--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.inquiry.com>

"Karl E. Peterson" <karl@mvps.org> wrote in message
news:3a3518e5$1@news.dev-archive.com...
> Hi Mark --
>
> Do you have reason to suspect that DeviceIoControl is *not* callable from
VB?
>
> Later... Karl
> --
> http://www.mvps.org/vb
>
>
> "Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
> >
> > His question stated for visual basic, the page you referenced
> > is for c++.
> >
> >
> >
>
L.J. Johnson at 2007-11-11 20:10:46 >
# 8 Re: write on disk directly
Karl,

It certainly *is* callable -- remember that little ditty I did recently for
Ask The NT Pro on NT file compression?
(http://www.inquiry.com/techtips/nt_pro/10_minute_solutions/10min0900.asp).
Only hard part was the one of the "constants" was actually an ugly little C
macro. Other than that, duck soup...

--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.inquiry.com>

"Karl E. Peterson" <karl@mvps.org> wrote in message
news:3a3518e5$1@news.dev-archive.com...
> Hi Mark --
>
> Do you have reason to suspect that DeviceIoControl is *not* callable from
VB?
>
> Later... Karl
> --
> http://www.mvps.org/vb
>
>
> "Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
> >
> > His question stated for visual basic, the page you referenced
> > is for c++.
> >
> >
> >
>
L.J. Johnson at 2007-11-11 20:11:44 >
# 9 Re: write on disk directly
Heh, which just _may_ be why I asked. ;-)
--
http://www.mvps.org/vb

"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
news:3a3580ab$1@news.dev-archive.com...
> Karl,
>
> It certainly *is* callable -- remember that little ditty I did recently for
> Ask The NT Pro on NT file compression?
> (http://www.inquiry.com/techtips/nt_pro/10_minute_solutions/10min0900.asp).
> Only hard part was the one of the "constants" was actually an ugly little C
> macro. Other than that, duck soup...
>
> --
> L.J. Johnson, Slightly Tilted Software
> Microsoft MVP (Visual Basic)
> LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
> <http://www.SlightlyTiltedSoftware.com>
> Ask The NT Pro at <http://www.inquiry.com>
>
> "Karl E. Peterson" <karl@mvps.org> wrote in message
> news:3a3518e5$1@news.dev-archive.com...
> > Hi Mark --
> >
> > Do you have reason to suspect that DeviceIoControl is *not* callable from
> VB?
> >
> > Later... Karl
> > --
> > http://www.mvps.org/vb
> >
> >
> > "Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
> > >
> > > His question stated for visual basic, the page you referenced
> > > is for c++.
> > >
> > >
> > >
> >
>
>
Karl E. Peterson at 2007-11-11 20:12:46 >
# 10 Re: write on disk directly
Heh, which just _may_ be why I asked. ;-)
--
http://www.mvps.org/vb

"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
news:3a3580ab$1@news.dev-archive.com...
> Karl,
>
> It certainly *is* callable -- remember that little ditty I did recently for
> Ask The NT Pro on NT file compression?
> (http://www.inquiry.com/techtips/nt_pro/10_minute_solutions/10min0900.asp).
> Only hard part was the one of the "constants" was actually an ugly little C
> macro. Other than that, duck soup...
>
> --
> L.J. Johnson, Slightly Tilted Software
> Microsoft MVP (Visual Basic)
> LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
> <http://www.SlightlyTiltedSoftware.com>
> Ask The NT Pro at <http://www.inquiry.com>
>
> "Karl E. Peterson" <karl@mvps.org> wrote in message
> news:3a3518e5$1@news.dev-archive.com...
> > Hi Mark --
> >
> > Do you have reason to suspect that DeviceIoControl is *not* callable from
> VB?
> >
> > Later... Karl
> > --
> > http://www.mvps.org/vb
> >
> >
> > "Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
> > >
> > > His question stated for visual basic, the page you referenced
> > > is for c++.
> > >
> > >
> > >
> >
>
>
Karl E. Peterson at 2007-11-11 20:13:47 >
# 11 Re: write on disk directly
Karl,

> Heh, which just _may_ be why I asked. ;-)

OK, got it.

--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.inquiry.com>
L.J. Johnson at 2007-11-11 20:14:51 >
# 12 Re: write on disk directly
Karl,

> Heh, which just _may_ be why I asked. ;-)

OK, got it.

--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.inquiry.com>
L.J. Johnson at 2007-11-11 20:15:54 >
# 13 Re: write on disk directly
What about calling DeviceIoControl from Win9x via the VWIN32 VxD interface...
I can't seem to get that to work for VWIN32_DIOC_DOS_INT25

Can anybody point me in the right direction?

"Karl E. Peterson" <karl@mvps.org> wrote:
>Heh, which just _may_ be why I asked. ;-)
>--
>http://www.mvps.org/vb
>
>
>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
>news:3a3580ab$1@news.dev-archive.com...
>> Karl,
>>
>> It certainly *is* callable -- remember that little ditty I did recently
for
>> Ask The NT Pro on NT file compression?
>> (http://www.inquiry.com/techtips/nt_pro/10_minute_solutions/10min0900.asp).
>> Only hard part was the one of the "constants" was actually an ugly little
C
>> macro. Other than that, duck soup...
>>
>> --
>> L.J. Johnson, Slightly Tilted Software
>> Microsoft MVP (Visual Basic)
>> LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>> <http://www.SlightlyTiltedSoftware.com>
>> Ask The NT Pro at <http://www.inquiry.com>
>>
>> "Karl E. Peterson" <karl@mvps.org> wrote in message
>> news:3a3518e5$1@news.dev-archive.com...
>> > Hi Mark --
>> >
>> > Do you have reason to suspect that DeviceIoControl is *not* callable
from
>> VB?
>> >
>> > Later... Karl
>> > --
>> > http://www.mvps.org/vb
>> >
>> >
>> > "Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
>> > >
>> > > His question stated for visual basic, the page you referenced
>> > > is for c++.
>> > >
>> > >
>> > >
>> >
>>
>>
>
Emmet Gray at 2007-11-11 20:16:56 >
# 14 Re: write on disk directly
What about calling DeviceIoControl from Win9x via the VWIN32 VxD interface...
I can't seem to get that to work for VWIN32_DIOC_DOS_INT25

Can anybody point me in the right direction?

"Karl E. Peterson" <karl@mvps.org> wrote:
>Heh, which just _may_ be why I asked. ;-)
>--
>http://www.mvps.org/vb
>
>
>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
>news:3a3580ab$1@news.dev-archive.com...
>> Karl,
>>
>> It certainly *is* callable -- remember that little ditty I did recently
for
>> Ask The NT Pro on NT file compression?
>> (http://www.inquiry.com/techtips/nt_pro/10_minute_solutions/10min0900.asp).
>> Only hard part was the one of the "constants" was actually an ugly little
C
>> macro. Other than that, duck soup...
>>
>> --
>> L.J. Johnson, Slightly Tilted Software
>> Microsoft MVP (Visual Basic)
>> LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>> <http://www.SlightlyTiltedSoftware.com>
>> Ask The NT Pro at <http://www.inquiry.com>
>>
>> "Karl E. Peterson" <karl@mvps.org> wrote in message
>> news:3a3518e5$1@news.dev-archive.com...
>> > Hi Mark --
>> >
>> > Do you have reason to suspect that DeviceIoControl is *not* callable
from
>> VB?
>> >
>> > Later... Karl
>> > --
>> > http://www.mvps.org/vb
>> >
>> >
>> > "Mark" <esginc@gate.net> wrote in message news:3a32a842$1@news.dev-archive.com...
>> > >
>> > > His question stated for visual basic, the page you referenced
>> > > is for c++.
>> > >
>> > >
>> > >
>> >
>>
>>
>
Emmet Gray at 2007-11-11 20:17:55 >