Click here to Skip to main content
15,890,717 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.


 
GeneralWhat Is a "Programming Model"? Pin
Lim Bio Liong18-Dec-07 21:42
Lim Bio Liong18-Dec-07 21:42 
GeneralConcerning making copies of and deletion of objects stored inside VARIANT parameters. Pin
Lim Bio Liong6-Dec-07 19:56
Lim Bio Liong6-Dec-07 19:56 
GeneralThe use of the importlib keyword in an IDL file. Pin
Lim Bio Liong17-May-07 4:12
Lim Bio Liong17-May-07 4:12 
GeneralRe: The use of the importlib keyword in an IDL file. Pin
Lim Bio Liong30-Jun-07 21:46
Lim Bio Liong30-Jun-07 21:46 
GeneralPossible For VB to use MTA objects Pin
Lim Bio Liong14-Aug-06 23:44
Lim Bio Liong14-Aug-06 23:44 
GeneralWhen do we use extern "C"? Is this a compiler-specific feature? Pin
Lim Bio Liong19-Mar-06 5:39
Lim Bio Liong19-Mar-06 5:39 
GeneralRe: When do we use extern "C"? Is this a compiler-specific feature? Pin
Yaki_1513-Sep-06 3:58
Yaki_1513-Sep-06 3:58 
GeneralConcerning Proxy/Stub DLLs [modified] Pin
Lim Bio Liong18-Mar-06 5:36
Lim Bio Liong18-Mar-06 5:36 
1. A Proxy/Stub DLL is always required under one of the following situations :

1.1 Your COM object resides in an EXE Server.
Further note the following :
1.1.1 This is where the use of marshalling is most natural.
1.1.2 In order for your client (a separate EXE application) to use your COM object, marshalling is required.

1.2 Your COM object resides in a DLL Server.
Further note the following :
1.2.1 A COM object will always be used by a thread in a client application.
1.2.2 A client thread which uses COM will always reside in an apartment.
1.2.3 A COM object will also always reside in an apartment.
1.2.3 If the apartment of a client thread which uses a COM object is not the same the apartment of the COM object, marshalling will be required.

To put things simply, where a COM object is accessed across threads (be it threads of a single process or threads across processes), marshalling may be involved.





2. Even when you are using OLE-automation-compatible types, marshalling will be involved.
2.1 In this case, the standard COM marshaller is used. However, note carefully :

2.1.1 That this is provided that your interface has been assigned the [dual] or the [oleautomation] attribute.

2.1.2 If not, your interface cannot be marshaled using the standard COM marshaler.

2.2 The standard COM marshaler is oleaut32.dll (the standard Proxy/Stub DLL for Ole Automation).

2.2 In this case, you do not have to build any Proxy/Stub DLL in order for your clients to use your interface.





3. If your interface uses non-OLE-automation-compatible types as parameters, or that it uses OLE-automation-compatible parameter types but that it is not marked with the [dual] or [oleautomation] attributes, you would definitely need a Proxy/Stub DLL.

3.1 Note that your Proxy/Stub DLL is meant to be used for interfaces and not implementations.

3.2 For example, if you have an interface IAnInterface, say. And you have two implementations of IAnInterface in two separate DLLs, the two implementations will use the same Proxy/Stub DLL.

3.3 Every interface that is ever defined in a Windows OS will have an entry in the registry (under the HKEY_CLASSES_ROOT\Interface Key). They are registered under their GUIDs.

3.4 You will notice that many of the interface entries have a "ProxyStubClsid32" subkey.

3.5 This subkey contains a GUID which identifies the Proxy/Stub DLL associated with this Interface.





4. If you use the MIDL compiler, the source codes for building a Proxy/Stub DLL for your interface can be generated for you.
4.1 The followig files, generated by the MIDL compiler, are the raw materials for your Proxy/Stub :

- *_i.c
- *_p.c
- dlldata.c

where * denotes the name of your COM project.

The *_i.c file contains the actual definitions of the IIDs and CLSIDs defined in your COM project IDL file.

