Set the value of one COM object member variable failed

J

jos

Hi,all
I wrote a C# project ,in this project , when I create the COM object ,it turns out no error , When I try to get the value of the object's member variable ,it can return the value successfully,but when I try to set the value of the object's member variable,it throws out a "unknown error"!

Could anybody tell me why?

-ja
 
N

Nicholas Paldino [.NET/C# MVP]

jos,

Is it an exception? If so, what is the type of the exception? Can you show some sample code? Also, are you sure that the property isn't read-only?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Hi,all
I wrote a C# project ,in this project , when I create the COM object ,it turns out no error , When I try to get the value of the object's member variable ,it can return the value successfully,but when I try to set the value of the object's member variable,it throws out a "unknown error"!

Could anybody tell me why?

-ja
 
J

jos

Yes, it is not readonly, some other projects also use the COM component, they can set the value of object's member variable.
"Nicholas Paldino [.NET/C# MVP]" <[email protected]> дÈëÏûÏ¢ÐÂÎÅ:%[email protected]...
jos,

Is it an exception? If so, what is the type of the exception? Can you show some sample code? Also, are you sure that the property isn't read-only?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Hi,all
I wrote a C# project ,in this project , when I create the COM object ,it turns out no error , When I try to get the value of the object's member variable ,it can return the value successfully,but when I try to set the value of the object's member variable,it throws out a "unknown error"!

Could anybody tell me why?

-ja
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top