![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Anything exposed as COM/COM+ can't be static, but it can call static methods of other non-COM+ classes. I don't think it's wise to have much processing in a COM+ constructor. It can be nasty if an exception occurs in the constructor - will the class instance still be created? How will the memory be freed? How will the COM caller handle an exception rasied in the constructor? I like to keep the COM+ constructors as light as possible. I put the "heavy" processing in an "Init" method that I define inside the same class. That way the constuction will succeed, and if there's a problem in the Init method, the caller will still have an instance to the object, so there's a well defined state at all times. Eric Eric is right. Nothing in COM+ can be static due to context sensitivity. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |