2 * Win32 advapi functions
4 * Copyright 1995 Sven Verdoolaege
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/port.h"
33 #include "wine/library.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(advapi
);
38 /******************************************************************************
39 * GetUserNameA [ADVAPI32.@]
41 * NOTE: lpSize returns the total length of the username, including the
42 * terminating null character.
45 GetUserNameA( LPSTR lpszName
, LPDWORD lpSize
)
48 const char *name
= wine_get_user_name();
50 /* We need to include the null character when determining the size of the buffer. */
51 len
= strlen(name
) + 1;
54 SetLastError(ERROR_MORE_DATA
);
60 strcpy(lpszName
, name
);
64 /******************************************************************************
65 * GetUserNameW [ADVAPI32.@]
72 GetUserNameW( LPWSTR lpszName
, LPDWORD lpSize
)
74 const char *name
= wine_get_user_name();
75 DWORD len
= MultiByteToWideChar( CP_ACP
, 0, name
, -1, NULL
, 0 );
79 SetLastError(ERROR_MORE_DATA
);
85 MultiByteToWideChar( CP_ACP
, 0, name
, -1, lpszName
, len
);
89 /******************************************************************************
90 * GetCurrentHwProfileA [ADVAPI32.@]
92 BOOL WINAPI
GetCurrentHwProfileA(LPHW_PROFILE_INFOA info
)
94 FIXME("Mostly Stub\n");
95 info
->dwDockInfo
= DOCKINFO_DOCKED
;
96 strcpy(info
->szHwProfileGuid
,"{12340001-1234-1234-1234-1233456789012}");
97 strcpy(info
->szHwProfileName
,"Wine Profile");
101 /******************************************************************************
102 * AbortSystemShutdownA [ADVAPI32.@]
107 BOOL WINAPI
AbortSystemShutdownA( LPSTR lpMachineName
)
109 TRACE("stub %s (harmless)\n", lpMachineName
);
113 /******************************************************************************
114 * AbortSystemShutdownW [ADVAPI32.@]
119 BOOL WINAPI
AbortSystemShutdownW( LPCWSTR lpMachineName
)
121 TRACE("stub %s (harmless)\n", debugstr_w(lpMachineName
));