Encrypt driver for HDD in c++

I have a task, I need to encrypt the hard disk, that is, I need to install a password on the hard disk. All this under Windows and on C ++.

From everything I read, I realized that you must first write the driver to the hard drive (to access it), and then set the password to it.

At this stage, I can not write the driver.

Tried to read the sources of TrueCrypt, but I do not understand.

In general, the essence of the question, help with the driver and password, please. (Links, tips or anything useful)