Disable swap file

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

How can I disable the Win98 swap file?

It causes some of my processing to occur out of sequence
and I would like to prevent that from happening.

This is relating to my own programming.

Thanks for any help.

Jack
43 answers Last reply
More about disable swap file
  1. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    System Properties, Performance tab. There's a button there.

    But you'd better be *real* sure you have plenty of RAM to handle
    whatever comes down the pike.

    You're doing your own programming and you don't know how to disable the
    Swap file? Perhaps you should be looking for more training in ways to
    manage your code so that the swap file ceases to become an issue? Just a
    thought...

    --
    Gary S. Terhune
    MS MVP Shell/User
    http://www.grystmill.com/articles/cleanboot.htm
    http://www.grystmill.com/articles/security.htm

    "J. Yazel" <jyazel@ds.net> wrote in message
    news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    >
    > How can I disable the Win98 swap file?
    >
    > It causes some of my processing to occur out of sequence
    > and I would like to prevent that from happening.
    >
    > This is relating to my own programming.
    >
    > Thanks for any help.
    >
    > Jack
    >
  2. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Control Panel, System, Performance, Virtual Memory tab (etc).
    Generally NOT a good idea.

    J. Yazel wrote:
    > How can I disable the Win98 swap file?
    >
    > It causes some of my processing to occur out of sequence
    > and I would like to prevent that from happening.
    >
    > This is relating to my own programming.
    >
    > Thanks for any help.
    >
    > Jack
  3. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Gary S. Terhune wrote:
    > System Properties, Performance tab. There's a button there.
    >
    > But you'd better be *real* sure you have plenty of RAM to handle
    > whatever comes down the pike.
    >
    > You're doing your own programming and you don't know how to disable the
    > Swap file?

    LOL. That's a good catch! Yeah, now this sounds a bit fishy to me.

    > Perhaps you should be looking for more training in ways to
    > manage your code so that the swap file ceases to become an issue? Just a
    > thought...
    >
    > --
    > Gary S. Terhune
    > MS MVP Shell/User
    > http://www.grystmill.com/articles/cleanboot.htm
    > http://www.grystmill.com/articles/security.htm
    >
    > "J. Yazel" <jyazel@ds.net> wrote in message
    > news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    >>
    >> How can I disable the Win98 swap file?
    >>
    >> It causes some of my processing to occur out of sequence
    >> and I would like to prevent that from happening.
    >>
    >> This is relating to my own programming.
    >>
    >> Thanks for any help.
    >>
    >> Jack
  4. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    In addition to Gary's response, be aware that some programs expect to see a
    swap file (even though they might not use it) and will not run properly
    without it.

    --
    Regards

    Ron Badour, MS MVP Windows 98
    Tips: http://home.satx.rr.com/badour
    Knowledge Base Info:
    http://support.microsoft.com/default.aspx?pr=kbinfo

    "J. Yazel" <jyazel@ds.net> wrote in message
    news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    >
    > How can I disable the Win98 swap file?
    >
    > It causes some of my processing to occur out of sequence
    > and I would like to prevent that from happening.
    >
    > This is relating to my own programming.
    >
    > Thanks for any help.
    >
    > Jack
    >
  5. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Sun, 20 Mar 2005 12:48:26 -0800, "Gary S. Terhune" <grystnews@mvps.org>
    wrote:

    >System Properties, Performance tab. There's a button there.
    >
    >But you'd better be *real* sure you have plenty of RAM to handle
    >whatever comes down the pike.
    >
    >You're doing your own programming and you don't know how to disable the
    >Swap file? Perhaps you should be looking for more training in ways to
    >manage your code so that the swap file ceases to become an issue? Just a
    >thought...
    =================================

    Thanks for the answer. However, I didn't clearly state what I need.

    First, the program I am referring to is not a Windows program, but an
    assembler (MASM) program. It is a mass copy program that I use very
    frequently between machines. I wrote my own because I have from time to
    time various versions of Windows and DOS and most backup programs
    don't cover this. In addition, most backup programs don't compare the
    source and target files after the copy. I'm a nut case when it comes to
    making sure that a copy is in fact, valid.

    The program, however, must be able to run in a Windows DOS window
    to prevent loss of the long file names.

    More importantly, I don't want to disable the swap file permanently. Ninety-
    five percent of the time it will be enabled. It will be disabled only when I
    am running this program (or something similar).

    When I run the program, the disk writes and reads actually work against the
    swap file almost the whole time. The program is almost finished when the
    "real" disk I/O gets going. Therefore, if any error occurs during the "real"
    I/O, the program can't handle it. Typical errors include different bytes in
    the source and target files, different file dates, times, size, etc.

    I was actually looking for a way to disable the swap file only during the
    run of a specific program.

    I do appreciate your attempt to help.

    Jack
  6. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    So, you're looking for a way to "programmatically" disable Virtual
    Memory temporarily. Sorry, that's out of my league.

    Backup programs may not suit your needs, but popular "imaging" programs
    sound like what you're attempting.

    --
    Gary S. Terhune
    MS MVP Shell/User
    http://www.grystmill.com/articles/cleanboot.htm
    http://www.grystmill.com/articles/security.htm

    "J. Yazel" <jyazel@ds.net> wrote in message
    news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com...
    > On Sun, 20 Mar 2005 12:48:26 -0800, "Gary S. Terhune"
    <grystnews@mvps.org>
    > wrote:
    >
    > >System Properties, Performance tab. There's a button there.
    > >
    > >But you'd better be *real* sure you have plenty of RAM to handle
    > >whatever comes down the pike.
    > >
    > >You're doing your own programming and you don't know how to disable
    the
    > >Swap file? Perhaps you should be looking for more training in ways to
    > >manage your code so that the swap file ceases to become an issue?
    Just a
    > >thought...
    > =================================
    >
    > Thanks for the answer. However, I didn't clearly state what I need.
    >
    > First, the program I am referring to is not a Windows program, but an
    > assembler (MASM) program. It is a mass copy program that I use very
    > frequently between machines. I wrote my own because I have from time
    to
    > time various versions of Windows and DOS and most backup programs
    > don't cover this. In addition, most backup programs don't compare the
    > source and target files after the copy. I'm a nut case when it comes
    to
    > making sure that a copy is in fact, valid.
    >
    > The program, however, must be able to run in a Windows DOS window
    > to prevent loss of the long file names.
    >
    > More importantly, I don't want to disable the swap file permanently.
    Ninety-
    > five percent of the time it will be enabled. It will be disabled only
    when I
    > am running this program (or something similar).
    >
    > When I run the program, the disk writes and reads actually work
    against the
    > swap file almost the whole time. The program is almost finished when
    the
    > "real" disk I/O gets going. Therefore, if any error occurs during the
    "real"
    > I/O, the program can't handle it. Typical errors include different
    bytes in
    > the source and target files, different file dates, times, size, etc.
    >
    > I was actually looking for a way to disable the swap file only during
    the
    > run of a specific program.
    >
    > I do appreciate your attempt to help.
    >
    > Jack
    >
    >
    >
  7. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    :< I don't know much about Virtual Memory, either Gary --- how can I learn
    more about it. TIA (any good book you suggest I need to read about it)

    "Gary S. Terhune" <grystnews@mvps.org> wrote in message
    news:uQkV8meLFHA.656@TK2MSFTNGP14.phx.gbl...
    : So, you're looking for a way to "programmatically" disable Virtual
    : Memory temporarily. Sorry, that's out of my league.
    :
    : Backup programs may not suit your needs, but popular "imaging" programs
    : sound like what you're attempting.
    :
    : --
    : Gary S. Terhune
    : MS MVP Shell/User
    : http://www.grystmill.com/articles/cleanboot.htm
    : http://www.grystmill.com/articles/security.htm
    :
    : "J. Yazel" <jyazel@ds.net> wrote in message
    : news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com...
    : > On Sun, 20 Mar 2005 12:48:26 -0800, "Gary S. Terhune"
    : <grystnews@mvps.org>
    : > wrote:
    : >
    : > >System Properties, Performance tab. There's a button there.
    : > >
    : > >But you'd better be *real* sure you have plenty of RAM to handle
    : > >whatever comes down the pike.
    : > >
    : > >You're doing your own programming and you don't know how to disable
    : the
    : > >Swap file? Perhaps you should be looking for more training in ways to
    : > >manage your code so that the swap file ceases to become an issue?
    : Just a
    : > >thought...
    : > =================================
    : >
    : > Thanks for the answer. However, I didn't clearly state what I need.
    : >
    : > First, the program I am referring to is not a Windows program, but an
    : > assembler (MASM) program. It is a mass copy program that I use very
    : > frequently between machines. I wrote my own because I have from time
    : to
    : > time various versions of Windows and DOS and most backup programs
    : > don't cover this. In addition, most backup programs don't compare the
    : > source and target files after the copy. I'm a nut case when it comes
    : to
    : > making sure that a copy is in fact, valid.
    : >
    : > The program, however, must be able to run in a Windows DOS window
    : > to prevent loss of the long file names.
    : >
    : > More importantly, I don't want to disable the swap file permanently.
    : Ninety-
    : > five percent of the time it will be enabled. It will be disabled only
    : when I
    : > am running this program (or something similar).
    : >
    : > When I run the program, the disk writes and reads actually work
    : against the
    : > swap file almost the whole time. The program is almost finished when
    : the
    : > "real" disk I/O gets going. Therefore, if any error occurs during the
    : "real"
    : > I/O, the program can't handle it. Typical errors include different
    : bytes in
    : > the source and target files, different file dates, times, size, etc.
    : >
    : > I was actually looking for a way to disable the swap file only during
    : the
    : > run of a specific program.
    : >
    : > I do appreciate your attempt to help.
    : >
    : > Jack
    : >
    : >
    : >
    :
  8. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    AFAIK, the .swp file is locked. I may be confusing this with something else
    386.swp --- <???> Any help is appreciated on this issue.

    "J. Yazel" <jyazel@ds.net> wrote in message
    news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    :
    : How can I disable the Win98 swap file?
    :
    : It causes some of my processing to occur out of sequence
    : and I would like to prevent that from happening.
    :
    : This is relating to my own programming.
    :
    : Thanks for any help.
    :
    : Jack
    :
  9. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Sun, 20 Mar 2005 23:43:55 -0800, "Gary S. Terhune" <grystnews@mvps.org>
    wrote:

    >So, you're looking for a way to "programmatically" disable Virtual
    >Memory temporarily. Sorry, that's out of my league.
    >
    >Backup programs may not suit your needs, but popular "imaging" programs
    >sound like what you're attempting.
    ===============

    O.K., thanks very much. I'll keep looking.

    I actually am looking for a way similar to what was mentioned (disabling
    virtual memory through the Control Panel), except without booting the
    machine twice just to run a program.

    A "programmatical" disable would be acceptable as a second choice.

    I've been using this program for many years and other than what I asked
    for, it works better than any available program (for my needs), since one
    minute I'm in Windows and the next I'm in DOS.

    Jack
  10. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Mon, 21 Mar 2005 09:11:37 -0700, "Dan" <spamyou@user.nec> wrote:

    >AFAIK, the .swp file is locked. I may be confusing this with something else
    >386.swp --- <???> Any help is appreciated on this issue.
    >
    >"J. Yazel" <jyazel@ds.net> wrote in message
    >news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    >:
    >: How can I disable the Win98 swap file?
    >:
    >: It causes some of my processing to occur out of sequence
    >: and I would like to prevent that from happening.
    >:
    >: This is relating to my own programming.
    >:
    >: Thanks for any help.
    >:
    >: Jack
    >: ===========================

    It's only locked to you and I.

    I'm looking for a way to have Windows do it (without re-booting constantly).

    Thanks.

    Jack
  11. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Sun, 20 Mar 2005 16:54:12 -0600, "Ron Badour" <Sorry@NoAddress.com> wrote:

    >In addition to Gary's response, be aware that some programs expect to see a
    >swap file (even though they might not use it) and will not run properly
    >without it.
    ==========

    I definitely will be very careful during the disable period.

    Thanks.

    Jack
  12. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    It's not the swap file that's causing you a problem. Whether or not the swap
    file is involved in a copy operation should be completely invisible to a
    properly written program, whether DOS or Windows.

    You need to investigate why the messages from the copy or compare process
    aren't properly handled by your application. From your description it seems
    that you are invoking DOS utilities to do the copy and compare for you.
    This can mean that your application is not around to handle the error codes
    returned by these processes. I can't think of any other way that your
    program could be 'almost finished' before these messages are generated.

    If this is the way that the program is written, you need to look at how it
    is invoking these processes, and what you can change to ensure that it waits
    until the process is completed before either moving on to the next task or
    handling the returned error.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "J. Yazel" <jyazel@ds.net> wrote in message
    news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com...
    > snip <
    >
    > Thanks for the answer. However, I didn't clearly state what I need.
    >
    > First, the program I am referring to is not a Windows program, but an
    > assembler (MASM) program. It is a mass copy program that I use very
    > frequently between machines. I wrote my own because I have from time to
    > time various versions of Windows and DOS and most backup programs
    > don't cover this. In addition, most backup programs don't compare the
    > source and target files after the copy. I'm a nut case when it comes to
    > making sure that a copy is in fact, valid.
    >
    > The program, however, must be able to run in a Windows DOS window
    > to prevent loss of the long file names.
    >
    > More importantly, I don't want to disable the swap file permanently.
    > Ninety-
    > five percent of the time it will be enabled. It will be disabled only when
    > I
    > am running this program (or something similar).
    >
    > When I run the program, the disk writes and reads actually work against
    > the
    > swap file almost the whole time. The program is almost finished when the
    > "real" disk I/O gets going. Therefore, if any error occurs during the
    > "real"
    > I/O, the program can't handle it. Typical errors include different bytes
    > in
    > the source and target files, different file dates, times, size, etc.
    >
    > I was actually looking for a way to disable the swap file only during the
    > run of a specific program.
    >
    > I do appreciate your attempt to help.
    >
    > Jack
  13. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Jeff Richards wrote:
    > It's not the swap file that's causing you a problem. Whether or not the
    swap
    > file is involved in a copy operation should be completely invisible to a
    > properly written program, whether DOS or Windows.

    Exactly.

    > You need to investigate why the messages from the copy or compare process
    > aren't properly handled by your application. From your description it
    seems
    > that you are invoking DOS utilities to do the copy and compare for you.
    > This can mean that your application is not around to handle the error
    codes
    > returned by these processes. I can't think of any other way that your
    > program could be 'almost finished' before these messages are generated.
    >
    > If this is the way that the program is written, you need to look at how it
    > is invoking these processes, and what you can change to ensure that it
    waits
    > until the process is completed before either moving on to the next task or
    > handling the returned error.
    > --
    > Jeff Richards
    > MS MVP (Windows - Shell/User)
    > "J. Yazel" <jyazel@ds.net> wrote in message
    > news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com...
    >> snip <
    >>
    >> Thanks for the answer. However, I didn't clearly state what I need.
    >>
    >> First, the program I am referring to is not a Windows program, but an
    >> assembler (MASM) program. It is a mass copy program that I use very
    >> frequently between machines. I wrote my own because I have from time to
    >> time various versions of Windows and DOS and most backup programs
    >> don't cover this. In addition, most backup programs don't compare the
    >> source and target files after the copy. I'm a nut case when it comes to
    >> making sure that a copy is in fact, valid.
    >>
    >> The program, however, must be able to run in a Windows DOS window
    >> to prevent loss of the long file names.
    >>
    >> More importantly, I don't want to disable the swap file permanently.
    >> Ninety-
    >> five percent of the time it will be enabled. It will be disabled only
    when
    >> I
    >> am running this program (or something similar).
    >>
    >> When I run the program, the disk writes and reads actually work against
    >> the
    >> swap file almost the whole time. The program is almost finished when the
    >> "real" disk I/O gets going. Therefore, if any error occurs during the
    >> "real"
    >> I/O, the program can't handle it. Typical errors include different bytes
    >> in
    >> the source and target files, different file dates, times, size, etc.
    >>
    >> I was actually looking for a way to disable the swap file only during the
    >> run of a specific program.
    >>
    >> I do appreciate your attempt to help.
    >>
    >> Jack
  14. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Jeff can the swap file in 98SE easily be hacked? TIA

    "Jeff Richards" <JRichards@msn.com.au> wrote in message
    news:uCPZfCdLFHA.1396@TK2MSFTNGP10.phx.gbl...
    : It's not the swap file that's causing you a problem. Whether or not the
    swap
    : file is involved in a copy operation should be completely invisible to a
    : properly written program, whether DOS or Windows.
    :
    : You need to investigate why the messages from the copy or compare process
    : aren't properly handled by your application. From your description it
    seems
    : that you are invoking DOS utilities to do the copy and compare for you.
    : This can mean that your application is not around to handle the error codes
    : returned by these processes. I can't think of any other way that your
    : program could be 'almost finished' before these messages are generated.
    :
    : If this is the way that the program is written, you need to look at how it
    : is invoking these processes, and what you can change to ensure that it
    waits
    : until the process is completed before either moving on to the next task or
    : handling the returned error.
    : --
    : Jeff Richards
    : MS MVP (Windows - Shell/User)
    : "J. Yazel" <jyazel@ds.net> wrote in message
    : news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com...
    : > snip <
    : >
    : > Thanks for the answer. However, I didn't clearly state what I need.
    : >
    : > First, the program I am referring to is not a Windows program, but an
    : > assembler (MASM) program. It is a mass copy program that I use very
    : > frequently between machines. I wrote my own because I have from time to
    : > time various versions of Windows and DOS and most backup programs
    : > don't cover this. In addition, most backup programs don't compare the
    : > source and target files after the copy. I'm a nut case when it comes to
    : > making sure that a copy is in fact, valid.
    : >
    : > The program, however, must be able to run in a Windows DOS window
    : > to prevent loss of the long file names.
    : >
    : > More importantly, I don't want to disable the swap file permanently.
    : > Ninety-
    : > five percent of the time it will be enabled. It will be disabled only
    when
    : > I
    : > am running this program (or something similar).
    : >
    : > When I run the program, the disk writes and reads actually work against
    : > the
    : > swap file almost the whole time. The program is almost finished when the
    : > "real" disk I/O gets going. Therefore, if any error occurs during the
    : > "real"
    : > I/O, the program can't handle it. Typical errors include different bytes
    : > in
    : > the source and target files, different file dates, times, size, etc.
    : >
    : > I was actually looking for a way to disable the swap file only during the
    : > run of a specific program.
    : >
    : > I do appreciate your attempt to help.
    : >
    : > Jack
    :
    :
  15. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Mon, 21 Mar 2005 15:44:40 +1100, "Jeff Richards" <JRichards@msn.com.au>
    wrote:

    >It's not the swap file that's causing you a problem. Whether or not the swap
    >file is involved in a copy operation should be completely invisible to a
    >properly written program, whether DOS or Windows.
    >
    >You need to investigate why the messages from the copy or compare process
    >aren't properly handled by your application. From your description it seems
    >that you are invoking DOS utilities to do the copy and compare for you.
    >This can mean that your application is not around to handle the error codes
    >returned by these processes. I can't think of any other way that your
    >program could be 'almost finished' before these messages are generated.
    >
    >If this is the way that the program is written, you need to look at how it
    >is invoking these processes, and what you can change to ensure that it waits
    >until the process is completed before either moving on to the next task or
    >handling the returned error.
    ================

    Thanks very much for the response.

    Jack
  16. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Have you tried calling Microsoft and asking them. If you cannot figure it
    out then maybe I will give them yet another call --- remember 98SE is now
    only paid support so you may be on your own with this one.


    "J. Yazel" <jyazel@ds.net> wrote in message
    news:sf5u31hnbm3d4ria91bdj8cvnero6t4bai@4ax.com...
    : On Mon, 21 Mar 2005 09:11:37 -0700, "Dan" <spamyou@user.nec> wrote:
    :
    : >AFAIK, the .swp file is locked. I may be confusing this with something
    else
    : >386.swp --- <???> Any help is appreciated on this issue.
    : >
    : >"J. Yazel" <jyazel@ds.net> wrote in message
    : >news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    : >:
    : >: How can I disable the Win98 swap file?
    : >:
    : >: It causes some of my processing to occur out of sequence
    : >: and I would like to prevent that from happening.
    : >:
    : >: This is relating to my own programming.
    : >:
    : >: Thanks for any help.
    : >:
    : >: Jack
    : >: ===========================
    :
    : It's only locked to you and I.
    :
    : I'm looking for a way to have Windows do it (without re-booting
    constantly).
    :
    : Thanks.
    :
    : Jack
    :
    :
  17. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    J. Yazel <jyazel@ds.net> wrote in
    news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com:

    >
    > When I run the program, the disk writes and reads actually work
    > against the
    > swap file almost the whole time. The program is almost finished when
    > the "real" disk I/O gets going. Therefore, if any error occurs during
    > the "real" I/O, the program can't handle it. Typical errors include
    > different bytes in the source and target files, different file dates,
    > times, size, etc.
    >


    I don't think you want to turn off the swap file, you want to turn off the
    disk cache. That, i think, can be done via a registry setting that I don't
    know offhand.

    the function of the swap file is different, It stores inactive executable
    and data memory so you can run more programs than physical ram will allow,
    but it doesn't act as a disk cache. It would be useless to have a disk
    cache reside on a the same physical media that you're trying to cache, it
    would seriously hurt performace rather than help.
  18. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Tue, 22 Mar 2005 02:00:05 +0000 (UTC), hashi <me@privacy.net> wrote:
    >
    >I don't think you want to turn off the swap file, you want to turn off the
    >disk cache. That, i think, can be done via a registry setting that I don't
    >know offhand.
    >
    >the function of the swap file is different, It stores inactive executable
    >and data memory so you can run more programs than physical ram will allow,
    >but it doesn't act as a disk cache. It would be useless to have a disk
    >cache reside on a the same physical media that you're trying to cache, it
    >would seriously hurt performace rather than help.
    >
    ===============================

    Great!! You have just made my day (by ruining my plans).

    I've been working on the wrong thing all of this time.

    Now I can start over by learning about the disk cache. I don't know
    how I ignored that. Probably because I don't program the O/S, I guess.

    Many thanks (seriously).

    Jack
  19. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Ah, that makes sense. Thank you and on to editing the registry yet again.
    <boys and girls --- make sure you all back-up the registry before editing it
    so you will have a back-up and I do not suggest even tinkering with the
    registry unless you have an expert by your side or you are the expert> LOL!!
    :~>

    "hashi" <me@privacy.net> wrote in message
    news:Xns9620CB8603112776852d3f2@news.aioe.org...
    : J. Yazel <jyazel@ds.net> wrote in
    : news:12hs31pbnukff1vuulrh8abujs4p1f7qvn@4ax.com:
    :
    : >
    : > When I run the program, the disk writes and reads actually work
    : > against the
    : > swap file almost the whole time. The program is almost finished when
    : > the "real" disk I/O gets going. Therefore, if any error occurs during
    : > the "real" I/O, the program can't handle it. Typical errors include
    : > different bytes in the source and target files, different file dates,
    : > times, size, etc.
    : >
    :
    :
    : I don't think you want to turn off the swap file, you want to turn off the
    : disk cache. That, i think, can be done via a registry setting that I don't
    : know offhand.
    :
    : the function of the swap file is different, It stores inactive executable
    : and data memory so you can run more programs than physical ram will allow,
    : but it doesn't act as a disk cache. It would be useless to have a disk
    : cache reside on a the same physical media that you're trying to cache, it
    : would seriously hurt performace rather than help.
    :
    :
    :
  20. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Another suggestion is finding a friend who will help you with your computer.

    "J. Yazel" <jyazel@ds.net> wrote in message
    news:sf5u31hnbm3d4ria91bdj8cvnero6t4bai@4ax.com...
    : On Mon, 21 Mar 2005 09:11:37 -0700, "Dan" <spamyou@user.nec> wrote:
    :
    : >AFAIK, the .swp file is locked. I may be confusing this with something
    else
    : >386.swp --- <???> Any help is appreciated on this issue.
    : >
    : >"J. Yazel" <jyazel@ds.net> wrote in message
    : >news:4amr311dppfsfub0nu1cpi9lbe90isftdl@4ax.com...
    : >:
    : >: How can I disable the Win98 swap file?
    : >:
    : >: It causes some of my processing to occur out of sequence
    : >: and I would like to prevent that from happening.
    : >:
    : >: This is relating to my own programming.
    : >:
    : >: Thanks for any help.
    : >:
    : >: Jack
    : >: ===========================
    :
    : It's only locked to you and I.
    :
    : I'm looking for a way to have Windows do it (without re-booting
    constantly).
    :
    : Thanks.
    :
    : Jack
    :
    :
  21. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Yeah, Jack -- Jeff Richards, MVP really knows a lot and I am really glad that
    he is in this newsgroup. :>

    "J. Yazel" <jyazel@ds.net> wrote in message
    news:1r4u31dpu1jnci2l0htb62u0rc7d7t3g0i@4ax.com...
    : On Mon, 21 Mar 2005 15:44:40 +1100, "Jeff Richards" <JRichards@msn.com.au>
    : wrote:
    :
    : >It's not the swap file that's causing you a problem. Whether or not the
    swap
    : >file is involved in a copy operation should be completely invisible to a
    : >properly written program, whether DOS or Windows.
    : >
    : >You need to investigate why the messages from the copy or compare process
    : >aren't properly handled by your application. From your description it
    seems
    : >that you are invoking DOS utilities to do the copy and compare for you.
    : >This can mean that your application is not around to handle the error
    codes
    : >returned by these processes. I can't think of any other way that your
    : >program could be 'almost finished' before these messages are generated.
    : >
    : >If this is the way that the program is written, you need to look at how it
    : >is invoking these processes, and what you can change to ensure that it
    waits
    : >until the process is completed before either moving on to the next task or
    : >handling the returned error.
    : ================
    :
    : Thanks very much for the response.
    :
    : Jack
    :
  22. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    It's just a file like any other - not encoded or anything. So I guess it
    wouldn't be difficult to access it. Why you would want to is a mystery.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "Dan" <spamyou@user.nec> wrote in message
    news:e1Sf6AjLFHA.2420@TK2MSFTNGP12.phx.gbl...
    > Jeff can the swap file in 98SE easily be hacked? TIA
  23. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    It is a mystery to me as well but as of this year it seems like the whole
    Chaos theory that Gary S. Terhune was talking about is taking effect. I
    definately am going to read that book now that these events have happened.
    Have a great day and I was sad about the shooting that happened yesterday on
    the remote and poor Native American Reservation.

    In Memory of One of the Greatest MVPs,
    Alex Nichol (You will always be in our Hearts here at Microsoft)

    "Jeff Richards" <JRichards@msn.com.au> wrote in message
    news:%23BiyBToLFHA.3512@TK2MSFTNGP15.phx.gbl...
    : It's just a file like any other - not encoded or anything. So I guess it
    : wouldn't be difficult to access it. Why you would want to is a mystery.
    : --
    : Jeff Richards
    : MS MVP (Windows - Shell/User)
    : "Dan" <spamyou@user.nec> wrote in message
    : news:e1Sf6AjLFHA.2420@TK2MSFTNGP12.phx.gbl...
    : > Jeff can the swap file in 98SE easily be hacked? TIA
    :
    :
  24. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    The disk cache is essentially the same as the swap file as far as your
    problem is concerned - if the program is written properly it doesn't know or
    care whether Windows is caching the files or not. All that detail is taken
    care of by the operating system.

    If your program is bypassing Windows and accessing the disk directly then
    Windows' caching will be an issue.

    Why not post the segment of code in which you actually invoke the file copy
    operation or the file compare operation? That way someone can see if
    there's a different way of doing it that can avoid the problem.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "J. Yazel" <jyazel@ds.net> wrote in message
    news:sc4v31th9a7t7e6i3u2j77hiefk8o6o50c@4ax.com...
    > On Tue, 22 Mar 2005 02:00:05 +0000 (UTC), hashi <me@privacy.net> wrote:
    >>
    >>I don't think you want to turn off the swap file, you want to turn off the
    >>disk cache. That, i think, can be done via a registry setting that I don't
    >>know offhand.
    >>
    >>the function of the swap file is different, It stores inactive executable
    >>and data memory so you can run more programs than physical ram will allow,
    >>but it doesn't act as a disk cache. It would be useless to have a disk
    >>cache reside on a the same physical media that you're trying to cache, it
    >>would seriously hurt performace rather than help.
    >>
    > ===============================
    >
    > Great!! You have just made my day (by ruining my plans).
    >
    > I've been working on the wrong thing all of this time.
    >
    > Now I can start over by learning about the disk cache. I don't know
    > how I ignored that. Probably because I don't program the O/S, I guess.
    >
    > Many thanks (seriously).
    >
    > Jack
    >
  25. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "Jeff Richards" <JRichards@msn.com.au> wrote in
    news:udKDnRpLFHA.3076@tk2msftngp13.phx.gbl:

    > The disk cache is essentially the same as the swap file as far as your
    > problem is concerned - if the program is written properly it doesn't
    > know or care whether Windows is caching the files or not. All that
    > detail is taken care of by the operating system.

    I'd like furthur explanation of this. How is the swap file involved when
    he's trying to avoid reading cached data while trying to verify written
    data?
  26. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Many thanks, Jeff. I have never seen such a clear and concise response to
    that question. Have a great day! :>

    "Jeff Richards" <JRichards@msn.com.au> wrote in message
    news:udKDnRpLFHA.3076@tk2msftngp13.phx.gbl...
    : The disk cache is essentially the same as the swap file as far as your
    : problem is concerned - if the program is written properly it doesn't know
    or
    : care whether Windows is caching the files or not. All that detail is taken
    : care of by the operating system.
    :
    : If your program is bypassing Windows and accessing the disk directly then
    : Windows' caching will be an issue.
    :
    : Why not post the segment of code in which you actually invoke the file copy
    : operation or the file compare operation? That way someone can see if
    : there's a different way of doing it that can avoid the problem.
    : --
    : Jeff Richards
    : MS MVP (Windows - Shell/User)
    : "J. Yazel" <jyazel@ds.net> wrote in message
    : news:sc4v31th9a7t7e6i3u2j77hiefk8o6o50c@4ax.com...
    : > On Tue, 22 Mar 2005 02:00:05 +0000 (UTC), hashi <me@privacy.net> wrote:
    : >>
    : >>I don't think you want to turn off the swap file, you want to turn off
    the
    : >>disk cache. That, i think, can be done via a registry setting that I
    don't
    : >>know offhand.
    : >>
    : >>the function of the swap file is different, It stores inactive executable
    : >>and data memory so you can run more programs than physical ram will
    allow,
    : >>but it doesn't act as a disk cache. It would be useless to have a disk
    : >>cache reside on a the same physical media that you're trying to cache, it
    : >>would seriously hurt performace rather than help.
    : >>
    : > ===============================
    : >
    : > Great!! You have just made my day (by ruining my plans).
    : >
    : > I've been working on the wrong thing all of this time.
    : >
    : > Now I can start over by learning about the disk cache. I don't know
    : > how I ignored that. Probably because I don't program the O/S, I guess.
    : >
    : > Many thanks (seriously).
    : >
    : > Jack
    : >
    :
    :
  27. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Tue, 22 Mar 2005 01:54:50 -0700, "Dan" <spamyou@user.nec> wrote:

    >Have you tried calling Microsoft and asking them. If you cannot figure it
    >out then maybe I will give them yet another call --- remember 98SE is now
    >only paid support so you may be on your own with this one.
    >
    ==========================

    I'm not a business and can't afford that kind of help.

    Jack
  28. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Tue, 22 Mar 2005 15:06:15 +1100, "Jeff Richards" <JRichards@msn.com.au>
    wrote:

    >The disk cache is essentially the same as the swap file as far as your
    >problem is concerned - if the program is written properly it doesn't know or
    >care whether Windows is caching the files or not. All that detail is taken
    >care of by the operating system.
    >
    >If your program is bypassing Windows and accessing the disk directly then
    >Windows' caching will be an issue.
    >
    I'm not bypassing Windows. It uses standard DOS calls.

    >Why not post the segment of code in which you actually invoke the file copy
    >operation or the file compare operation? That way someone can see if
    >there's a different way of doing it that can avoid the problem.

    Thanks, but the program is not open source. There are also 5,000 lines
    of code in the program. It would be difficult to pick out what somebody might
    need to come up with an answer. Besides, I'm not looking for a programming
    answer, just a way to quickly turn off and on the caching without booting
    the system over and over.

    Jack
  29. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Both the swap file and the cache aren't involved and can be ignored if the
    files are being accessed properly.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "hashi" <me@privacy.net> wrote in message
    news:Xns9621135A21753776852d3f2@news.aioe.org...
    > "Jeff Richards" <JRichards@msn.com.au> wrote in
    > news:udKDnRpLFHA.3076@tk2msftngp13.phx.gbl:
    >
    >> The disk cache is essentially the same as the swap file as far as your
    >> problem is concerned - if the program is written properly it doesn't
    >> know or care whether Windows is caching the files or not. All that
    >> detail is taken care of by the operating system.
    >
    > I'd like furthur explanation of this. How is the swap file involved when
    > he's trying to avoid reading cached data while trying to verify written
    > data?
  30. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Thanks and Jeff do you know what process(es) are involved? TIA

    "Jeff Richards" <JRichards@msn.com.au> wrote in message
    news:ugyRTcsLFHA.244@TK2MSFTNGP12.phx.gbl...
    : Both the swap file and the cache aren't involved and can be ignored if the
    : files are being accessed properly.
    : --
    : Jeff Richards
    : MS MVP (Windows - Shell/User)
    : "hashi" <me@privacy.net> wrote in message
    : news:Xns9621135A21753776852d3f2@news.aioe.org...
    : > "Jeff Richards" <JRichards@msn.com.au> wrote in
    : > news:udKDnRpLFHA.3076@tk2msftngp13.phx.gbl:
    : >
    : >> The disk cache is essentially the same as the swap file as far as your
    : >> problem is concerned - if the program is written properly it doesn't
    : >> know or care whether Windows is caching the files or not. All that
    : >> detail is taken care of by the operating system.
    : >
    : > I'd like furthur explanation of this. How is the swap file involved when
    : > he's trying to avoid reading cached data while trying to verify written
    : > data?
    :
    :
  31. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "Jeff Richards" <JRichards@msn.com.au> wrote in
    news:ugyRTcsLFHA.244@TK2MSFTNGP12.phx.gbl:

    > Both the swap file and the cache aren't involved and can be ignored if
    > the files are being accessed properly.

    If I may ask, why can you ignore the disk cache when you're trying to
    perform read-after-write verify?

    consider the following...

    C:\>dir out.bin
    OUT BIN 1,457,000 03-22-05 9:04p out.bin

    C:\>copy out.bin a:\
    1 file(s) copied

    C:\>fc /b out.bin a:\out.bin
    Comparing files out.bin and a:\out.bin
    FC: no differences encountered

    (System Monitor shows the fc operation was entirely cache hits, there was
    no floppy disk access...after some other disk access to flush the disk
    cache...)

    C:\>fc /b out.bin a:\out.bin
    Comparing files out.bin and a:\out.bin

    Read fault error reading drive A
    Abort, Retry, Fail?a

    Seems pretty clear that you can't ignore the cache when you want to confirm
    that the written data is valid.
  32. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    There are no DOS calls that can disable Windows file caching. If you can
    establish a connection to Windows you may be able to create a system message
    that instructs Windows to flush the cache (I doubt that you need to turn it
    off). Any good reference on DOS programming under Windows should have a
    chapter on how to do that.

    However, a cache problem would be revealed as unexpected end of file
    problems or in compare failures when you know the data is OK. This doesn't
    sound like your problem.

    If you aren't prepared to share fragments of your code or information about
    your program structure then I doubt that anyone can help.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "J. Yazel" <jyazel@ds.net> wrote in message
    news:gfv041lg1oo61prn9bf2hslfrcu9pce251@4ax.com...
    > On Tue, 22 Mar 2005 15:06:15 +1100, "Jeff Richards" <JRichards@msn.com.au>
    > wrote:
    >
    >>The disk cache is essentially the same as the swap file as far as your
    >>problem is concerned - if the program is written properly it doesn't know
    >>or
    >>care whether Windows is caching the files or not. All that detail is
    >>taken
    >>care of by the operating system.
    >>
    >>If your program is bypassing Windows and accessing the disk directly then
    >>Windows' caching will be an issue.
    >>
    > I'm not bypassing Windows. It uses standard DOS calls.
    >
    >>Why not post the segment of code in which you actually invoke the file
    >>copy
    >>operation or the file compare operation? That way someone can see if
    >>there's a different way of doing it that can avoid the problem.
    >
    > Thanks, but the program is not open source. There are also 5,000 lines
    > of code in the program. It would be difficult to pick out what somebody
    > might
    > need to come up with an answer. Besides, I'm not looking for a programming
    > answer, just a way to quickly turn off and on the caching without booting
    > the system over and over.
    >
    > Jack
    >
  33. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    On Wed, 23 Mar 2005 11:00:30 +1100, "Jeff Richards" <JRichards@msn.com.au>
    wrote:

    >There are no DOS calls that can disable Windows file caching. If you can
    >establish a connection to Windows you may be able to create a system message
    >that instructs Windows to flush the cache (I doubt that you need to turn it
    >off). Any good reference on DOS programming under Windows should have a
    >chapter on how to do that.
    >
    >However, a cache problem would be revealed as unexpected end of file
    >problems or in compare failures when you know the data is OK. This doesn't
    >sound like your problem.
    >
    >If you aren't prepared to share fragments of your code or information about
    >your program structure then I doubt that anyone can help.
    ===============

    O.K., thanks.

    Jack
  34. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    J. Yazel wrote :
    }On Tue, 22 Mar 2005 02:00:05 +0000 (UTC), hashi <me@privacy.net> wrote:
    }>
    }>I don't think you want to turn off the swap file, you want to turn off
    }>the disk cache. That, i think, can be done via a registry setting that
    }>I don't know offhand.

    } Now I can start over by learning about the disk cache. I don't know
    }how I ignored that. Probably because I don't program the O/S, I guess.

    I, too, am a 'compare nut', and would greatly appreciate it if you'd
    share any solutions that you may come up with (I also do DOS .asm, but
    not Windows (per se)). An email response may be preferred, (see my .sig)
    but is not required. I'm especially looking for a way to clear the
    floppy read-cache (for obvious reasons).

    In the meantime, I've found that SCANDSKW will clear the read-cache.
    Hopefully, this .BAT example can be of help, if you're able to split the
    copy and compare functions:

    @echo off
    MyCopy
    %windir%\command\start.exe /w %windir%\scandskw.exe c: /n /silent
    MyCompare

    Ken

    --
    <<< Remove the '4' to reply via email >>>
  35. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    It's not clear whether the compare is being done with DOS utilities or not.
    OP has indicated the program uses 'standard DOS calls'. The possibility of
    DOS utilities was my guess at how the program could possibly be gone by the
    time the error was returned.

    The fact that your FC completed successfully when the files are accessed
    entirely from cache demonstrates what I am saying - that if the OS
    facilities are used then whether the file is in cache or on disk makes no
    difference - the OS treats the file the same and returns the correct data
    from the file whatever it's location. That's why we use the OS to do this
    sort of work for us. If OP is bypassing DOS and going direct to disk, the
    cache becomes relevant, but he's indicated he isn't doing that.

    That doesn't mean, of course, that his program operates properly, as your
    second test shows. That's why I wanted to see just how this program worked,
    and I am suspicious that it has exactly the problem you have identified. But
    his problem is not misreporting of a valid copy when it isn't. His problem
    is that the result of the compare operation is not being collected correctly
    by the program. In that context he can consider the cache and the swap file
    in the same terms.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "hashi" <me@privacy.net> wrote in message
    news:Xns9621DE0369D62776852d3f2@news.comcast.giganews.com...
    > "Jeff Richards" <JRichards@msn.com.au> wrote in
    > news:ugyRTcsLFHA.244@TK2MSFTNGP12.phx.gbl:
    >
    >> Both the swap file and the cache aren't involved and can be ignored if
    >> the files are being accessed properly.
    >
    > If I may ask, why can you ignore the disk cache when you're trying to
    > perform read-after-write verify?
    >
    > consider the following...
    >
    > C:\>dir out.bin
    > OUT BIN 1,457,000 03-22-05 9:04p out.bin
    >
    > C:\>copy out.bin a:\
    > 1 file(s) copied
    >
    > C:\>fc /b out.bin a:\out.bin
    > Comparing files out.bin and a:\out.bin
    > FC: no differences encountered
    >
    > (System Monitor shows the fc operation was entirely cache hits, there was
    > no floppy disk access...after some other disk access to flush the disk
    > cache...)
    >
    > C:\>fc /b out.bin a:\out.bin
    > Comparing files out.bin and a:\out.bin
    >
    > Read fault error reading drive A
    > Abort, Retry, Fail?a
    >
    > Seems pretty clear that you can't ignore the cache when you want to
    > confirm
    > that the written data is valid.
  36. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "If OP is bypassing DOS and going direct to disk, the cache becomes relevant,
    but he's indicated he isn't doing that." -- From Jeff Richards, MVP

    So, if the user goes directly to disk then like you say Jeff ". . . the
    cache becomes relevant. . . ." I hope the user makes this adjustment and
    posts back about how the procedure is going. This is really fascinating
    stuff to an intermediate user who is learning a lot each day about PC's and
    stuff to bolster Chris Quirkes, MVP's argument about a "True Maintenance
    Operating System" in Windows XP Professional and all the future operating
    systems. This user sees a "Clear And Present Danger" to computer security if
    Microsoft fails to address the false emulation of DOS that is used in a
    legacy mode in New Technology code that shows a "Clear And Present Danger" to
    all computer networks currently operating in XP PRO. and this is a reason
    this user dual boots with 98SE and XPPRO in a customized boot.ini with a
    customized registry on 2 seperate and hidden hard drives fully updated --
    fully backed up and ready to have a powerful offensive firewall and work with
    the federal, state and local governments to decrease the presence of DOS
    (Denial Of Service) protocals that have caused the Internet to descend into a
    State Of Chaos. Anyway, I am not here to Hijack this post so on with the
    above discussion and I just wanted to express the dangerous computer
    environment that the NT source code which parts of it have been leaked over
    the Internet represents to all computer users. The user looks forward to IE
    7 in 98SE as well as XPPRO. Have a nice day!

    "Jeff Richards" <JRichards@msn.com.au> wrote in message
    news:Opvb9G2LFHA.3336@TK2MSFTNGP10.phx.gbl...
    : It's not clear whether the compare is being done with DOS utilities or not.
    : OP has indicated the program uses 'standard DOS calls'. The possibility of
    : DOS utilities was my guess at how the program could possibly be gone by the
    : time the error was returned.
    :
    : The fact that your FC completed successfully when the files are accessed
    : entirely from cache demonstrates what I am saying - that if the OS
    : facilities are used then whether the file is in cache or on disk makes no
    : difference - the OS treats the file the same and returns the correct data
    : from the file whatever it's location. That's why we use the OS to do this
    : sort of work for us. If OP is bypassing DOS and going direct to disk, the
    : cache becomes relevant, but he's indicated he isn't doing that.
    :
    : That doesn't mean, of course, that his program operates properly, as your
    : second test shows. That's why I wanted to see just how this program worked,
    : and I am suspicious that it has exactly the problem you have identified.
    But
    : his problem is not misreporting of a valid copy when it isn't. His problem
    : is that the result of the compare operation is not being collected
    correctly
    : by the program. In that context he can consider the cache and the swap
    file
    : in the same terms.
    : --
    : Jeff Richards
    : MS MVP (Windows - Shell/User)
    : "hashi" <me@privacy.net> wrote in message
    : news:Xns9621DE0369D62776852d3f2@news.comcast.giganews.com...
    : > "Jeff Richards" <JRichards@msn.com.au> wrote in
    : > news:ugyRTcsLFHA.244@TK2MSFTNGP12.phx.gbl:
    : >
    : >> Both the swap file and the cache aren't involved and can be ignored if
    : >> the files are being accessed properly.
    : >
    : > If I may ask, why can you ignore the disk cache when you're trying to
    : > perform read-after-write verify?
    : >
    : > consider the following...
    : >
    : > C:\>dir out.bin
    : > OUT BIN 1,457,000 03-22-05 9:04p out.bin
    : >
    : > C:\>copy out.bin a:\
    : > 1 file(s) copied
    : >
    : > C:\>fc /b out.bin a:\out.bin
    : > Comparing files out.bin and a:\out.bin
    : > FC: no differences encountered
    : >
    : > (System Monitor shows the fc operation was entirely cache hits, there was
    : > no floppy disk access...after some other disk access to flush the disk
    : > cache...)
    : >
    : > C:\>fc /b out.bin a:\out.bin
    : > Comparing files out.bin and a:\out.bin
    : >
    : > Read fault error reading drive A
    : > Abort, Retry, Fail?a
    : >
    : > Seems pretty clear that you can't ignore the cache when you want to
    : > confirm
    : > that the written data is valid.
    :
    :
  37. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "Jeff Richards" <JRichards@msn.com.au> wrote in
    news:Opvb9G2LFHA.3336@TK2MSFTNGP10.phx.gbl:

    > It's not clear whether the compare is being done with DOS utilities or
    > not. OP has indicated the program uses 'standard DOS calls'. The
    > possibility of DOS utilities was my guess at how the program could
    > possibly be gone by the time the error was returned.

    But in my example, no error is returned. The dos utilities are using
    standard DOS calls, but the same results occur with the winAPI. With
    explorer, the file can be copied to this floppy and immediately copied off
    the floppy, but produces a "system cannot read from the specified device"
    once the cache has expired. Neither gets read errors because cached data
    would not produce a read error.

    > The fact that your FC completed successfully when the files are
    > accessed entirely from cache demonstrates what I am saying - that if
    > the OS facilities are used then whether the file is in cache or on
    > disk makes no difference - the OS treats the file the same and returns
    > the correct data from the file whatever it's location. That's why we
    > use the OS to do this sort of work for us. If OP is bypassing DOS and
    > going direct to disk, the cache becomes relevant, but he's indicated
    > he isn't doing that.

    How can this be right? How did the cache make no difference when the read
    was successful when the data was still in the cache but unsuccessful after
    the cached data expired and the system had to read the disk? As well, I'm
    not bypassing DOS or Windows, but the cache is certainly relevent.

    > That doesn't mean, of course, that his program operates properly, as
    > your second test shows. That's why I wanted to see just how this
    > program worked, and I am suspicious that it has exactly the problem
    > you have identified. But his problem is not misreporting of a valid
    > copy when it isn't. His problem is that the result of the compare
    > operation is not being collected correctly by the program. In that
    > context he can consider the cache and the swap file in the same terms.

    Don't the standard dos I/O functions block execution? If his program is
    using them, it would be unlikely that it is able to proceed without getting
    the results of those operations. It would be nonsensical to compare data
    and not look at the results. However, if the program is receiving cached
    data, the reads and compares would be successful operations just as my
    first FC was successful. This would explain why his program is done or
    processing other files without detecting the corruption in the past files
    he's processed.
  38. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    .. . . (my bad -- sorry) in the New Technology source code <NT 4, 2000, XP
    PRO and XP HOME>

    "Dan" <spamyou@user.nec> wrote in message
    news:O5psdi6LFHA.3420@tk2msftngp13.phx.gbl...
    :
    : "If OP is bypassing DOS and going direct to disk, the cache becomes
    relevant,
    : but he's indicated he isn't doing that." -- From Jeff Richards, MVP
    :
    : So, if the user goes directly to disk then like you say Jeff ". . . the
    : cache becomes relevant. . . ." I hope the user makes this adjustment and
    : posts back about how the procedure is going. This is really fascinating
    : stuff to an intermediate user who is learning a lot each day about PC's and
    : stuff to bolster Chris Quirkes, MVP's argument about a "True Maintenance
    : Operating System" in Windows XP Professional and all the future operating
    : systems. This user sees a "Clear And Present Danger" to computer security
    if
    : Microsoft fails to address the false emulation of DOS that is used in a
    : legacy mode in New Technology code that shows a "Clear And Present Danger"
    to
    : all computer networks currently operating in XP PRO. and this is a reason
    : this user dual boots with 98SE and XPPRO in a customized boot.ini with a
    : customized registry on 2 seperate and hidden hard drives fully updated --
    : fully backed up and ready to have a powerful offensive firewall and work
    with
    : the federal, state and local governments to decrease the presence of DOS
    : (Denial Of Service) protocals that have caused the Internet to descend into
    a
    : State Of Chaos. Anyway, I am not here to Hijack this post so on with the
    : above discussion and I just wanted to express the dangerous computer
    : environment that the NT source code which parts of it have been leaked over
    : the Internet represents to all computer users. The user looks forward to
    IE
    : 7 in 98SE as well as XPPRO. Have a nice day!
    :
    : "Jeff Richards" <JRichards@msn.com.au> wrote in message
    : news:Opvb9G2LFHA.3336@TK2MSFTNGP10.phx.gbl...
    : : It's not clear whether the compare is being done with DOS utilities or
    not.
    : : OP has indicated the program uses 'standard DOS calls'. The possibility
    of
    : : DOS utilities was my guess at how the program could possibly be gone by
    the
    : : time the error was returned.
    : :
    : : The fact that your FC completed successfully when the files are accessed
    : : entirely from cache demonstrates what I am saying - that if the OS
    : : facilities are used then whether the file is in cache or on disk makes no
    : : difference - the OS treats the file the same and returns the correct data
    : : from the file whatever it's location. That's why we use the OS to do
    this
    : : sort of work for us. If OP is bypassing DOS and going direct to disk,
    the
    : : cache becomes relevant, but he's indicated he isn't doing that.
    : :
    : : That doesn't mean, of course, that his program operates properly, as your
    : : second test shows. That's why I wanted to see just how this program
    worked,
    : : and I am suspicious that it has exactly the problem you have identified.
    : But
    : : his problem is not misreporting of a valid copy when it isn't. His
    problem
    : : is that the result of the compare operation is not being collected
    : correctly
    : : by the program. In that context he can consider the cache and the swap
    : file
    : : in the same terms.
    : : --
    : : Jeff Richards
    : : MS MVP (Windows - Shell/User)
    : : "hashi" <me@privacy.net> wrote in message
    : : news:Xns9621DE0369D62776852d3f2@news.comcast.giganews.com...
    : : > "Jeff Richards" <JRichards@msn.com.au> wrote in
    : : > news:ugyRTcsLFHA.244@TK2MSFTNGP12.phx.gbl:
    : : >
    : : >> Both the swap file and the cache aren't involved and can be ignored if
    : : >> the files are being accessed properly.
    : : >
    : : > If I may ask, why can you ignore the disk cache when you're trying to
    : : > perform read-after-write verify?
    : : >
    : : > consider the following...
    : : >
    : : > C:\>dir out.bin
    : : > OUT BIN 1,457,000 03-22-05 9:04p out.bin
    : : >
    : : > C:\>copy out.bin a:\
    : : > 1 file(s) copied
    : : >
    : : > C:\>fc /b out.bin a:\out.bin
    : : > Comparing files out.bin and a:\out.bin
    : : > FC: no differences encountered
    : : >
    : : > (System Monitor shows the fc operation was entirely cache hits, there
    was
    : : > no floppy disk access...after some other disk access to flush the disk
    : : > cache...)
    : : >
    : : > C:\>fc /b out.bin a:\out.bin
    : : > Comparing files out.bin and a:\out.bin
    : : >
    : : > Read fault error reading drive A
    : : > Abort, Retry, Fail?a
    : : >
    : : > Seems pretty clear that you can't ignore the cache when you want to
    : : > confirm
    : : > that the written data is valid.
    : :
    : :
    :
    :
  39. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "J. Yazel" <jyazel@ds.net> wrote in message news:gfv041lg1oo61prn9bf2hslfrcu9pce251@4ax.com...
    > On Tue, 22 Mar 2005 15:06:15 +1100, "Jeff Richards" <JRichards@msn.com.au>
    > wrote:
    >
    >>The disk cache is essentially the same as the swap file as far as your
    >>problem is concerned - if the program is written properly it doesn't know or
    >>care whether Windows is caching the files or not. All that detail is taken
    >>care of by the operating system.
    >>
    >>If your program is bypassing Windows and accessing the disk directly then
    >>Windows' caching will be an issue.
    >>
    > I'm not bypassing Windows. It uses standard DOS calls.

    This has really nothing to do with the Windows cache (afaik), since the
    virtual OS is unaware of the host.

    *Assuming that the DOS VM implements its own "virtual cache" for "DOS",
    flushing the DOS cache should then cause the VM to communicate this to
    Windows. You may need to flush the file to disk using the DOS "Flush"
    function before attempting the verify operation. Or you can use the DOS
    service, "Extended Open File", and direct it to auto-commit on all writes.

    You probably have Ralf Brown's interrupt list- Look for int 21h-
    services 6ch and 68h. On 6ch, set bit-6 of the bh register.
  40. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "hashi" <me@privacy.net> wrote in message
    news:Xns96225DE122420776852d3f2@news.comcast.giganews.com...
    > snip <
    > However, if the program is receiving cached
    > data, the reads and compares would be successful operations just as my
    > first FC was successful. This would explain why his program is done or
    > processing other files without detecting the corruption in the past files
    > he's processed.

    "is done [or] processing other files without detecting the corruption in the
    past files he's processed" is the key. If this is what's happening, then
    the cache is clearly the culprit, and your description of the problem is
    quite correct. I take it to mean that the program gets a success code from
    the operation, and something subsequent (such as a second attempt to read
    the file) then fails. Your test demonstrates how this can happen

    However, his description was "the disk writes and reads actually work
    against the swap file almost the whole time. The program is almost finished
    when the "real" disk I/O gets going. Therefore, if any error occurs during
    the "real" I/O, the program can't handle it." I take this to mean that the
    program is terminating before it is determining whether the operation
    completed properly or not, which indicates bad programming or bad program
    structure, and fiddling with either swap or cache won't help. But if it
    means that the program is seeing and handling a result message (eg, 'OK'),
    but a failure is occurring subsequently in a different operation, then your
    demonstration matches the problem exactly, and the cache is certainly
    relevant..
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
  41. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "Jeff Richards" <JRichards@msn.com.au> wrote in message news:uvPn2tEMFHA.1176@TK2MSFTNGP12.phx.gbl...
    > "hashi" <me@privacy.net> wrote in message news:Xns96225DE122420776852d3f2@news.comcast.giganews.com...
    >> snip <
    >> However, if the program is receiving cached
    >> data, the reads and compares would be successful operations just as my
    >> first FC was successful. This would explain why his program is done or
    >> processing other files without detecting the corruption in the past files
    >> he's processed.
    >
    > "is done [or] processing other files without detecting the corruption in the past files he's processed" is the key. If this is
    > what's happening, then the cache is clearly the culprit, and your description of the problem is quite correct. I take it to mean
    > that the program gets a success code from the operation, and something subsequent (such as a second attempt to read the file) then
    > fails. Your test demonstrates how this can happen
    >
    > However, his description was "the disk writes and reads actually work against the swap file almost the whole time. The program is
    > almost finished when the "real" disk I/O gets going. Therefore, if any error occurs during the "real" I/O, the program can't
    > handle it." I take this to mean that the program is terminating before it is determining whether the operation completed properly
    > or not, which indicates bad programming or bad program structure, and fiddling with either swap or cache won't help. But if it
    > means that the program is seeing and handling a result message (eg, 'OK'), but a failure is occurring subsequently in a different
    > operation, then your demonstration matches the problem exactly, and the cache is certainly relevant..

    The DOS file services do set an error or success (carry) flag and an
    error code on return. Assuming he is using the newer file handle services
    (as opposed to FCBs), extended error information can then be obtained by
    throwing an int21h-59h.

    WRITE TO FILE OR DEVICE
    http://www.ctyme.com/intr/rb-2791.htm

    GET EXTENDED ERROR INFORMATION
    http://www.ctyme.com/intr/rb-3012.htm

    There really is no way to continue program flow until the OS/interrupt
    returns this information.
  42. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Unfortunately, all we know is "standard DOS calls". Until OP chooses to
    provide a bit more detail, it's speculation.

    BTW, I haven't tried it but I'm not sure that a DOS flush file (int 21h,
    function 68h or 6ch) will do anything other than commit the file to the VM -
    Windows might or might not take notice of it for flushing its own buffers.
    Or possibly, to get Windows to flush the data might require the program to
    be running with the disk locked.
    --
    Jeff Richards
    MS MVP (Windows - Shell/User)
    "Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message
    news:eHfepiHMFHA.3548@TK2MSFTNGP10.phx.gbl...
    >
    > snip <
    >
    > The DOS file services do set an error or success (carry) flag and an
    > error code on return. Assuming he is using the newer file handle services
    > (as opposed to FCBs), extended error information can then be obtained by
    > throwing an int21h-59h.
    >
    > WRITE TO FILE OR DEVICE
    > http://www.ctyme.com/intr/rb-2791.htm
    >
    > GET EXTENDED ERROR INFORMATION
    > http://www.ctyme.com/intr/rb-3012.htm
    >
    > There really is no way to continue program flow until the OS/interrupt
    > returns this information.
    >
    >
    >
  43. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "Jeff Richards" <JRichards@msn.com.au> wrote in message news:e6qx6qMMFHA.4080@TK2MSFTNGP09.phx.gbl...
    > Unfortunately, all we know is "standard DOS calls". Until OP chooses to provide a bit more detail, it's speculation.

    I agree, but all the DOS file services do return a "success" or fail"
    flag/error code, including the absolute disk read/write functions.
    However..


    > BTW, I haven't tried it but I'm not sure that a DOS flush file (int 21h, function 68h or 6ch) will do anything other than commit
    > the file to the VM - Windows might or might not take notice of it for flushing its own buffers.

    ... that's probably the key, and I don't know either. I was speculating on
    what might be, but it would be easy to test. (For the OP, especially, since
    the problem code is already in place)

    > Or possibly, to get Windows to flush the data might require the program to be running with the disk locked.

    Does Windows honor a locked disk from a "VM/DOS" program, or would that be
    a lock only at the "virtual machine" level? If the former, I would think a
    flush/commit should be honored at the Windows level also. But that's just
    more speculation.

    It is an interesting question of how the VM interacts with the OS/cache
    manager regardless..
Ask a new question

Read More

Programming Microsoft Windows