How to create BCB compatibile msgrguid.lib

Important note! 
This makefile is intended for use with Borland C++ Builder not free command line compiler. This is because with Free cl compiler Borland does not ship tlibimp util for extracting idl files from executables.

1. Extract all files form this archive into an empty directory

2. Open msgrguid.mak file in some text editor (notepad or similar) and change BCCROOT macro to path where is BCB Installed. Note that if your path has spaces youse DOS short path (C:\Program files\Borland\CBuilder5 will become C:\Progra~1\Borland\CBuild~1). 
Locate the part in file named getidl:: which looks like this

getidl::
	-@tlibimp -C- -E- -H- -I+ -L- -Q- -R- -Ya C:\Progra~1\Messen~1\msmsgs.exe\2 -Fmsgrpriv -D$(SRC)
	-@tlibimp -C- -E- -H- -I+ -L- -Q- -R- -Ya C:\Progra~1\Messen~1\msmsgs.exe\3 -Fmsgrua -D$(SRC)
	-@tlibimp -C- -E- -H- -I+ -L- -Q- -R- -Ya C:\Progra~1\Messen~1\msmsgs.exe\4 -Fmsgrext -D$(SRC)

If your MSN messenger is installed in path other than this (C:\Progra~1\Messen~1\msmsgs.exe) change to a valid one. Note that \2, \3 and \4 must not be erased.

Save and close.
 

3. First execute form command line make -f msgrguid.mak getidl. This will produce 3 idl files needed for building msgrguid.lib (msgrpriv.idl, msgrua.idl and msgrext.idl)

4. Open msgrext.idl in some text editor and locate the line
	  importlib("stdole32.tlb");
Below it you will see something like this:
	  importlib("3");
You must change it to
	  importlib("msgrua.tlb");

Allso add this after changed line:

  //Add this in file
  typedef enum tagMUAFOLDER
  {
    MUAFOLDER_INBOX = 0, 
    MUAFOLDER_ALL_OTHER_FOLDERS = 1
  } MUAFOLDER;
  
Save and close.

5. Execute from command line make -f msgrguid.mak and you will get BCB msgrguid.lib.