The *_p.c file contains proxy/stub data specific to the interfaces defined in your IDL file.

The dlldata.c file contains macros and code that help to generate basic COM DLL requirements (e.g. DllCanUnloadNow(), DllGetClassObject(), etc).


4.2 Start Visual C++ and create a basic Win32 DLL (non-MFC and non-ATL) project.


4.3 Add the *_i.c, *_p.c and dlldata.c files into this project.


4.4 Create your own .DEF file which should contain the following definitions :

LIBRARY <YOUR MODULE NAME>

EXPORTS
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
GetProxyDllInfo


4.5 You will need to supply the following pre-processor definitions to your project :

- REGISTER_PROXY_DLL
- either _WIN32_WINNT=0x400
- or _WIN32_WINNT=0x500 (if any interfaces has async_uuid attribute)

The REGISTER_PROXY_DLL definition will ensure that two of the basic COM DLL required exported functions DllRegisterServer() and DllUnregisterServer() are generated within dlldata.c.

The "_WIN32_WINNT=0x400" or "_WIN32_WINNT=0x500" is required otherwise you will face several compilation errors.

If any interface has been attributed with "async_uuid" then you will also need to use the correct-versioned "rpcproxy.h" file. If you are not using the correct-versioned one, the compiler will complain of this. The latest MS SDK include directory usually will contain the latest version of "rpcproxy.h". To use this, set $(MSSDK)\include in your "Additional include directories" path (under project settings).


4.6 Your project will also need to link to rpcrt4.lib.


4.7 After building a successful Proxy/Stub DLL project, you must remember to register this DLL.

<div class="ForumMod">modified on Thursday, January 29, 2009 12:31 AM</div>
GeneralRe: Concerning Proxy/Stub DLLs [modified] Pin
Lim Bio Liong2-May-07 23:17
Lim Bio Liong2-May-07 23:17 
GeneralRe: Concerning Proxy/Stub DLLs Pin
Lim Bio Liong20-Jun-08 1:08
Lim Bio Liong20-Jun-08 1:08 
Generaluse of mem_fun1 and mem_fun_ref in for_each() Pin
Lim Bio Liong13-Mar-06 0:24
Lim Bio Liong13-Mar-06 0:24 
GeneralRe: use of mem_fun1 and mem_fun_ref in for_each() Pin
Lim Bio Liong13-Mar-06 0:28
Lim Bio Liong13-Mar-06 0:28 
GeneralEclipse CDT Pin
Lim Bio Liong4-Mar-06 6:34
Lim Bio Liong4-Mar-06 6:34 
GeneralRelease Minimum Dependency Project Settings Pin
Lim Bio Liong4-Mar-06 5:54
Lim Bio Liong4-Mar-06 5:54 
GeneralRe: Release Minimum Dependency Project Settings Pin
Lim Bio Liong4-Mar-06 5:56
Lim Bio Liong4-Mar-06 5:56 
GeneralTemplate Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:31
Lim Bio Liong21-Feb-06 4:31 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:32
Lim Bio Liong21-Feb-06 4:32 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:33
Lim Bio Liong21-Feb-06 4:33 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:34
Lim Bio Liong21-Feb-06 4:34 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 4:36
Lim Bio Liong21-Feb-06 4:36 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Jubith26-Mar-08 3:56
Jubith26-Mar-08 3:56 
GeneralAdvanced C++ : Placement New Pin
Lim Bio Liong19-Feb-06 19:44
Lim Bio Liong19-Feb-06 19:44 
GeneralRe: Advanced C++ : Placement New Pin
Lim Bio Liong19-Feb-06 19:51
Lim Bio Liong19-Feb-06 19:51 
GeneralDCOM Settings on Server side (WinXP SP2) Pin
Lim Bio Liong15-Feb-06 1:34
Lim Bio Liong15-Feb-06 1:34 
GeneralINI File Comments Pin
Lim Bio Liong1-Feb-06 23:38
Lim Bio Liong1-Feb-06 23:38 

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.