Personally I keep far away from 'MS solutions' for just the reasons you described. What i did (years ago) open a socket and read the mail. The Pop3 protocol is really simple.. Next, you will get your emails as files and you have to get bodies and attachments out. Pop3 and the email format is described and available on internet, open for us all.
Besides of some nasty 'ms-enhancements' in the email adresses, email is pretty standard.
I read the pages you provided: forget it they are just wrappers around the real thing. If you do not want to follow my advice above use the mail-classes of your programming language, they should be reasonably standard.
At one place in my code i need to run IOCTL_DISK_DELETE_DRIVE_LAYOUT, that execute smoothly. This IOCTL code make the disk signature as zero so it can not be initialize.
I need to initialize this disk using code. Is there any API or any function that can initialize the disk?
Please suggest me some way to initialize it using c++ code.
Calling GetBuffer is not a good solution in this case, even if you call ReleaseBuffer afterward. There's no need to use GetBuffer because CString already defines casting operators (which returns the same type of what GetBuffer returns, so it depends on the UNICODE settings). Using GetBuffer is very bad practice and should be avoided.
You are writing a UNICODE string to the file. Each AppendChar() converts the character to a UNICODE character and appends it to the string. During your write, you'll also note that only half the string is being written. (CString::GetLength() returns the number of characters, not the number of bytes.)