"memory cannot be read" error. programmers pleas

What i'm doing is writing a program in VB 6 that will call on the API to list the names and positions of all windows/processes running. The purpose of this is to store positions of windows that way after a change of resolution i can restore each window to it's original position.

Windows Software 5498 This topic was started by ,


data/avatar/default/avatar11.webp

132 Posts
Location -
Joined 2000-02-02
What i'm doing is writing a program in VB 6 that will call on the API to list the names and positions of all windows/processes running.
The purpose of this is to store positions of windows that way after a change of resolution i can restore each window to it's original position.
 
It all works great and fine in 95 and 98...but when i call on the API in win2k CRASH "Application popup: windows.exe - Application Error : The instruction at "0x00000000" referenced memory at "0x00000000". The memory could not be "read"." and the program closes.
 
Why would this run in 95 and 98 but not 2k? I've tried using the application compatibility programs and none work...Is there a different API for windows2000?
 
please help out
 
Ancker Jade

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar36.webp

1207 Posts
Location -
Joined 2000-03-27
I can't tell you exactly why you are getting this message, but of all the Win2k machines I've seen I can say this isn't an uncommon message to get.
If you seach knowledge base for this error message you'll only find one result - if you are using NetFolders and a fix is available from MS.
I've seen this error on user's PC's whilst they are running Say Word 2000.
When browsing the Internet.
I've had it at home when exiting games.
I can't find anything common to the times I've seen it except it has always been under Win2k.
It has never plagued any of the PC's I've worked on, just very occasionally appears.
I'm hoping SP2 sorts it out.

data/avatar/default/avatar11.webp

132 Posts
Location -
Joined 2000-02-02
OP
I wish it were random...
 
It happens on both 2k boxes i've tried on...
 
1 Pro
1 server..
 
odd...
 
Yes let us HOPE SP2 fixes it
 
Ancker

data/avatar/default/avatar32.webp

671 Posts
Location -
Joined 2000-05-04
I get it fairly regularly on my home PC and occaisionaly on my work PC (both Win2k), but I get it a whole shed load on another machine at work which is NT 4 Workstation .

data/avatar/default/avatar21.webp

251 Posts
Location -
Joined 2000-10-25
I got this problem because I had a bad ram module. It never showed up while running a 9x OS but as soon as I switched to 2k and later XP the error was constant. I replaced the faulty modeule and everything worked great after.

data/avatar/default/avatar17.webp

757 Posts
Location -
Joined 2000-10-14
It cant be faulty ram. The addressing code is just incorrect. When the instruction sets itself to look at the address for further instructions, it just loops....horribly. The memory could not be "read" because its looping on itself. Wouldnt faulty ram just fail to work, as opposed to giving a addressing error. Monitor the cpu usage at this point and see if it spikes.

data/avatar/default/avatar39.webp

11 Posts
Location -
Joined 2000-02-22
Are you returning any ints in your vb code? If you are change them to longs and see if that helps. I forgot where I read it, but I remember reading something about how since W2K is a 32 bit operating system, it does not handle 16 bit number being returned properly. It tries to read them as a 32 bit number, thus possibly the "memory cannot be read" error.

data/avatar/default/avatar11.webp

132 Posts
Location -
Joined 2000-02-02
OP
I did a find...replace from Integer to Long. No good. Still the error.
 
Ancker