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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative to Friend in COM+

Status
Not open for further replies.

SemperFiDownUnda

Instructor
Aug 6, 2002
1,561
AU
Hello Guys and Gals,
My brain is mush and I'm trying to think of the best solution to a problem and I just can't think so please help if you can because I know I'm just missing something.

I have an exsisting component with n classes in it. I went through and made it pretty much stateless but the original authors have made things tricky for me. Currently all the classes are public and they have some classes using friend functions for things that are allowed to be used internally. But since you can't use Friend functions if you use GetObjectContext.CreateInstance() and I'm worried about using NEW until I do a bunch of testing to make sure it is properly the part of the current transaction.

How do you handle a situation where you need a class internal to your component in the same transaction but you don't want that class exposed outside the component. For it to have a MTSTransaction mode it has to be exposed outside. My brain is mush....should I just be using NEW and have them set to private to get them enveloped in the components transaction?

Sorry for the probably easy question but ... Senility....its hitting me hard today.
 
My brain has come back to me.

I should be using NEW or CreateObject with the classes I want to use Friend functions in. Better yet should make the classes private but the methods public.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top