FileDocCategorySizeDatePackage
OtherFnc.javaAPI DocExample40374Fri Apr 24 01:00:00 BST 1998com.ms.win32

OtherFnc.java

// Copyright (C) 1997 Microsoft Corporation  All Rights Reserved

// This software is a preview release of the Windows Api Access classes
// for Java. These classes provide direct, low-overhead access to commonly used
// Windows api. These classes use the new J/Direct feature and therefore
// require either Internet Explorer 4.0 beta-2, or the Microsoft SDK for Java 2.0.
//
// WARNING: These classes are still in development and are incomplete.
// This preview release is being provided as-is in order to solicit feedback
// and to assist developers in the use of J/Direct by providing a library
// of prewritten declarations for the most common Win32 api. As with all
// prerelease software, it is subject to significant change without notice before
// shipping.
//
// Information on how to use J/Direct to write your own declarations
// can be found in the Microsoft SDK for Java 2.0.

package com.ms.win32;

class Advapi32 {
        /** @dll.import("ADVAPI32", auto) */
        /* 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, int[] AccessStatus, int[] pfGenerateOnClose);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean BackupEventLog (int hEventLog, String lpBackupFileName);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean ClearEventLog (int hEventLog, String lpBackupFileName);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CloseEventLog (int hEventLog);

        /** @dll.import("ADVAPI32", auto) */
        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);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean CryptAcquireContext (int[] phProv, String pszContainer, String pszProvider, int dwProvType, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptCreateHash (int hProv, int Algid, int hKey, int dwFlags, int[] phHash);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptDecrypt (int hKey, int hHash, boolean Final, int dwFlags, byte[] pbData, int[] pdwDataLen);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptDeriveKey (int hProv, int Algid, int hBaseData, int dwFlags, int[] phKey);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptDestroyHash (int hHash);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptDestroyKey (int hKey);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptEncrypt (int hKey, int hHash, boolean Final, int dwFlags, byte[] pbData, int[] pdwDataLen, int dwBufLen);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptExportKey (int hKey, int hExpKey, int dwBlobType, int dwFlags, byte[] pbData, int[] pdwDataLen);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptGenKey (int hProv, int Algid, int dwFlags, int[] phKey);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptGenRandom (int hProv, int dwLen, byte[] pbBuffer);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptGetHashParam (int hHash, int dwParam, byte[] pbData, int[] pdwDataLen, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptGetKeyParam (int hKey, int dwParam, byte[] pbData, int[] pdwDataLen, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptGetProvParam (int hProv, int dwParam, byte[] pbData, int[] pdwDataLen, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptGetUserKey (int hProv, int dwKeySpec, int[] phUserKey);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptHashData (int hHash, byte[] pbData, int dwDataLen, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptHashSessionKey (int hHash, int hKey, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptImportKey (int hProv, byte[] pbData, int dwDataLen, int hPubKey, int dwFlags, int[] phKey);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptReleaseContext (int hProv, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptSetHashParam (int hHash, int dwParam, byte[] pbData, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptSetKeyParam (int hKey, int dwParam, byte[] pbData, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean CryptSetProvParam (int hProv, int dwParam, byte[] pbData, int dwFlags);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean CryptSetProvider (String pszProvName, int dwProvType);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean CryptSignHash (int hHash, int dwKeySpec, String sDescription, int dwFlags, byte[] pbSignature, int[] pdwSigLen);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean CryptVerifySignature (int hHash, byte[] pbSignature, int dwSigLen, int hPubKey, String sDescription, int dwFlags);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean DeregisterEventSource (int hEventLog);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean DuplicateTokenEx (int hExistingToken, int dwDesiredAccess, SECURITY_ATTRIBUTES lpTokenAttributes, int ImpersonationLevel, int TokenType, int[] phNewToken);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean GetCurrentHwProfile (HW_PROFILE_INFO lpHwProfileInfo);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean GetFileSecurity (String lpFileName, int RequestedInformation, int pSecurityDescriptor, int nLength, int[] lpnLengthNeeded);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean GetNumberOfEventLogRecords (int hEventLog, int[] NumberOfRecords);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean GetOldestEventLogRecord (int hEventLog, int[] OldestRecord);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean GetUserName (StringBuffer lpBuffer, int[] nSize);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean ImpersonateLoggedOnUser (int hToken);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean IsTextUnicode (int lpBuffer, int cb, int[] lpi);

        /** @dll.import("ADVAPI32", auto) */
        public native static boolean LogonUser (String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, int[] phToken);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean LookupAccountName (String lpSystemName, String lpAccountName, int Sid, int[] cbSid, StringBuffer ReferencedDomainName, int[] cbReferencedDomainName, int[] peUse);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean LookupAccountSid (String lpSystemName, int Sid, StringBuffer Name, int[] cbName, StringBuffer ReferencedDomainName, int[] cbReferencedDomainName, int[] peUse);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean LookupPrivilegeDisplayName (String lpSystemName, String lpName, StringBuffer lpDisplayName, int[] cbDisplayName, int[] lpLanguageId);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean LookupPrivilegeName (String lpSystemName, long[] lpLuid, StringBuffer lpName, int[] cbName);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean LookupPrivilegeValue (String lpSystemName, String lpName, long[] lpLuid);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean NotifyChangeEventLog (int hEventLog, int hEvent);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean ObjectCloseAuditAlarm (String SubsystemName, int HandleId, boolean GenerateOnClose);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean ObjectDeleteAuditAlarm (String SubsystemName, int HandleId, boolean GenerateOnClose);

        /** @dll.import("ADVAPI32", auto) */
        /* 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);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean ObjectPrivilegeAuditAlarm (String SubsystemName, int HandleId, int ClientToken, int DesiredAccess, PRIVILEGE_SET Privileges, boolean AccessGranted);

        /** @dll.import("ADVAPI32", auto) */
        public native static int OpenBackupEventLog (String lpUNCServerName, String lpFileName);

        /** @dll.import("ADVAPI32", auto) */
        public native static int OpenEventLog (String lpUNCServerName, String lpSourceName);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean PrivilegedServiceAuditAlarm (String SubsystemName, String ServiceName, int ClientToken, PRIVILEGE_SET Privileges, boolean AccessGranted);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean ReadEventLog (int hEventLog, int dwReadFlags, int dwRecordOffset, int lpBuffer, int nNumberOfBytesToRead, int[] pnBytesRead, int[] pnMinNumberOfBytesNeeded);

        /** @dll.import("ADVAPI32", auto) */
        public native static int RegisterEventSource (String lpUNCServerName, String lpSourceName);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean ReportEvent (int hEventLog, short wType, short wCategory, int dwEventID, int lpUserSid, short wNumStrings, int dwDataSize, int lpStrings, int lpRawData);

        /** @dll.import("ADVAPI32", auto) */
        /* explicitly excluded */ // public native static boolean SetFileSecurity (String lpFileName, int SecurityInformation, int pSecurityDescriptor);

        /** @dll.import("ADVAPI32",auto) */
        public native static boolean SetThreadToken (int[] Thread, int Token);


}

class Shell32 {
        /** @dll.import("SHELL32", auto) */
        public native static int CommandLineToArgvW (String lpCmdLine, int[] pNumArgs);

        /** @dll.import("SHELL32",auto) */
        public native static void DragAcceptFiles (int anonymous0, boolean anonymous1);

        /** @dll.import("SHELL32",auto) */
        public native static void DragFinish (int anonymous0);

        /** @dll.import("SHELL32", auto) */
        public native static int DragQueryFile (int anonymous0, int anonymous1, StringBuffer anonymous2, int anonymous3);

        /** @dll.import("SHELL32",auto) */
        public native static boolean DragQueryPoint (int anonymous0, POINT anonymous1);

        /** @dll.import("SHELL32", auto) */
        public native static int ExtractAssociatedIcon (int hInst, StringBuffer lpIconPath, short[] lpiIcon);

        /** @dll.import("SHELL32", auto) */
        public native static int ExtractIconEx (String lpszFile, int nIconIndex, int[] phiconLarge, int[] phiconSmall, int nIcons);

        /** @dll.import("SHELL32", auto) */
        public native static int ExtractIcon (int hInst, String lpszExeFileName, int nIconIndex);

        /** @dll.import("SHELL32", auto) */
        public native static int FindExecutable (String lpFile, String lpDirectory, StringBuffer lpResult);

        /** @dll.import("SHELL32",auto) */
        public native static int SHAppBarMessage (int dwMessage, APPBARDATA pData);

        /** @dll.import("SHELL32",auto) */
        public native static int SHFileOperation (SHFILEOPSTRUCT lpFileOp);

        /** @dll.import("SHELL32",auto) */
        public native static void SHFreeNameMappings (int hNameMappings);

        /** @dll.import("SHELL32", auto) */
        public native static int SHGetFileInfo (String pszPath, int dwFileAttributes, SHFILEINFO psfi, int cbFileInfo, int uFlags);

        /** @dll.import("SHELL32", auto) */
        public native static int ShellAbout (int hWnd, String szApp, String szOtherStuff, int hIcon);

        /** @dll.import("SHELL32",auto) */
        public native static boolean ShellExecuteEx (SHELLEXECUTEINFO lpExecInfo);

        /** @dll.import("SHELL32", auto) */
        public native static int ShellExecute (int hwnd, String lpOperation, String lpFile, String lpParameters, String lpDirectory, int nShowCmd);

        /** @dll.import("SHELL32",auto) */
        public native static boolean Shell_NotifyIcon (int dwMessage, NOTIFYICONDATA lpData);


}

class Spoolss {
        /** @dll.import("SPOOLSS",auto) */
        public native static boolean AbortPrinter (int hPrinter);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean AddForm (int hPrinter, int Level, byte[] pForm);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean AddJob (int hPrinter, int Level, byte[] pData, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean AddMonitor (String pName, int Level, byte[] pMonitors);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean AddPort (String pName, int hWnd, String pMonitorName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean AddPrintProcessor (String pName, String pEnvironment, String pPathName, String pPrintProcessorName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean AddPrintProvidor (String pName, int level, byte[] pProvidorInfo);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean AddPrinterConnection (String pName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean AddPrinterDriver (String pName, int Level, byte[] pDriverInfo);

        /** @dll.import("SPOOLSS", auto) */
        public native static int AddPrinter (String pName, int Level, byte[] pPrinter);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean ClosePrinter (int hPrinter);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean ConfigurePort (String pName, int hWnd, String pPortName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeleteForm (int hPrinter, String pFormName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeleteMonitor (String pName, String pEnvironment, String pMonitorName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeletePort (String pName, int hWnd, String pPortName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeletePrintProcessor (String pName, String pEnvironment, String pPrintProcessorName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeletePrintProvidor (String pName, String pEnvironment, String pPrintProvidorName);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean DeletePrinter (int hPrinter);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeletePrinterConnection (String pName);

        /** @dll.import("SPOOLSS", auto) */
        public native static int DeletePrinterData (int hPrinter, String pValueName);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean DeletePrinterDriver (String pName, String pEnvironment, String pDriverName);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean EndDocPrinter (int hPrinter);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean EndPagePrinter (int hPrinter);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean EnumForms (int hPrinter, int Level, byte[] pForm, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean EnumJobs (int hPrinter, int FirstJob, int NoJobs, int Level, byte[] pJob, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean EnumMonitors (String pName, int Level, byte[] pMonitors, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean EnumPorts (String pName, int Level, byte[] pPorts, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean EnumPrintProcessorDatatypes (String pName, String pPrintProcessorName, int Level, byte[] pDatatypes, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean EnumPrintProcessors (String pName, String pEnvironment, int Level, byte[] pPrintProcessorInfo, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS", auto) */
        public native static int EnumPrinterData (int hPrinter, int dwIndex, String pValueName, int cbValueName, int[] pcbValueName, int[] pType, byte[] pData, int cbData, int[] pcbData);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean EnumPrinterDrivers (String pName, String pEnvironment, int Level, byte[] pDriverInfo, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean EnumPrinters (int Flags, String Name, int Level, byte[] pPrinterEnum, int cbBuf, int[] pcbNeeded, int[] pcReturned);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean FindClosePrinterChangeNotification (int hChange);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean GetForm (int hPrinter, String pFormName, int Level, byte[] pForm, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean GetJob (int hPrinter, int JobId, int Level, byte[] pJob, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean GetPrintProcessorDirectory (String pName, String pEnvironment, int Level, byte[] pPrintProcessorInfo, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS", auto) */
        public native static int GetPrinterData (int hPrinter, String pValueName, int[] pType, byte[] pData, int nSize, int[] pcbNeeded);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean GetPrinterDriverDirectory (String pName, String pEnvironment, int Level, byte[] pDriverDirectory, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean GetPrinterDriver (int hPrinter, String pEnvironment, int Level, byte[] pDriverInfo, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean GetPrinter (int hPrinter, int Level, byte[] pPrinter, int cbBuf, int[] pcbNeeded);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean OpenPrinter (String pPrinterName, int[] phPrinter, PRINTER_DEFAULTS pDefault);

        /** @dll.import("SPOOLSS", auto) */
        public native static int PrinterMessageBox (int hPrinter, int Error, int hWnd, String pText, String pCaption, int dwType);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean ReadPrinter (int hPrinter, int pBuf, int cbBuf, int[] pNoBytesRead);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean ResetPrinter (int hPrinter, PRINTER_DEFAULTS pDefault);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean ScheduleJob (int hPrinter, int JobId);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean SetForm (int hPrinter, String pFormName, int Level, byte[] pForm);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean SetJob (int hPrinter, int JobId, int Level, byte[] pJob, int Command);

        /** @dll.import("SPOOLSS", auto) */
        public native static boolean SetPort (String pName, String pPortName, int dwLevel, byte[] pPortInfo);

        /** @dll.import("SPOOLSS", auto) */
        public native static int SetPrinterData (int hPrinter, String pValueName, int Type, byte[] pData, int cbData);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean SetPrinter (int hPrinter, int Level, byte[] pPrinter, int Command);

        /** @dll.import("SPOOLSS",auto) */
        public native static int StartDocPrinter (int hPrinter, int Level, byte[] pDocInfo);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean StartPagePrinter (int hPrinter);

        /** @dll.import("SPOOLSS",auto) */
        public native static int WaitForPrinterChange (int hPrinter, int Flags);

        /** @dll.import("SPOOLSS",auto) */
        public native static boolean WritePrinter (int hPrinter, int pBuf, int cbBuf, int[] pcWritten);


}

class Winmm {
        /** @dll.import("WINMM",auto) */
        public native static int CloseDriver (int hDriver, int lParam1, int lParam2);

        /** @dll.import("WINMM",auto) */
        public native static int DefDriverProc (int dwDriverIdentifier, int hdrvr, int uMsg, int lParam1, int lParam2);

        /** @dll.import("WINMM",auto) */
        public native static int DrvGetModuleHandle (int hDriver);

        /** @dll.import("WINMM",auto) */
        public native static int GetDriverModuleHandle (int hDriver);

        /** @dll.import("WINMM", auto) */
        public native static int OpenDriver (String szDriverName, String szSectionName, int lParam2);

        /** @dll.import("WINMM", auto) */
        public native static boolean PlaySound (String pszSound, int hmod, int fdwSound);

        /** @dll.import("WINMM",auto) */
        public native static int SendDriverMessage (int hDriver, int message, int lParam1, int lParam2);

        /** @dll.import("WINMM",auto) */
        public native static int auxGetDevCaps (int uDeviceID, AUXCAPS pac, int cbac);

        /** @dll.import("WINMM",auto) */
        public native static int auxGetNumDevs ();

        /** @dll.import("WINMM",auto) */
        public native static int auxGetVolume (int uDeviceID, int[] pdwVolume);

        /** @dll.import("WINMM",auto) */
        public native static int auxOutMessage (int uDeviceID, int uMsg, int dw1, int dw2);

        /** @dll.import("WINMM",auto) */
        public native static int auxSetVolume (int uDeviceID, int dwVolume);

        /** @dll.import("WINMM",auto) */
        public native static int joyGetDevCaps (int uJoyID, JOYCAPS pjc, int cbjc);

        /** @dll.import("WINMM",auto) */
        public native static int joyGetNumDevs ();

        /** @dll.import("WINMM",auto) */
        public native static int joyGetPos (int uJoyID, JOYINFO pji);

        /** @dll.import("WINMM",auto) */
        public native static int joyGetPosEx (int uJoyID, JOYINFOEX pji);

        /** @dll.import("WINMM",auto) */
        public native static int joyGetThreshold (int uJoyID, int[] puThreshold);

        /** @dll.import("WINMM",auto) */
        public native static int joyReleaseCapture (int uJoyID);

        /** @dll.import("WINMM",auto) */
        public native static int joySetCapture (int hwnd, int uJoyID, int uPeriod, boolean fChanged);

        /** @dll.import("WINMM",auto) */
        public native static int joySetThreshold (int uJoyID, int uThreshold);

        /** @dll.import("WINMM",auto) */
        public native static int mciGetCreatorTask (int mciId);

        /** @dll.import("WINMM", auto) */
        public native static int mciGetDeviceIDFromElementID (int dwElementID, String lpstrType);

        /** @dll.import("WINMM", auto) */
        public native static int mciGetDeviceID (String pszDevice);

        /** @dll.import("WINMM", auto) */
        public native static boolean mciGetErrorString (int mcierr, StringBuffer pszText, int cchText);

        /** @dll.import("WINMM",auto) */
        public native static com.ms.dll.Callback mciGetYieldProc (int mciId, int[] pdwYieldData);

        /** @dll.import("WINMM",auto) */
        public native static boolean mciExecute (String cmd);

        /** @dll.import("WINMM",auto) */
        public native static int mciSendCommand (int mciId, int uMsg, int dwParam1, int dwParam2);

        /** @dll.import("WINMM",auto) */
        public native static int mciSendCommand (int mciId, int uMsg, int dwParam1, Object dwParam2);

        /** @dll.import("WINMM",auto) */
        public native static int mciSendCommand (int mciId, int uMsg, int dwParam1, byte[] dwParam2);

        /** @dll.import("WINMM", auto) */
        public native static int mciSendString (String lpstrCommand, StringBuffer lpstrReturnString, int uReturnLength, int hwndCallback);

        /** @dll.import("WINMM",auto) */
        public native static boolean mciSetYieldProc (int mciId, com.ms.dll.Callback fpYieldProc, int dwYieldData);

        /** @dll.import("WINMM",auto) */
        public native static int midiConnect (int hmi, int hmo, int pReserved);

        /** @dll.import("WINMM",auto) */
        public native static int midiDisconnect (int hmi, int hmo, int pReserved);

        /** @dll.import("WINMM",auto) */
        public native static int midiInAddBuffer (int hmi, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiInClose (int hmi);

        /** @dll.import("WINMM",auto) */
        public native static int midiInGetDevCaps (int uDeviceID, MIDIINCAPS pmic, int cbmic);

        /** @dll.import("WINMM", auto) */
        public native static int midiInGetErrorText (int mmrError, StringBuffer pszText, int cchText);

        /** @dll.import("WINMM",auto) */
        public native static int midiInGetID (int hmi, int[] puDeviceID);

        /** @dll.import("WINMM",auto) */
        public native static int midiInGetNumDevs ();

        /** @dll.import("WINMM",auto) */
        public native static int midiInMessage (int hmi, int uMsg, int dw1, int dw2);

        /** @dll.import("WINMM",auto) */
        public native static int midiInOpen (int phmi, int uDeviceID, int dwCallback, int dwInstance, int fdwOpen);

        /** @dll.import("WINMM",auto) */
        public native static int midiInPrepareHeader (int hmi, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiInReset (int hmi);

        /** @dll.import("WINMM",auto) */
        public native static int midiInStart (int hmi);

        /** @dll.import("WINMM",auto) */
        public native static int midiInStop (int hmi);

        /** @dll.import("WINMM",auto) */
        public native static int midiInUnprepareHeader (int hmi, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutCacheDrumPatches (int hmo, int uPatch, short[] pwkya, int fuCache);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutCachePatches (int hmo, int uBank, short[] pwpa, int fuCache);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutClose (int hmo);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutGetDevCaps (int uDeviceID, MIDIOUTCAPS pmoc, int cbmoc);

        /** @dll.import("WINMM", auto) */
        public native static int midiOutGetErrorText (int mmrError, StringBuffer pszText, int cchText);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutGetID (int hmo, int[] puDeviceID);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutGetNumDevs ();

        /** @dll.import("WINMM",auto) */
        public native static int midiOutGetVolume (int hmo, int[] pdwVolume);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutLongMsg (int hmo, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutMessage (int hmo, int uMsg, int dw1, int dw2);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutOpen (int phmo, int uDeviceID, int dwCallback, int dwInstance, int fdwOpen);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutPrepareHeader (int hmo, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutReset (int hmo);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutSetVolume (int hmo, int dwVolume);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutShortMsg (int hmo, int dwMsg);

        /** @dll.import("WINMM",auto) */
        public native static int midiOutUnprepareHeader (int hmo, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamClose (int hms);

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamOpen (int phms, int[] puDeviceID, int cMidi, int dwCallback, int dwInstance, int fdwOpen);

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamOut (int hms, MIDIHDR pmh, int cbmh);

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamPause (int hms);

// midiStreamPosition took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamProperty (int hms, Object lppropdata, int dwProperty);

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamRestart (int hms);

        /** @dll.import("WINMM",auto) */
        public native static int midiStreamStop (int hms);

        /** @dll.import("WINMM",auto) */
        public native static int mixerClose (int hmx);

// mixerGetControlDetails took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int mixerGetDevCaps (int uMxId, MIXERCAPS pmxcaps, int cbmxcaps);

        /** @dll.import("WINMM",auto) */
        public native static int mixerGetID (int hmxobj, int[] puMxId, int fdwId);

// mixerGetLineControls took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int mixerGetLineInfo (int hmxobj, MIXERLINE pmxl, int fdwInfo);

        /** @dll.import("WINMM",auto) */
        public native static int mixerGetNumDevs ();

        /** @dll.import("WINMM",auto) */
        public native static int mixerMessage (int hmx, int uMsg, int dwParam1, int dwParam2);

        /** @dll.import("WINMM",auto) */
        public native static int mixerOpen (int phmx, int uMxId, int dwCallback, int dwInstance, int fdwOpen);

// mixerSetControlDetails took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int mmioAdvance (int hmmio, MMIOINFO pmmioinfo, int fuAdvance);

        /** @dll.import("WINMM",auto) */
        public native static int mmioAscend (int hmmio, MMCKINFO pmmcki, int fuAscend);

        /** @dll.import("WINMM",auto) */
        public native static int mmioClose (int hmmio, int fuClose);

        /** @dll.import("WINMM",auto) */
        public native static int mmioCreateChunk (int hmmio, MMCKINFO pmmcki, int fuCreate);

        /** @dll.import("WINMM",auto) */
        public native static int mmioDescend (int hmmio, MMCKINFO pmmcki, MMCKINFO pmmckiParent, int fuDescend);

        /** @dll.import("WINMM",auto) */
        public native static int mmioFlush (int hmmio, int fuFlush);

        /** @dll.import("WINMM",auto) */
        public native static int mmioGetInfo (int hmmio, MMIOINFO pmmioinfo, int fuInfo);

        /** @dll.import("WINMM",auto) */
        public native static com.ms.dll.Callback mmioInstallIOProc (int fccIOProc, com.ms.dll.Callback pIOProc, int dwFlags);

        /** @dll.import("WINMM", auto) */
        public native static int mmioOpen (String pszFileName, MMIOINFO pmmioinfo, int fdwOpen);

        /** @dll.import("WINMM",auto) */
        public native static int mmioRead (int hmmio, byte[] pch, int cch);

        /** @dll.import("WINMM", auto) */
        public native static int mmioRename (String pszFileName, String pszNewFileName, MMIOINFO pmmioinfo, int fdwRename);

        /** @dll.import("WINMM",auto) */
        public native static int mmioSeek (int hmmio, int lOffset, int iOrigin);

        /** @dll.import("WINMM",auto) */
        public native static int mmioSendMessage (int hmmio, int uMsg, int lParam1, int lParam2);

        /** @dll.import("WINMM", ansi) */
        public native static int mmioSetBuffer (int hmmio, int pchBuffer, int cchBuffer, int fuBuffer);

        /** @dll.import("WINMM",auto) */
        public native static int mmioSetInfo (int hmmio, MMIOINFO pmmioinfo, int fuInfo);

        /** @dll.import("WINMM", auto) */
        public native static int mmioStringToFOURCC (String sz, int uFlags);

        /** @dll.import("WINMM",auto) */
        public native static int mmioWrite (int hmmio, byte[] pch, int cch);

        /** @dll.import("WINMM", auto) */
        public native static boolean sndPlaySound (String pszSound, int fuSound);

        /** @dll.import("WINMM",auto) */
        public native static int timeBeginPeriod (int uPeriod);

        /** @dll.import("WINMM",auto) */
        public native static int timeEndPeriod (int uPeriod);

        /** @dll.import("WINMM",auto) */
        public native static int timeGetDevCaps (TIMECAPS ptc, int cbtc);

// timeGetSystemTime took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int timeGetTime ();

        /** @dll.import("WINMM",auto) */
        public native static int timeKillEvent (int uTimerID);

        /** @dll.import("WINMM",auto) */
        public native static int timeSetEvent (int uDelay, int uResolution, com.ms.dll.Callback fptc, int dwUser, int fuEvent);

        /** @dll.import("WINMM",auto) */
        public native static int waveInAddBuffer (int hwi, WAVEHDR pwh, int cbwh);

        /** @dll.import("WINMM",auto) */
        public native static int waveInClose (int hwi);

        /** @dll.import("WINMM",auto) */
        public native static int waveInGetDevCaps (int uDeviceID, WAVEINCAPS pwic, int cbwic);

        /** @dll.import("WINMM", auto) */
        public native static int waveInGetErrorText (int mmrError, StringBuffer pszText, int cchText);

        /** @dll.import("WINMM",auto) */
        public native static int waveInGetID (int hwi, int[] puDeviceID);

        /** @dll.import("WINMM",auto) */
        public native static int waveInGetNumDevs ();

// waveInGetPosition took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int waveInMessage (int hwi, int uMsg, int dw1, int dw2);

        /** @dll.import("WINMM",auto) */
        public native static int waveInOpen (int[] phwi, int uDeviceID, WAVEFORMATEX pwfx, int dwCallback, int dwInstance, int fdwOpen);

        /** @dll.import("WINMM",auto) */
        public native static int waveInPrepareHeader (int hwi, WAVEHDR pwh, int cbwh);

        /** @dll.import("WINMM",auto) */
        public native static int waveInReset (int hwi);

        /** @dll.import("WINMM",auto) */
        public native static int waveInStart (int hwi);

        /** @dll.import("WINMM",auto) */
        public native static int waveInStop (int hwi);

        /** @dll.import("WINMM",auto) */
        public native static int waveInUnprepareHeader (int hwi, WAVEHDR pwh, int cbwh);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutBreakLoop (int hwo);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutClose (int hwo);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutGetDevCaps (int uDeviceID, WAVEOUTCAPS pwoc, int cbwoc);

        /** @dll.import("WINMM", auto) */
        public native static int waveOutGetErrorText (int mmrError, StringBuffer pszText, int cchText);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutGetID (int hwo, int[] puDeviceID);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutGetNumDevs ();

        /** @dll.import("WINMM",auto) */
        public native static int waveOutGetPitch (int hwo, int[] pdwPitch);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutGetPlaybackRate (int hwo, int[] pdwRate);

// waveOutGetPosition took a parameter that either was or contained a union.

        /** @dll.import("WINMM",auto) */
        public native static int waveOutGetVolume (int hwo, int[] pdwVolume);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutMessage (int hwo, int uMsg, int dw1, int dw2);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutOpen (int[] phwo, int uDeviceID, WAVEFORMATEX pwfx, int dwCallback, int dwInstance, int fdwOpen);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutPause (int hwo);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutPrepareHeader (int hwo, WAVEHDR pwh, int cbwh);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutReset (int hwo);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutRestart (int hwo);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutSetPitch (int hwo, int dwPitch);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutSetPlaybackRate (int hwo, int dwRate);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutSetVolume (int hwo, int dwVolume);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutUnprepareHeader (int hwo, WAVEHDR pwh, int cbwh);

        /** @dll.import("WINMM",auto) */
        public native static int waveOutWrite (int hwo, WAVEHDR pwh, int cbwh);


}