Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I just had a new computer installed and when I open the....

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I just had a new computer installed and I installed the VB6.0. I copied over the VB project from my old computer but when I opened the forms, I go this error message:

"The instruction at "0x004581f1" referenced memory at "0x00000000". The memory could not be read."

Any help will be greatly appreciated.

 
Hi Ed,
Thisis one of the common problems faced. However, there are several reason for which this

problem can occur

1. Check out the Temp Directory :-
If you donnot have the Tempdirectory then this may happen. Since VB creates

temporary files in the same location. It could even be a space problem.

2. Check for the Permissions :-
If you have installed VB on NT os and your Visual Studio files are on an NTFS partition

then the problem might have occurred due to less permissions on certain liabraries.
Exactly which files are not accessed properly by the Application can be found out by turning

the "Object Access Auditing" option on from the "User Manager for Domains" admin utility

in NT.

First clear of All the Event Logs (Application, System, Security) and then run VB. And then

immediately check the Security log. You'll see the descriptions adn find out which file(s) are

not accesed by VB. Give the permissions and then it'll work.

I had faced similar problems before and I solved it like that.

Well, if this these are not the solutions for u then it could be just because of Incomplete

Installation of the Libraries.

I would definitely like to help you in this if you give me some more details. Cauz I have been administering the Machines for these kinds of problems very often.

All The Best
Atul
 
Hi Atul,

Thanks for your immediate reply.

My VB project was created under Windows NT. My new OS is Windows 2000. Is there any compatibilty issues when I migrated the project from NT to 2000.

I tried the steps you had mentioned:

1. Temp Directory. I don't know it this is what you mean, but I created a Temp folder in C:\Program Files\Microsoft Studio\vb98.

2. I quite lost with the Permissions.

Any help will be greatly appreciated.

 
Do you have administrator priveledge on your new PC (ie. are you a member of the local administrators group?)

And... have you applied the same Visual Studio service pack?

Chip H.
 
Thanks chiph,

My user name is included in the administrator group. I'm not quite sure on the 2nd item, the VS service pack. When I installed VB 6.0 on my new PC, I used the same cd-rom as when I Installed on my old PC (I apologize for my ignorance, if this is not what you mean).
 
Hi Ed,
By looking at the problems you hae mentioned, I guess that there is Little more explanation needed.

First, about the "Temp" folder.

The Temp folder is in 2 locations.
Assume that you have installed Win2k (i.e. 2000)on C: then.. there will be "C:\Temp" and "C:\winnt\Temp"

If anyone of them is missing, create them.
If this doesn't solve, u may have to go thru the Auditing options.

BTW, I may use the term NT and Win2k i.e. 2000 alternatively. As far as implementation is concerned, all the 200 OS's are based on NT only.

Well, NT/win2k gives an option of auditing certain events on your system. There are category of such events, one of which is "Object Accesses". Another one could be "Logon Requests".
Object in NT/Win2k could be anything like Processor or a File. What we are trying to do here is, Audit the Failures in File accesses of a specific folder. e.g. If we have a doubt that your error is coming due to failure of accessing some "xyz.dll" in the Folder "xyz" then, we can turn on the auditing on for the Folder.

Now if any process tries to access the files from the "xyz" folder, and fails to do so, the OS will log this event in the Secirity log. There a little more explaination could be found out and maybe the name of the file too.

Once we come to know about the file which is not being accessed, we can simply give explicit permissions on that file. And the problem might be solved.

But..as I said, there is a problem. And the problem is that this Auditing option is Available only for those partitions which are formatted thru NTFS. If that is so, you can check out help on "Auditing" from Win2k help.

Hope this will clarify certain things to u.

You have to be more Clear in the specification of the OS. Cauz in Win2k also there are many, like Win2k Professional, Win2k Server, Win2k Advanced Server etc.

You can mail me back sure.
bye
Atul
 
A. If the error is at design-time try to instal Service Pack 4 or 5 for Visual Studio


B. If the error is at run-time:

I have write programs that run very fine on Windows98/ME but crush on NT4.0 or WIN2000 with the same simptoms that you have.
This is because the slightly difference on interpreting the parameters for API call on the two platforms.
(I had this problem with a call to ReadFile API call)
I Suggest you start the program from VB, with your sources, go line by line BEFORE any suspect API call and you will find the cause.

Hope this helps,s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
I've encountered this before, it usually happens when the VB project loads all the components your project uses, and somehow some of the components are of different version (i think!!!). what happens is that the cursor changes to the "CROSSHAIR" icon, which means it is referencing an active-x component, but when you click on the form, you suddenly get the error. all you have to do is to open your project in DESIGN MODE and simply click the "ARROW" pointer in the "TOOLBOX", this would change the cursor back to the default "ARROW", and you can start your project
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top