parsing .ldif file

Hi all,
I have to parse .ldif file in order to perform "full sync" of AD with DB. If you ever did parsing of .ldif file in C/C++, I would appreciate any help from you.
Thank you in advance
[201 byte] By [mayag] at [2007-11-20 1:58:57]