Click here to Skip to main content
14,384,785 members

Lim Bio Liong - Professional Profile



Summary

    Blog RSS
60,982
Author
1,663
Authority
588
Debator
86
Organiser
992
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

For more 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 frequencysilversilversilversilverAdmin
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSitebuilder, Subeditor, Mentor, Protector, Editor, Staff, Admin
Store personal files in your account areaplatinumplatinumSitebuilder, Subeditor, Supporter, Editor, Staff
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Edit a Question in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Edit an Answer in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Delete a Question in Q&AYesSubeditor, Protector, Editor, Admin
Delete an Answer in Q&AYesSubeditor, Protector, Editor, Admin
Report an ArticlesilversilversilversilverSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubeditor, Mentor, Protector, Editor, Staff, Admin
Edit other members' articlesSubeditor, Protector, Editor, Admin
Create an article without requiring moderationplatinumSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending QuestionProtector, Admin
Approve/Disapprove a pending AnswerProtector, Admin
Report a forum messagesilversilverbronzeProtector, Editor, Admin
Approve/Disapprove a pending Forum MessageProtector, Admin
Create a new tagsilversilversilversilverAdmin
Modify a tagsilversilversilversilverAdmin

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


 
GeneralWhat Is a "Programming Model"? Pin
Lim Bio Liong18-Dec-07 22:42
memberLim Bio Liong18-Dec-07 22:42 
GeneralConcerning making copies of and deletion of objects stored inside VARIANT parameters. Pin
Lim Bio Liong6-Dec-07 20:56
memberLim Bio Liong6-Dec-07 20:56 
GeneralThe use of the importlib keyword in an IDL file. Pin
Lim Bio Liong17-May-07 5:12
memberLim Bio Liong17-May-07 5:12 
GeneralRe: The use of the importlib keyword in an IDL file. Pin
Lim Bio Liong30-Jun-07 22:46
memberLim Bio Liong30-Jun-07 22:46 
GeneralPossible For VB to use MTA objects Pin
Lim Bio Liong15-Aug-06 0:44
memberLim Bio Liong15-Aug-06 0:44 
GeneralWhen do we use extern "C"? Is this a compiler-specific feature? Pin
Lim Bio Liong19-Mar-06 6:39
memberLim Bio Liong19-Mar-06 6:39 
GeneralRe: When do we use extern "C"? Is this a compiler-specific feature? Pin
Yaki_1513-Sep-06 4:58
memberYaki_1513-Sep-06 4:58 
GeneralConcerning Proxy/Stub DLLs [modified] Pin
Lim Bio Liong18-Mar-06 6:36
memberLim Bio Liong18-Mar-06 6: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 Liong3-May-07 0:17
memberLim Bio Liong3-May-07 0:17 
GeneralRe: Concerning Proxy/Stub DLLs Pin
Lim Bio Liong20-Jun-08 2:08
memberLim Bio Liong20-Jun-08 2:08 
Generaluse of mem_fun1 and mem_fun_ref in for_each() Pin
Lim Bio Liong13-Mar-06 1:24
memberLim Bio Liong13-Mar-06 1:24 
GeneralRe: use of mem_fun1 and mem_fun_ref in for_each() Pin
Lim Bio Liong13-Mar-06 1:28
memberLim Bio Liong13-Mar-06 1:28 
GeneralEclipse CDT Pin
Lim Bio Liong4-Mar-06 7:34
memberLim Bio Liong4-Mar-06 7:34 
GeneralRelease Minimum Dependency Project Settings Pin
Lim Bio Liong4-Mar-06 6:54
memberLim Bio Liong4-Mar-06 6:54 
GeneralRe: Release Minimum Dependency Project Settings Pin
Lim Bio Liong4-Mar-06 6:56
memberLim Bio Liong4-Mar-06 6:56 
GeneralTemplate Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 5:31
memberLim Bio Liong21-Feb-06 5:31 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 5:32
memberLim Bio Liong21-Feb-06 5:32 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 5:33
memberLim Bio Liong21-Feb-06 5:33 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 5:34
memberLim Bio Liong21-Feb-06 5:34 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Lim Bio Liong21-Feb-06 5:36
memberLim Bio Liong21-Feb-06 5:36 
GeneralRe: Template Explicit Specialization & Policy-Based Design Pin
Jubith26-Mar-08 4:56
memberJubith26-Mar-08 4:56 
GeneralAdvanced C++ : Placement New Pin
Lim Bio Liong19-Feb-06 20:44
memberLim Bio Liong19-Feb-06 20:44 
GeneralRe: Advanced C++ : Placement New Pin
Lim Bio Liong19-Feb-06 20:51
memberLim Bio Liong19-Feb-06 20:51 
GeneralDCOM Settings on Server side (WinXP SP2) Pin
Lim Bio Liong15-Feb-06 2:34
memberLim Bio Liong15-Feb-06 2:34 
GeneralINI File Comments Pin
Lim Bio Liong2-Feb-06 0:38
memberLim Bio Liong2-Feb-06 0: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.