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

Changing the threading model of a com component 1

Status
Not open for further replies.

sweta

Programmer
Apr 1, 2003
35
0
0
IN
Hi there,

I made a dll in VB and later registered it with COM+ as a server application. After registering the component I found that the threading model for the component was set to be Single threaded apartment.Same was the threading model for Library application as well. I want to change the threading model to 'any apartemnt'. Can anybody suggest how to do it.

Thanks,
Sweta
 
I think the threading model should be set to apartment thread by default, unless you include any OCX's etc. that will only run in single thread mode, in which case the threading model will change to single when you try to compile the dll.

To change the theading model, open the DLL project and click on the project properties option on the project menu. Under the general tab therer is an drop down to select the threading model.

Hope this helps.
 
Hi there,

I've not included any OCX in my DLL file. And the threding model for my dll is Apartment threaded only, even after compiling it. Its only when I register the component with COM+ that the threading model changes to STA. Is there a way that I can change it while making the COM+ application.

thanks,
Sweta

 
Thanks for this information John.This was quite a helpful info.

Have a great day!!
Sweta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top