How to reapair a .pst file using VC++/C++/MFC/VB Code

hi all,
      i am developing an Application in VC++ in which i have to recover the emails deleted from microsoft outlook .pst file.

for that i change the 13 bits in file using hex editor starting from 7th position from starting, and then i reapair this file using Scanpst.exe then all deleted email recovered.

now please tell me how to repair the file using my code as similar as Scanpst.exe repairs.

or tell me any other ways so that i can find my deleted emails from pst file

thanking you
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>> or tell me any other ways so that i can find my deleted emails from pst file
Why not invoke scanpst.exe over the pst files from code? ShellExecute can help do that. PST is an undocumented format. If you check the plugins for Thunderbird and other open source email clients, you may find open source plugins that read and convert pst files into other formats, but those are very rare and hardly any that works flawlessly.
Repairing a pst is a different beast altogether and therefore you best bets are to integrate scanpst into your solution. If the redistribution policy permits you can even redistribute.
As for changing the bits in file, that can be done using simple File IO. I would do that using memory mapped files.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RuhelaAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.