Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ProcessId and ThreadId
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00568380
Message ID:
00568414
Views:
21
Hi!

Costas, there is BIG difference between mutli-threaded application and multi-threaded COM object. In app - yes, you will have some code that will create new threads. For COM object it is depended on what use that COM object. For example, in the COM+ you define how object is called by COM+ (as far as I remember). When you specify Multithreaded/MultiUse during COM object compiling, you just notify all applications that use that object that it may be used as multi-threaded (and also DLL is compiled to use another VFP run-time to support this).
In addition, as far as I know, VFP COM objects are not compartible with certain models of multi-threaded COM objects, so COM+ cannot use, for example, COM+ pooling for VFP COM objects (and for VB too, do not know about .NET).

>Does anyone know why ThreadId is the same for all the instances of a multithreaded object? I can see why ProcessId is the same, but I would think that ThreadId would be different for each instance. If not then how does VFP or the OS track each thread's object properties? There must be some unique handle.
>
>The object is compiled as Multithreaded/MultiUse OLEPUBLIC. I then display the Application.ThreadId for each instance after I do a createObject().
>
>
>Thanks
>
>Costas
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform