home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 10 / ioProg_10.iso / soft / sdk20 / jsdk05.cab / Src / Win32Api / Advapi32.java < prev    next >
Encoding:
Java Source  |  1997-09-25  |  10.8 KB  |  187 lines

  1. // Copyright (C) 1997 Microsoft Corporation  All Rights Reserved
  2.  
  3. // These classes provide direct, low-overhead access to commonly used
  4. // Windows api. These classes use the new J/Direct feature.
  5. //
  6. // Information on how to use J/Direct to write your own declarations
  7. // can be found in the Microsoft SDK for Java 2.0.
  8.  
  9. package com.ms.win32;
  10.  
  11. /** @security(checkClassLinking=on) */
  12. public class Advapi32 {
  13.         /** @dll.import("ADVAPI32", auto) */
  14.         /* explicitly excluded */ // public native static boolean AccessCheckAndAuditAlarm (String SubsystemName, int HandleId, String ObjectTypeName, String ObjectName, int SecurityDescriptor, int DesiredAccess, GENERIC_MAPPING GenericMapping, boolean ObjectCreation, int[] GrantedAccess, boolean[] AccessStatus, boolean[] pfGenerateOnClose);
  15.  
  16.         /** @dll.import("ADVAPI32", auto) */
  17.         public native static boolean BackupEventLog (int hEventLog, String lpBackupFileName);
  18.  
  19.         /** @dll.import("ADVAPI32", auto) */
  20.         public native static boolean ClearEventLog (int hEventLog, String lpBackupFileName);
  21.  
  22.         /** @dll.import("ADVAPI32",auto) */
  23.         public native static boolean CloseEventLog (int hEventLog);
  24.  
  25.         /** @dll.import("ADVAPI32", auto) */
  26.         public native static boolean CreateProcessAsUser (int hToken, String lpApplicationName, String lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, boolean bInheritHandles, int dwCreationFlags, int lpEnvironment, String lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation);
  27.  
  28.         /** @dll.import("ADVAPI32", auto) */
  29.         public native static boolean CryptAcquireContext (int[] phProv, String pszContainer, String pszProvider, int dwProvType, int dwFlags);
  30.  
  31.         /** @dll.import("ADVAPI32",auto) */
  32.         public native static boolean CryptCreateHash (int hProv, int Algid, int hKey, int dwFlags, int[] phHash);
  33.  
  34.         /** @dll.import("ADVAPI32",auto) */
  35.         public native static boolean CryptDecrypt (int hKey, int hHash, boolean Final, int dwFlags, byte[] pbData, int[] pdwDataLen);
  36.  
  37.         /** @dll.import("ADVAPI32",auto) */
  38.         public native static boolean CryptDeriveKey (int hProv, int Algid, int hBaseData, int dwFlags, int[] phKey);
  39.  
  40.         /** @dll.import("ADVAPI32",auto) */
  41.         public native static boolean CryptDestroyHash (int hHash);
  42.  
  43.         /** @dll.import("ADVAPI32",auto) */
  44.         public native static boolean CryptDestroyKey (int hKey);
  45.  
  46.         /** @dll.import("ADVAPI32",auto) */
  47.         public native static boolean CryptEncrypt (int hKey, int hHash, boolean Final, int dwFlags, byte[] pbData, int[] pdwDataLen, int dwBufLen);
  48.  
  49.         /** @dll.import("ADVAPI32",auto) */
  50.         public native static boolean CryptExportKey (int hKey, int hExpKey, int dwBlobType, int dwFlags, byte[] pbData, int[] pdwDataLen);
  51.  
  52.         /** @dll.import("ADVAPI32",auto) */
  53.         public native static boolean CryptGenKey (int hProv, int Algid, int dwFlags, int[] phKey);
  54.  
  55.         /** @dll.import("ADVAPI32",auto) */
  56.         public native static boolean CryptGenRandom (int hProv, int dwLen, byte[] pbBuffer);
  57.  
  58.         /** @dll.import("ADVAPI32",auto) */
  59.         public native static boolean CryptGetHashParam (int hHash, int dwParam, byte[] pbData, int[] pdwDataLen, int dwFlags);
  60.  
  61.         /** @dll.import("ADVAPI32",auto) */
  62.         public native static boolean CryptGetKeyParam (int hKey, int dwParam, byte[] pbData, int[] pdwDataLen, int dwFlags);
  63.  
  64.         /** @dll.import("ADVAPI32",auto) */
  65.         public native static boolean CryptGetProvParam (int hProv, int dwParam, byte[] pbData, int[] pdwDataLen, int dwFlags);
  66.  
  67.         /** @dll.import("ADVAPI32",auto) */
  68.         public native static boolean CryptGetUserKey (int hProv, int dwKeySpec, int[] phUserKey);
  69.  
  70.         /** @dll.import("ADVAPI32",auto) */
  71.         public native static boolean CryptHashData (int hHash, byte[] pbData, int dwDataLen, int dwFlags);
  72.  
  73.         /** @dll.import("ADVAPI32",auto) */
  74.         public native static boolean CryptHashSessionKey (int hHash, int hKey, int dwFlags);
  75.  
  76.         /** @dll.import("ADVAPI32",auto) */
  77.         public native static boolean CryptImportKey (int hProv, byte[] pbData, int dwDataLen, int hPubKey, int dwFlags, int[] phKey);
  78.  
  79.         /** @dll.import("ADVAPI32",auto) */
  80.         public native static boolean CryptReleaseContext (int hProv, int dwFlags);
  81.  
  82.         /** @dll.import("ADVAPI32",auto) */
  83.         public native static boolean CryptSetHashParam (int hHash, int dwParam, byte[] pbData, int dwFlags);
  84.  
  85.         /** @dll.import("ADVAPI32",auto) */
  86.         public native static boolean CryptSetKeyParam (int hKey, int dwParam, byte[] pbData, int dwFlags);
  87.  
  88.         /** @dll.import("ADVAPI32",auto) */
  89.         public native static boolean CryptSetProvParam (int hProv, int dwParam, byte[] pbData, int dwFlags);
  90.  
  91.         /** @dll.import("ADVAPI32", auto) */
  92.         public native static boolean CryptSetProvider (String pszProvName, int dwProvType);
  93.  
  94.         /** @dll.import("ADVAPI32", auto) */
  95.         public native static boolean CryptSignHash (int hHash, int dwKeySpec, String sDescription, int dwFlags, byte[] pbSignature, int[] pdwSigLen);
  96.  
  97.         /** @dll.import("ADVAPI32", auto) */
  98.         public native static boolean CryptVerifySignature (int hHash, byte[] pbSignature, int dwSigLen, int hPubKey, String sDescription, int dwFlags);
  99.  
  100.         /** @dll.import("ADVAPI32",auto) */
  101.         public native static boolean DeregisterEventSource (int hEventLog);
  102.  
  103.         /** @dll.import("ADVAPI32",auto) */
  104.         public native static boolean DuplicateTokenEx (int hExistingToken, int dwDesiredAccess, SECURITY_ATTRIBUTES lpTokenAttributes, int ImpersonationLevel, int TokenType, int[] phNewToken);
  105.  
  106.         /** @dll.import("ADVAPI32",auto) */
  107.         public native static boolean GetCurrentHwProfile (HW_PROFILE_INFO lpHwProfileInfo);
  108.  
  109.         /** @dll.import("ADVAPI32", auto) */
  110.         /* explicitly excluded */ // public native static boolean GetFileSecurity (String lpFileName, int RequestedInformation, int pSecurityDescriptor, int nLength, int[] lpnLengthNeeded);
  111.  
  112.         /** @dll.import("ADVAPI32",auto) */
  113.         public native static boolean GetNumberOfEventLogRecords (int hEventLog, int[] NumberOfRecords);
  114.  
  115.         /** @dll.import("ADVAPI32",auto) */
  116.         public native static boolean GetOldestEventLogRecord (int hEventLog, int[] OldestRecord);
  117.  
  118.         /** @dll.import("ADVAPI32", auto) */
  119.         public native static boolean GetUserName (StringBuffer lpBuffer, int[] nSize);
  120.  
  121.         /** @dll.import("ADVAPI32",auto) */
  122.         public native static boolean ImpersonateLoggedOnUser (int hToken);
  123.  
  124.         /** @dll.import("ADVAPI32",auto) */
  125.         public native static boolean IsTextUnicode (Object lpBuffer, int cb, int[] lpi);
  126.  
  127.         /** @dll.import("ADVAPI32", auto) */
  128.         public native static boolean LogonUser (String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, int[] phToken);
  129.  
  130.         /** @dll.import("ADVAPI32", auto) */
  131.         /* explicitly excluded */ // public native static boolean LookupAccountName (String lpSystemName, String lpAccountName, int Sid, int[] cbSid, StringBuffer ReferencedDomainName, int[] cbReferencedDomainName, int[] peUse);
  132.  
  133.         /** @dll.import("ADVAPI32", auto) */
  134.         /* explicitly excluded */ // public native static boolean LookupAccountSid (String lpSystemName, int Sid, StringBuffer Name, int[] cbName, StringBuffer ReferencedDomainName, int[] cbReferencedDomainName, int[] peUse);
  135.  
  136.         /** @dll.import("ADVAPI32", auto) */
  137.         /* explicitly excluded */ // public native static boolean LookupPrivilegeDisplayName (String lpSystemName, String lpName, StringBuffer lpDisplayName, int[] cbDisplayName, int[] lpLanguageId);
  138.  
  139.         /** @dll.import("ADVAPI32", auto) */
  140.         /* explicitly excluded */ // public native static boolean LookupPrivilegeName (String lpSystemName, long[] lpLuid, StringBuffer lpName, int[] cbName);
  141.  
  142.         /** @dll.import("ADVAPI32", auto) */
  143.         /* explicitly excluded */ // public native static boolean LookupPrivilegeValue (String lpSystemName, String lpName, long[] lpLuid);
  144.  
  145.         /** @dll.import("ADVAPI32",auto) */
  146.         public native static boolean NotifyChangeEventLog (int hEventLog, int hEvent);
  147.  
  148.         /** @dll.import("ADVAPI32", auto) */
  149.         /* explicitly excluded */ // public native static boolean ObjectCloseAuditAlarm (String SubsystemName, int HandleId, boolean GenerateOnClose);
  150.  
  151.         /** @dll.import("ADVAPI32", auto) */
  152.         /* explicitly excluded */ // public native static boolean ObjectDeleteAuditAlarm (String SubsystemName, int HandleId, boolean GenerateOnClose);
  153.  
  154.         /** @dll.import("ADVAPI32", auto) */
  155.         /* explicitly excluded */ // public native static boolean ObjectOpenAuditAlarm (String SubsystemName, int HandleId, String ObjectTypeName, String ObjectName, int pSecurityDescriptor, int ClientToken, int DesiredAccess, int GrantedAccess, PRIVILEGE_SET Privileges, boolean ObjectCreation, boolean AccessGranted, int[] GenerateOnClose);
  156.  
  157.         /** @dll.import("ADVAPI32", auto) */
  158.         /* explicitly excluded */ // public native static boolean ObjectPrivilegeAuditAlarm (String SubsystemName, int HandleId, int ClientToken, int DesiredAccess, PRIVILEGE_SET Privileges, boolean AccessGranted);
  159.  
  160.         /** @dll.import("ADVAPI32", auto) */
  161.         public native static int OpenBackupEventLog (String lpUNCServerName, String lpFileName);
  162.  
  163.         /** @dll.import("ADVAPI32", auto) */
  164.         public native static int OpenEventLog (String lpUNCServerName, String lpSourceName);
  165.  
  166.         /** @dll.import("ADVAPI32", auto) */
  167.         /* explicitly excluded */ // public native static boolean PrivilegedServiceAuditAlarm (String SubsystemName, String ServiceName, int ClientToken, PRIVILEGE_SET Privileges, boolean AccessGranted);
  168.  
  169.         /** @dll.import("ADVAPI32",auto) */
  170.         public native static boolean ReadEventLog (int hEventLog, int dwReadFlags, int dwRecordOffset, Object lpBuffer, int nNumberOfBytesToRead, int[] pnBytesRead, int[] pnMinNumberOfBytesNeeded);
  171.  
  172.         /** @dll.import("ADVAPI32", auto) */
  173.         public native static int RegisterEventSource (String lpUNCServerName, String lpSourceName);
  174.  
  175.         /** @dll.import("ADVAPI32",auto) */
  176.         public native static boolean ReportEvent (int hEventLog, short wType, short wCategory, int dwEventID, int lpUserSid, short wNumStrings, int dwDataSize, Object lpStrings, Object lpRawData);
  177.  
  178.         /** @dll.import("ADVAPI32", auto) */
  179.         /* explicitly excluded */ // public native static boolean SetFileSecurity (String lpFileName, int SecurityInformation, int pSecurityDescriptor);
  180.  
  181.         /** @dll.import("ADVAPI32",auto) */
  182.         public native static boolean SetThreadToken (int[] Thread, int Token);
  183.  
  184.  
  185. }
  186.  
  187.