There is no need to cast the pointers passed to the penultimate argument of the CryptDecodeObjectEx and CryptEncodeObjectEx functions as those expect void pointers.