Announcement

Collapse
No announcement yet.

Win32Api.inc deleting?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • John Kovacich
    replied
    Have you ruled out disk corruption with scandisk (or your favorite
    disk utility)?

    I have had corrupt source files, but the corruption seemed to move
    around, because the disk itself was corrupt, and the files were not
    writing correctly.



    ------------------
    Thanks,

    John Kovacich
    Ivory Tower Software
    www.i-tower.com

    Try MsgBoxPlus for easy MSGBOX's with custom buttons and graphic backgrounds.

    Leave a comment:


  • Todd Wasson
    replied
    Eric,

    It's getting late, so I'll check into what those bytes are
    another time. They always appear in the same place in Win32api.inc,
    and after trying to compile another program (after the Win32api.inc
    was corrupted), a different file that's included was also corrupted.

    Luckily, it's short so I can just go through and delete the
    characters and everything's fine, or just copy over the backup.

    I am sure you're right about Graphics Tools NOT being related to
    the problem, as it happens during compile time. Somehow, the
    characters are thrown in, then an error pops up about missing
    stuff in win32api.inc and it doesn't complete the compile.
    (Viewed with Wordpad.)

    I'll try write protecting win32api.inc as you suggested and
    see what happens.

    I don't think it's a virus. This is a program that I wrote over
    a year and a half ago that needs a modification for someone (the SAS
    prog at my site). The same thing happened during development, but
    only towards the end, and I've never had it happen with any other
    program. Could it be a memory problem or something? The prog is my
    longest, at almost 10,000 lines.

    Anyway, I'll check out the scan code and let you know.

    Thanks for your quick replies,

    ------------------
    Todd Wasson
    -------------
    Performance Simulations
    Drag Racing and Top Speed
    Prediction Software http://PerformanceSimulations.Com

    [This message has been edited by Todd Wasson (edited August 22, 2001).]

    Leave a comment:


  • Eric Pearson
    replied
    [More]

    > These are visible through Windows Explorer

    Visible how? I'm not aware of any file viewers that are built into Explorer. Do you mean Notepad or Wordpad?

    -- Eric

    Leave a comment:


  • Eric Pearson
    replied
    Todd --

    I have never heard of this problem before. But I feel confident in saying -- and I'm pretty sure that PowerBASIC will agree with me -- that if this is a compile-time problem you can rule out Graphics Tools as the cause.

    At compile time, the only part of Graphics Tools that is involved is DECLARE statements and equate definitions in the GfxTools.INC file. In other words, 100.00% source code. As far as I know there is no way for a "bug" in a source code file to cause a problem like this. Almost by definition, if the compiler runs across an error in source code it should display a compile-time error message.

    That being said, it also seems unlikely that the compiler itself is corrupting the file (unless the compiler has been damaged in some way). I doubt that any type of "write" operation is ever performed on a source file by a PowerBASIC compiler.

    Have you tried write-protecting the WIN32API.INC file? If something is corrupting it, it seems like that program would fail (or display an error message) when it encountered the read-only file.

    > those are escape characters, right?.

    Well, they are probably control characters (ASCII < 32) or high-bit characters (ASCII > 127). Try using an editor that will allow you to display the file using the System or Fixed Sys font, which both include most of the high-bit characters.

    Are the characters always the same, and always in the same place? You can use an editor like UltraEdit to examine the ASCII values of the actual characters, instead of relying on the editor to display the characters. (The shareware version of UE can be downloaded from UltraEdit.com.)

    If it possible that your PBDLL.EXE file has been corrupted? What's the date stamp? The file size?

    Have you checked your system for viruses?

    -- Eric Pearson, Perfect Sync Software


    ------------------
    Perfect Sync Development Tools
    Perfect Sync Web Site
    Contact Us: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited August 22, 2001).]

    Leave a comment:


  • Don Dickinson
    replied
    They're not necessarily esc codes - they're just non-displayable ascii characters. Like a chr$(1,2, etc). Very weird I wonder how they're getting into that file. You might want to checkout those bytes in the file as see what their ascii value is. It might provide a further clue. Good luck!
    --Don

    ------------------
    dickinson.basicguru.com

    Leave a comment:


  • Todd Wasson
    replied
    Found a clue. After a file (turns out to mess up any included file)
    is compiled, it puts a series of what look like escape key codes.
    For instance, at the end of this part of Win32api.inc, there are four
    small squares inserted (those are escape characters, right?.)

    "You have a royalty-free right to use, modify, " (four little squares)

    These are visible through Windows Explorer and several of these are
    scattered throughout any included file after compiling. Any idea why
    they might be showing up? Only the one program causes this to happen,
    so I doubt it's a problem with the PowerBasic compiler, and it's the
    only Graphics Tools aided program that fails.

    Thanks,

    ------------------
    Todd Wasson
    -------------
    Performance Simulations
    Drag Racing and Top Speed
    Prediction Software
    http://PerformanceSimulations.Com

    Leave a comment:


  • Todd Wasson
    started a topic Win32Api.inc deleting?

    Win32Api.inc deleting?

    Hi,

    With one particular program (330+kb source) I wrote, I'm having
    a problem. Occasionally, after compiling+executing, the Win32api.inc
    file gets "deleted." It's still readable through Windows Explorer,
    only I can't open it with PowerBasic DLL, nor include it in a file
    after this happens. This is frustrating, yet I'm pretty sure it's
    my fault as this only happens with one program. The program has one
    small .pbr file (for one icon only), and includes GFXTools.inc.

    Sorry I'm short on details, but has anyone run into this before?

    Thanks,


    ------------------
    Todd Wasson
    -------------
    Performance Simulations
    Drag Racing and Top Speed
    Prediction Software
    http://PerformanceSimulations.Com
Working...
X