-/*
- * mono-security-windows.c: Windows security support.
+/**
+ * \file
+ * Windows security support.
*
* Copyright 2016 Microsoft
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <glib.h>
#if defined(HOST_WIN32)
-#include <WinSock2.h>
-#include <Windows.h>
+#include <winsock2.h>
+#include <windows.h>
#include "mono/metadata/mono-security-windows-internals.h"
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
gunichar2 *uniname = NULL;
gint32 size = 0;
- mono_error_init (&error);
+ error_init (&error);
size = mono_security_win_get_token_name (token, &uniname);
result = mono_string_new_utf16_checked (mono_domain_get (), uniname, size, &error);
}
else
- result = mono_string_new (mono_domain_get (), "");
+ result = mono_string_new_checked (mono_domain_get (), "", &error);
if (uniname)
g_free (uniname);