ConvertPersonalStorageToMbox leaveOpen

Hello,
According to your sample:

Dim ost As Email.Storage.Pst.PersonalStorage = Email.Storage.Pst.PersonalStorage.FromFile(ofd.FileName, False)
Dim writer As Email.Storage.Mbox.MboxStorageWriter = New Email.Storage.Mbox.MboxrdStorageWriter(“D:\Path\out.mbox”, False)
Email.Storage.MailboxConverter.ConvertPersonalStorageToMbox(ost, writer, Nothing)

This code will create the output file “out.mbox” with 0 bytes length and will not write the contents to the output file until we use:
writer.Dispose
or we close the form or app!

Is that normal and expected?

@australian.dev.nerds

Could you please ZIP and attach your input file here for testing? We will investigate the issue and provide you more information on it.

Hello,
You can test it with any .PST file, not a big issue since writer.Dispose or this code ( Using / End Using ) will fix it:

Dim ost As Email.Storage.Pst.PersonalStorage = Email.Storage.Pst.PersonalStorage.FromFile(ofd.FileName, False)
Using writer As New Email.Storage.Mbox.MboxrdStorageWriter(“D:\out.mbox”, False)
Email.Storage.MailboxConverter.ConvertPersonalStorageToMbox(ost, writer, Nothing)
End Using

@australian.dev.nerds

We have tested the scenario and have not found this issue at our end. Please create Visual Studio application and share it here for testing. We will use the same application to test this case. Thanks for your cooperation.