COM Exception in VB6 to VB.NET conversion [modified]
-
Hello, I'm in the process of converting an application from VB6 to VB.NET. So far things have been going very smoothly, however I've come across an error I'm not sure how to get around. It happens on a line with a function that takes an object as its argument and returns a short. Basically what's supposed to happen is that if the result is not -1 then the app is supposed to close out due to it timing out if a button isn't clicked in time. So far, after stepping through, the aforementioned function seems to run without error, but when the app tries to compare the result against a constant (-1), then the error occurs. The error is this: Error Code 61837 Error Source is something I'm not sure how to duplicate with a keyboard, looks like 8 to the first power and a capital A with a tilde over it. Error message is "Unable to write read-only property" Here's the line in question:
If util_Pause(myObject.Property, 200) <> CONST_MINUSONE Then
Thanks in advance [EDIT] Okay, I fixed the issue, though any advice for the future would be welcome. I just set an object variable equal to what I was originally throwing into the function and just threw that in as the argument. That fixed the issue.modified on Friday, March 20, 2009 8:57 AM