private CredHandle acquireCredentialsHandle() { CredHandle handle = new CredHandle(); int rc = Secur32.INSTANCE.AcquireCredentialsHandle(null, "NTLM", SECPKG_CRED_OUTBOUND, null, null, null, null, handle, new TimeStamp()); if (SEC_E_OK != rc) { throw new Win32Exception(rc); } return handle; }