Commit fcf5e8c4 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Use proper dllimports for advapi32 functions.

parent 1f5c288b
EXTRADEFS = -DWINBASEAPI= EXTRADEFS = -DWINBASEAPI= -DWINADVAPI=
MODULE = kernelbase.dll MODULE = kernelbase.dll
IMPORTLIB = kernelbase IMPORTLIB = kernelbase
IMPORTS = uuid ntdll winecrt0 IMPORTS = uuid ntdll winecrt0
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <assert.h> #include <assert.h>
#include <stdarg.h> #include <stdarg.h>
#define WINADVAPI
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "sddl.h" #include "sddl.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#define NONAMELESSUNION #define NONAMELESSUNION
#include <stdarg.h> #include <stdarg.h>
#define WINADVAPI
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winsvc.h" #include "winsvc.h"
......
...@@ -463,50 +463,50 @@ typedef struct _KERB_PURGE_TKT_CACHE_REQUEST ...@@ -463,50 +463,50 @@ typedef struct _KERB_PURGE_TKT_CACHE_REQUEST
#define RtlEncryptMemory SystemFunction040 #define RtlEncryptMemory SystemFunction040
#define RtlDecryptMemory SystemFunction041 #define RtlDecryptMemory SystemFunction041
BOOLEAN WINAPI AuditQuerySystemPolicy(const GUID*,ULONG,AUDIT_POLICY_INFORMATION**); WINADVAPI BOOLEAN WINAPI AuditQuerySystemPolicy(const GUID*,ULONG,AUDIT_POLICY_INFORMATION**);
WINADVAPI BOOLEAN WINAPI RtlGenRandom(PVOID,ULONG);
WINADVAPI NTSTATUS WINAPI RtlEncryptMemory(PVOID,ULONG,ULONG);
WINADVAPI NTSTATUS WINAPI RtlDecryptMemory(PVOID,ULONG,ULONG);
WINADVAPI NTSTATUS WINAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
WINADVAPI NTSTATUS WINAPI LsaClose(LSA_HANDLE);
WINADVAPI NTSTATUS WINAPI LsaCreateTrustedDomainEx(LSA_HANDLE,PTRUSTED_DOMAIN_INFORMATION_EX,
PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,PLSA_HANDLE);
WINADVAPI NTSTATUS WINAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
WINADVAPI NTSTATUS WINAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
WINADVAPI NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,PVOID*,PULONG);
WINADVAPI NTSTATUS WINAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
WINADVAPI NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
WINADVAPI NTSTATUS WINAPI LsaFreeMemory(PVOID);
WINADVAPI NTSTATUS WINAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
PLSA_TRANSLATED_SID*);
WINADVAPI NTSTATUS WINAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
PLSA_TRANSLATED_SID2*);
WINADVAPI NTSTATUS WINAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID *,PLSA_REFERENCED_DOMAIN_LIST *,PLSA_TRANSLATED_NAME *);
WINADVAPI ULONG WINAPI LsaNtStatusToWinError(NTSTATUS);
WINADVAPI NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
WINADVAPI NTSTATUS WINAPI LsaOpenTrustedDomainByName(LSA_HANDLE,PLSA_UNICODE_STRING,ACCESS_MASK,PLSA_HANDLE);
WINADVAPI NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
WINADVAPI NTSTATUS WINAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID*);
WINADVAPI NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID*);
WINADVAPI NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
WINADVAPI NTSTATUS WINAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,PLSA_UNICODE_STRING,ULONG);
WINADVAPI NTSTATUS WINAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING*);
WINADVAPI NTSTATUS WINAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
WINADVAPI NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID);
WINADVAPI NTSTATUS WINAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID);
WINADVAPI NTSTATUS WINAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING);
WINADVAPI NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
BOOLEAN WINAPI RtlGenRandom(PVOID,ULONG);
NTSTATUS WINAPI RtlEncryptMemory(PVOID,ULONG,ULONG);
NTSTATUS WINAPI RtlDecryptMemory(PVOID,ULONG,ULONG);
NTSTATUS WINAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,PULONG,PNTSTATUS); NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,PULONG,PNTSTATUS);
NTSTATUS WINAPI LsaClose(LSA_HANDLE);
NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE); NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE);
NTSTATUS WINAPI LsaCreateTrustedDomainEx(LSA_HANDLE,PTRUSTED_DOMAIN_INFORMATION_EX,
PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,PLSA_HANDLE);
NTSTATUS WINAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE); NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE);
NTSTATUS WINAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,PVOID*,PULONG);
NTSTATUS WINAPI LsaEnumerateLogonSessions(PULONG,PLUID*); NTSTATUS WINAPI LsaEnumerateLogonSessions(PULONG,PLUID*);
NTSTATUS WINAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
NTSTATUS WINAPI LsaFreeMemory(PVOID);
NTSTATUS WINAPI LsaFreeReturnBuffer(PVOID); NTSTATUS WINAPI LsaFreeReturnBuffer(PVOID);
NTSTATUS WINAPI LsaGetLogonSessionData(PLUID,PSECURITY_LOGON_SESSION_DATA*); NTSTATUS WINAPI LsaGetLogonSessionData(PLUID,PSECURITY_LOGON_SESSION_DATA*);
NTSTATUS WINAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS); NTSTATUS WINAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS);
NTSTATUS WINAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG); NTSTATUS WINAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG);
NTSTATUS WINAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
PLSA_TRANSLATED_SID*);
NTSTATUS WINAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
PLSA_TRANSLATED_SID2*);
NTSTATUS WINAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID *,PLSA_REFERENCED_DOMAIN_LIST *,PLSA_TRANSLATED_NAME *);
ULONG WINAPI LsaNtStatusToWinError(NTSTATUS);
NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
NTSTATUS WINAPI LsaOpenTrustedDomainByName(LSA_HANDLE,PLSA_UNICODE_STRING,ACCESS_MASK,PLSA_HANDLE);
NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
NTSTATUS WINAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID*);
NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID*);
NTSTATUS WINAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE); NTSTATUS WINAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE);
NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
NTSTATUS WINAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,PLSA_UNICODE_STRING,ULONG);
NTSTATUS WINAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING*);
NTSTATUS WINAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID);
NTSTATUS WINAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID);
NTSTATUS WINAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING);
NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
......
...@@ -83,24 +83,20 @@ extern "C" { ...@@ -83,24 +83,20 @@ extern "C" {
#endif /* UNICODE */ #endif /* UNICODE */
#endif /* WINE_NO_UNICODE_MACROS */ #endif /* WINE_NO_UNICODE_MACROS */
BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* ); WINADVAPI BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* );
BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* ); WINADVAPI BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* );
#define ConvertSidToStringSid WINELIB_NAME_AW(ConvertSidToStringSid) #define ConvertSidToStringSid WINELIB_NAME_AW(ConvertSidToStringSid)
BOOL WINAPI ConvertStringSidToSidA( LPCSTR, PSID* ); WINADVAPI BOOL WINAPI ConvertStringSidToSidA( LPCSTR, PSID* );
BOOL WINAPI ConvertStringSidToSidW( LPCWSTR, PSID* ); WINADVAPI BOOL WINAPI ConvertStringSidToSidW( LPCWSTR, PSID* );
#define ConvertStringSidToSid WINELIB_NAME_AW(ConvertStringSidToSid) #define ConvertStringSidToSid WINELIB_NAME_AW(ConvertStringSidToSid)
BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA( WINADVAPI BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA(LPCSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
LPCSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG ); WINADVAPI BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(LPCWSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(
LPCWSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
#define ConvertStringSecurityDescriptorToSecurityDescriptor WINELIB_NAME_AW(ConvertStringSecurityDescriptorToSecurityDescriptor) #define ConvertStringSecurityDescriptorToSecurityDescriptor WINELIB_NAME_AW(ConvertStringSecurityDescriptorToSecurityDescriptor)
BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA( WINADVAPI BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA(PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPSTR*, PULONG );
PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPSTR*, PULONG ); WINADVAPI BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPWSTR*, PULONG );
BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(
PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPWSTR*, PULONG );
#define ConvertSecurityDescriptorToStringSecurityDescriptor WINELIB_NAME_AW(ConvertSecurityDescriptorToStringSecurityDescriptor) #define ConvertSecurityDescriptorToStringSecurityDescriptor WINELIB_NAME_AW(ConvertSecurityDescriptorToStringSecurityDescriptor)
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -33,10 +33,12 @@ extern "C" { ...@@ -33,10 +33,12 @@ extern "C" {
#endif #endif
#endif #endif
#ifndef WINADVAPI
#ifdef _ADVAPI32_ #ifdef _ADVAPI32_
#define WINADVAPI #define WINADVAPI
#else #else
#define WINADVAPI DECLSPEC_HIDDEN #define WINADVAPI DECLSPEC_IMPORT
#endif
#endif #endif
#include <libloaderapi.h> #include <libloaderapi.h>
......
...@@ -23,10 +23,12 @@ ...@@ -23,10 +23,12 @@
extern "C" { extern "C" {
#endif #endif
#ifndef WINADVAPI
#ifdef _ADVAPI32_ #ifdef _ADVAPI32_
#define WINADVAPI #define WINADVAPI
#else #else
#define WINADVAPI DECLSPEC_HIDDEN #define WINADVAPI DECLSPEC_IMPORT
#endif
#endif #endif
#ifndef __SECHANDLE_DEFINED__ #ifndef __SECHANDLE_DEFINED__
......
...@@ -28,10 +28,12 @@ extern "C" { ...@@ -28,10 +28,12 @@ extern "C" {
#include <bcrypt.h> #include <bcrypt.h>
/* FIXME: #include <ncrypt.h> */ /* FIXME: #include <ncrypt.h> */
#ifndef WINADVAPI
#ifdef _ADVAPI32_ #ifdef _ADVAPI32_
# define WINADVAPI # define WINADVAPI
#else #else
# define WINADVAPI DECLSPEC_HIDDEN # define WINADVAPI DECLSPEC_IMPORT
#endif
#endif #endif
/* some typedefs for function parameters */ /* some typedefs for function parameters */
......
...@@ -23,10 +23,12 @@ ...@@ -23,10 +23,12 @@
extern "C" { extern "C" {
#endif /* defined(__cplusplus) */ #endif /* defined(__cplusplus) */
#ifndef WINADVAPI
#ifdef _ADVAPI32_ #ifdef _ADVAPI32_
#define WINADVAPI #define WINADVAPI
#else #else
#define WINADVAPI DECLSPEC_HIDDEN #define WINADVAPI DECLSPEC_IMPORT
#endif
#endif #endif
/* Service database names */ /* Service database names */
...@@ -197,8 +199,6 @@ typedef struct _SERVICE_NOTIFY_2W { ...@@ -197,8 +199,6 @@ typedef struct _SERVICE_NOTIFY_2W {
WCHAR *pszServiceNames; WCHAR *pszServiceNames;
} SERVICE_NOTIFY_2W, SERVICE_NOTIFYW; } SERVICE_NOTIFY_2W, SERVICE_NOTIFYW;
DWORD WINAPI NotifyServiceStatusChangeW(SC_HANDLE,DWORD,SERVICE_NOTIFYW*);
typedef enum _SC_STATUS_TYPE { typedef enum _SC_STATUS_TYPE {
SC_STATUS_PROCESS_INFO = 0 SC_STATUS_PROCESS_INFO = 0
} SC_STATUS_TYPE; } SC_STATUS_TYPE;
...@@ -415,6 +415,7 @@ WINADVAPI BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,LPDWORD ...@@ -415,6 +415,7 @@ WINADVAPI BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,LPDWORD
#define GetServiceKeyName WINELIB_NAME_AW(GetServiceKeyName) #define GetServiceKeyName WINELIB_NAME_AW(GetServiceKeyName)
WINADVAPI SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE); WINADVAPI SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
WINADVAPI BOOL WINAPI NotifyBootConfigStatus(BOOL); WINADVAPI BOOL WINAPI NotifyBootConfigStatus(BOOL);
WINADVAPI DWORD WINAPI NotifyServiceStatusChangeW(SC_HANDLE,DWORD,SERVICE_NOTIFYW*);
WINADVAPI SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD); WINADVAPI SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
WINADVAPI SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD); WINADVAPI SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
#define OpenSCManager WINELIB_NAME_AW(OpenSCManager) #define OpenSCManager WINELIB_NAME_AW(OpenSCManager)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment