public int SetSerialization(ref _CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION pcpcs)
{
// Convert IntPtr to byte[]
if (pcpcs.rgbSerialization == IntPtr.Zero)
{
byte[] serializedData = new byte[pcpcs.cbSerialization];
Marshal.Copy(pcpcs.rgbSerialization, serializedData, 0, (int)pcpcs.cbSerialization);
pcpcs.rgbSerialization = Marshal.AllocCoTaskMem(serializedData.Length);
Marshal.Copy(serializedData, 0, pcpcs.rgbSerialization, serializedData.Length);
}
return HRESULT.S_OK;
}
how to retrieve the username from the _CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION pcpcs.
not sure how to serialize the input credential to retrieve the username from pcpcs.