Hello and Welcome to the board.

Well just a quick glance of the code shows that the example is C or C++ code and using NULLS etc...
This can not be converted into KiXtart code.

How to add more Exchange mailboxes to a MAPI profile