Rob Shearman : wininet: Retrieve the maximum token length from the SSP and use a buffer of that length in calls to InitializeSecurityContextW .