Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COM and DCOM How do I...
Message
From
09/04/2002 10:44:24
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00634650
Message ID:
00642680
Views:
14
Thank you Nick for the education. Greatly appreciate it....

>>>>Hello all.
>>>>
>>>>Is there a literature somewhere that I can read to learn how to COM/DCOM in VFP?
>>>>
>>>>Thanks ...
>>>
>>>Dean, try
>>>
>>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxgen7/html/vfpandcom.asp
>>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fox7help/html/newcontrolling_call_blocking.asp
>>>http://msdn.microsoft.com/library/techart/msdn_raresp.htm
>>>http://msdn.microsoft.com/library/backgrnd/html/msdn_dcomfirewall.htm
>>>http://msdn.microsoft.com/msdnmag/issues/01/10/VFP7/print.asp
>>
>>Hi Nick.
>>
>>I just created my first COM object.
>>I have another question.
>>
>>When you create the DLL, what is the difference between Single-threaded and multi-threaded?
>>
>>Thanks again.
>
>Hi Dean,
>
>In a multi-threaded environment the process of the request execution may be interrupted by other requests.
>
>As an example, three client requests arrive to your multi-threaded COM DLL almost at the same time. First request runs some long calculation method in your COM and other two just want to query some COM property.
>
>In a single-threaded environment the last two requests have to wait until the first one is finished, say in a minute and then the other two requests are executed for one second each. So, all three clients got the result in about one minute each. In a multi-threaded environment the long process can be interrupted with others. The result is that for the first long query the execution time will slightly increase, but two short ones are executed almost at once.
>
>So, the multithreaded COM will have a better performance from the user point of view. It does not mean that several simultaneous calls to COM will take less total time. There is still just one processor to execute all calls, plus it needs the time for the thread switching. The real performance increase can happen only on multiprocessor PC.
>
>Note, that programming for multithreaded COM is different from writing the normal code. You supposed to use the SYS(2336) function which can lock and unlock the critical sections of the program where no any interference from other threads, calling the same code, may be allowed. Programming for multithreaded COM also should be a topic for a separate session. :)
>
>The Multithreaded DLL option first appeared in VFP 6 Service Pack 3 and in order to take advantage of it you are supposed to use a different runtime library - VFP6T.DLL You should refer to the documentation as there is some difference in VFP features supported in normal VFP6R.DLL and VFP6T.DLL
>Multithreaded DLL can be used only with "Multi-Use" option, while single-threaded DLL may be both Single-Use and Multi-Use. Multithreaded DLLs is what you should use, for example, for the heavy load web site programming.
Work as if you don't need money
Love as if you've never been hurt before
Live as if this is your last day to live
Dance as if no one's watching
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform