Click here to Skip to main content
15,890,557 members

Lim Bio Liong - Professional Profile



Summary

    Blog RSS
64,911
Author
1,663
Authority
588
Debator
112
Organiser
1,019
Participant
0
Editor
0
Enquirer
Lim Bio Liong is a Specialist at a leading Software House in Singapore.

Bio has been in software development for over 10 years. He specialises in C/C++ programming and Windows software development.

Bio has also done device-driver development and enjoys low-level programming. Bio has recently picked up C# programming and has been researching in this area.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralInstantiating Member Data Which Are References Pin
Lim Bio Liong22-Feb-05 16:52
Lim Bio Liong22-Feb-05 16:52 
GeneralRegistry Location of Services and Device Drivers Pin
Lim Bio Liong31-Jan-05 20:07
Lim Bio Liong31-Jan-05 20:07 
GeneralNew Year @ CodeProject Pin
Lim Bio Liong31-Dec-04 17:05
Lim Bio Liong31-Dec-04 17:05 
GeneralRe: New Year @ CodeProject Pin
ThatsAlok1-Jan-06 23:42
ThatsAlok1-Jan-06 23:42 
GeneralAn Interesting Question From Microsoft's COM Newsgroup Pin
Lim Bio Liong30-Dec-04 22:17
Lim Bio Liong30-Dec-04 22:17 
GeneralRe: An Interesting Question From Microsoft's COM Newsgroup Pin
Lim Bio Liong30-Dec-04 22:19
Lim Bio Liong30-Dec-04 22:19 
GeneralRe: An Interesting Question From Microsoft's COM Newsgroup Pin
Lim Bio Liong30-Dec-04 22:20
Lim Bio Liong30-Dec-04 22:20 
GeneralRe: An Interesting Question From Microsoft's COM Newsgroup Pin
Lim Bio Liong30-Dec-04 22:21
Lim Bio Liong30-Dec-04 22:21 
Answer from Bio :

Hello blueturtle,

Here are my thoughts concerning why "A" worked while "B" did not :

1. The fact that "A" and "B" are both marked in the registry as
"ThreadingModel=Apartment" indicates that they are both STA (Single-Threaded
Apartment) objects.

2. Now, for both "A" and "B", the whole idea behind making them STA objects
is to ensure their thread safety without having to use additional
thread-synchronization code. However, as you have explained, you have already
personally ensured that no two threads access them at any time.

3. Therefore, as far as "A" is concerned, passing a direct pointer to it to
other threads and then calling its methods from those threads, while
technically unsound, did not pose any danger. You -have- broken the rules.
But the rules were not needed anyway.

4. If you had marshalled "A" across to thread 3 and thread 4, thread 3 and
thread 4 will not receive a direct pointer to "A". They will instead each
receive a proxy to "A". Method calls to "A" will have to go through the
marshalling process and a private message will be sent to the message loop of
thread 2 (the thread which created "A") which will eventually result in the
execution of the method.

5. Point 4 entails some performance penalties as you can imagine. In fact,
since you have ensured that no two threads will ever touch "A" at anytime,
"A" is technically a Free-Threaded Object.

6. Now, on to "B". You mentioned that "B" is written in VB. This can be
significant. Because STA objects have the advantage of thread-affinity, VB
uses thread-local storage (TLS) to store various state information on
VB-generated COM objects. The thread whose local storage is used is the
thread of the STA in which the COM object lives in and is also the one which
created it.

7. Using these VB-generated COM objects from an external thread without
marshalling is thus fatal. They will not be able to access information stored
inside their TLS.

Hope the above helps.

Best Regards,
Bio.

PS : just curious : Did you transport the interface pointer from thread to
thread via thread parameters ?

GeneralRe: An Interesting Question From Microsoft's COM Newsgroup Pin
Lim Bio Liong30-Dec-04 22:22
Lim Bio Liong30-Dec-04 22:22 
GeneralHappy New Year Pin
Lim Bio Liong30-Dec-04 18:52
Lim Bio Liong30-Dec-04 18:52 
GeneralConcerning coclass's Pin
Lim Bio Liong27-Dec-04 15:11
Lim Bio Liong27-Dec-04 15:11 
GeneralConcerning the Thread that Registers A Class Object in a COM Exe Server Pin
Lim Bio Liong25-Dec-04 20:10
Lim Bio Liong25-Dec-04 20:10 
GeneralInitial Findings on COM EXE Servers and Apartments Pin
Lim Bio Liong25-Dec-04 15:56
Lim Bio Liong25-Dec-04 15:56 
GeneralRe: Initial Findings on COM EXE Servers and Apartments Pin
Lim Bio Liong25-Dec-04 18:43
Lim Bio Liong25-Dec-04 18:43 
GeneralRe: Initial Findings on COM EXE Servers and Apartments Pin
Lim Bio Liong25-Dec-04 18:45
Lim Bio Liong25-Dec-04 18:45 
GeneralAbout DispatchMessage() Pin
Lim Bio Liong18-Dec-04 1:00
Lim Bio Liong18-Dec-04 1:00 
GeneralAbout PostThreadMessage() Pin
Lim Bio Liong18-Dec-04 0:58
Lim Bio Liong18-Dec-04 0:58 
GeneralCOM Event Handling. Pin
Lim Bio Liong9-Dec-04 0:11
Lim Bio Liong9-Dec-04 0:11 
GeneralRe: COM Event Handling. Pin
jekky31-May-05 14:53
jekky31-May-05 14:53 
GeneralDeveloping ASP.NET Applications using Visual Studio .NET Pin
Lim Bio Liong8-Dec-04 16:48
Lim Bio Liong8-Dec-04 16:48 
GeneralThe Importance of The Type Library GUID and Its Version (Part 1) Pin
Lim Bio Liong8-Dec-04 16:44
Lim Bio Liong8-Dec-04 16:44 
GeneralThe Importance of The Type Library GUID and Its Version (Part 2) Pin
Lim Bio Liong8-Dec-04 16:45
Lim Bio Liong8-Dec-04 16:45 
GeneralInlineIsEqualGUID() Problem & How to Resolve. Pin
Lim Bio Liong8-Dec-04 16:41
Lim Bio Liong8-Dec-04 16:41 
GeneralRe: InlineIsEqualGUID() Problem & How to Resolve. Pin
ThatsAlok22-Apr-05 23:08
ThatsAlok22-Apr-05 23:08 
GeneralRe: InlineIsEqualGUID() Problem & How to Resolve. Pin
Lim Bio Liong25-Apr-05 7:44
Lim Bio Liong25-Apr-05 7:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.