d2007 & runtime error 255

I have an app that runs on a flash drive and one of the functions is to
make a clone of itself to a new flash drive. that works fine. At
the end I tell the user to put back the original flash drive or
continue working on the new one. When the dialog completes, if they
leave the copied flash drive in place the program seems to work but
doesn't. A separate empty window opens with the programs name but no
content and it does nothing.

I decided to restart the program at the end. My first approach was to
to a postquitmessage followed by a shellexecute. That actually worked
but after the program restarted, the cursor remains an hourglass for a
bit and then a "This program performed blah..blah..blah" message popped
up and when you close it I get a dialog box with Runtime error 255 at
0042021C. When I looked at the technical details it said "inpage error
at ...". Nothing on Google for error code 255 seems relevant. I googled
"restart Program" and found nearly the exact same thing I was doing
except it was shellexecute first and then appliation terminate.

I changed to that and it still fails exactly the same way -- every
time. I tried this on vista and I get no such error messages. Note when
I accept shutting down the program, the new instance works just fine so
the error must be coming from the old instance.

I'm just about ready to make a batch file to restart the program.
Anyone have a better idea or know what the 255 error relates to Mostly
I'm working in xp-pro on a ms vm on a vista business machine so I can't
actually test the program there. I use a separate machine with xp-pro
to test but the error also happens on XP-Home.


Posted On: Wednesday 19th of September 2012 04:02:21 AM Total Views:  288
View Complete with Replies