MrLee
09-08-2003, 12:17 PM
I have a problem that i can't seem to solve.
When i run my program using the IDE, everything is fine but when i run it outside of the IDE i get a 'Memory could not be written' error.
I really do't know why it is happening.
It is really driving me crazy.I hope that someone has an idea of what this error/behavior is indicative of.
thx
Squishy
09-08-2003, 04:55 PM
Do you try to directly access the memory? When you run your program from the IDE, it runs inside the IDE's thread (VB6.exe). When you run a compiled program, it runs inside its own thread. If anything in your code tries to modify memory or the process, or some other related function, comment it out until you find the offending code.
Banjo
09-08-2003, 05:01 PM
Common culprits are CopyMemory and Subclassing.
MrLee
09-10-2003, 09:24 AM
Thx.i use a lot of subclassing and i use copymemory quite a lot.
I am going to try to follow them and see what the error is.Thx again
rbulph
09-10-2003, 09:59 AM
I had a similar experience, although the problem occurred in the IDE and not in exes. It might help you to look at it though:
http://www.visualbasicforum.com/showthread.php?t=91541
MrLee
09-16-2003, 02:37 PM
A year ago i had the same problem as you (Application error while coding).It had to do with user controls.I solved it.
But this time, i had the error while running the project in the IDE and not while running it in its own process..
I went through all the CopyMemory that i use and i isolated the guilty one.
thanks all for your help.I think that if i knew about that forum a year ago, it could have saved me a LOT of time (and i would have more head today....)