BOOL nla_sspi_module_init(rdpNla* nla)
{
	if (!nla)
		return FALSE;

	if (nla->SspiModule)
	{
		INIT_SECURITY_INTERFACE pInitSecurityInterface;
		HMODULE hSSPI = LoadLibraryX(nla->SspiModule);

		if (!hSSPI)
		{
			WLog_ERR(TAG, "Failed to load SSPI module: %s", nla->SspiModule);
			return FALSE;
		}

#ifdef UNICODE
		pInitSecurityInterface =
		    (INIT_SECURITY_INTERFACE)GetProcAddress(hSSPI, "InitSecurityInterfaceW");
#else
		pInitSecurityInterface =
		    (INIT_SECURITY_INTERFACE)GetProcAddress(hSSPI, "InitSecurityInterfaceA");
#endif
		nla->table = pInitSecurityInterface();
	}
	else
	{
		nla->table = InitSecurityInterfaceEx(0);
	}

	return TRUE;
}
BOOL nla_sspi_module_init(rdpNla* nla)
{
	if (!nla)
		return FALSE;

	if (nla->SspiModule)
	{
		INIT_SECURITY_INTERFACE pInitSecurityInterface;
		HMODULE hSSPI = LoadLibraryX(nla->SspiModule);

		if (!hSSPI)
		{
			WLog_ERR(TAG, "Failed to load SSPI module: %s", nla->SspiModule);
			return FALSE;
		}

#ifdef UNICODE
		pInitSecurityInterface =
		    (INIT_SECURITY_INTERFACE)GetProcAddress(hSSPI, "InitSecurityInterfaceW");
#else
		pInitSecurityInterface =
		    (INIT_SECURITY_INTERFACE)GetProcAddress(hSSPI, "InitSecurityInterfaceA");
#endif
		nla->table = pInitSecurityInterface();
	}
	else
	{
		nla->table = InitSecurityInterfaceEx(0);
	}

	return TRUE;
}