Sunday, August 7, 2011

.net application errors "object refrence not set to an instance of an object"?

As they are 3rd party apps, only the programmers really know, but at a guess, I would think that they are looking for a key in the registry that got loaded during installation or product registration. GetKey is not a member of the SystemInformation cl that comes as part of Microsoft's .Net library, so I am speculating about what it might do. I would get a copy of RegMon from MS (it used to by Sysinternals until MS bought them recently). Run RegMon, then run the failing program. RegMon will show all registry access, and I would be interested in any failures. As the other responder says, "object reference not set..." indicates that the code is trying to use an object variable that is not pointing to an object, which could happen if the code tries to read a key that doesn't exist in the registry and the programmers didn't provide good error handling.

No comments:

Post a Comment