diff --git a/vendor/JXInput/0.3.4/c/JXInputManager.cpp b/vendor/JXInput/0.3.4/c/JXInputManager.cpp deleted file mode 100644 index 3718a7f..0000000 --- a/vendor/JXInput/0.3.4/c/JXInputManager.cpp +++ /dev/null @@ -1,175 +0,0 @@ - -#include "stdafx.h" -#include "JXInputManager.h" -#include "JXInput.h" - -// -// Globals -// -extern HINSTANCE g_hInst; - - -JXInputManager::JXInputManager( HWND hWnd ) : -mhWnd( hWnd ), -mDeviceCounter( 0 ) -{ - - for ( int i = 0; i < MAX_JXINPUTS; ++i ) - { - mDevices[ i ] = NULL; - } - - - if ( FAILED( InitDirectInput( hWnd ) ) ) - { - FreeDirectInput(); - } - -} - -JXInputManager::~JXInputManager() -{ - for ( int i = 0; i < getNumberOfJXInputs(); ++i ) - { - delete mDevices[ i ]; - mDevices[ i ] = NULL; - } - - FreeDirectInput(); -} - -int JXInputManager::getNumberOfJXInputs() const -{ - return mDeviceCounter; -} - -JXInput& JXInputManager::getJXInput( int idx ) const -{ - assert( idx < mDeviceCounter ); - return * mDevices[ idx ]; -} - - -int JXInputManager::getMaxNumberOfAxes() const -{ - return JXINPUT_MAX_AXES; -} - -int JXInputManager::getMaxNumberOfButtons() const -{ - return JXINPUT_MAX_BUTTONS; -} - -int JXInputManager::getMaxNumberOfDirectionals() const -{ - return JXINPUT_MAX_DIRECTIONALS; -} - - - -//----------------------------------------------------------------------------- -// Name: InitDirectInput() -// Desc: Initialize the DirectInput variables. -//----------------------------------------------------------------------------- -HRESULT JXInputManager::InitDirectInput( HWND hWnd ) -{ - HRESULT hr; - - // Register with the DirectInput subsystem and get a pointer - // to a IDirectInput interface we can use. - // Create a DInput object - if( FAILED( hr = DirectInput8Create( g_hInst, DIRECTINPUT_VERSION, - IID_IDirectInput8, (VOID**)&mpDI, NULL ) ) ) - return hr; - - // Look for a simple joystick we can use for this sample program. - if( FAILED( hr = mpDI->EnumDevices( DI8DEVCLASS_GAMECTRL, - EnumJoysticksCallback, - (VOID*)this, DIEDFL_ALLDEVICES /*| DIEDFL_INCLUDEPHANTOMS*/ ) ) ) - return hr; - - // Look for a other devices - if( FAILED( hr = mpDI->EnumDevices( DI8DEVCLASS_DEVICE, - EnumJoysticksCallback, - (VOID*)this, DIEDFL_ALLDEVICES /*| DIEDFL_INCLUDEPHANTOMS*/ ) ) ) - return hr; - - return S_OK; -} - - -//----------------------------------------------------------------------------- -// Name: FreeDirectInput() -// Desc: Initialize the DirectInput variables. -//----------------------------------------------------------------------------- -HRESULT JXInputManager::FreeDirectInput() -{ - - if ( NULL != mpDI ) - mpDI->Release(); - mpDI = NULL; - return S_OK; -} - - -//----------------------------------------------------------------------------- -// Name: EnumJoysticksCallback() -// Desc: Called once for each enumerated joystick. If we find one, create a -// device interface on it so we can play with it. -//----------------------------------------------------------------------------- -BOOL CALLBACK JXInputManager::EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, - VOID* pContext ) -{ - HRESULT hr; - LPDIRECTINPUTDEVICE8 pJoystick; - - JXInputManager* pThis = (JXInputManager*)pContext; - - // - // if the maximum number of devices is already registered, - // issue a warning and stop enumeration. - // - if( MAX_JXINPUTS == pThis->mDeviceCounter ) - { - OutputDebugString( "Max. number of devices exceeded!" ); - return DIENUM_STOP; - } - - - - // Obtain an interface to the enumerated joystick. - hr = pThis->mpDI->CreateDevice( pdidInstance->guidInstance, &pJoystick, NULL ); - - // If it failed, then we can't use this joystick. (Maybe the user unplugged - // it while we were in the middle of enumerating it.) - if( FAILED(hr) ) - return DIENUM_CONTINUE; - - JXInput* pJ = new JXInput( pJoystick, pThis->mhWnd ); - - // - // only register useful devices - // - if( pJ->getNumberOfAxes() + pJ->getNumberOfButtons() + pJ->getNumberOfDirectionals() > 0 ) - { - pThis->addJXInput( pJ ); - } - else - { - delete pJ; - } - - return DIENUM_CONTINUE; -} - - -/** - * Register a JXInput device. - */ -void JXInputManager::addJXInput( JXInput* pJ ) -{ - assert( mDeviceCounter < MAX_JXINPUTS ); - - if( mDeviceCounter < MAX_JXINPUTS ) - mDevices[ mDeviceCounter++ ] = pJ; -} diff --git a/vendor/JXInput/0.3.4/c/JXInputManager.h b/vendor/JXInput/0.3.4/c/JXInputManager.h deleted file mode 100644 index 41b9da4..0000000 --- a/vendor/JXInput/0.3.4/c/JXInputManager.h +++ /dev/null @@ -1,47 +0,0 @@ -// JXInputManager.h: Schnittstelle für die Klasse JXInputManager. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_JXINPUTMANAGER_H__24862402_14C9_407D_8532_A16A6E3A7D64__INCLUDED_) -#define AFX_JXINPUTMANAGER_H__24862402_14C9_407D_8532_A16A6E3A7D64__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -#define MAX_JXINPUTS 10 - -class JXInput; - -class JXINPUT_API JXInputManager -{ -public: - JXInputManager( HWND hWnd ); - virtual ~JXInputManager(); - - int getNumberOfJXInputs() const; - JXInput& getJXInput( int idx ) const; - - // - // Numbering methods - // - int getMaxNumberOfAxes() const; - int getMaxNumberOfButtons() const; - int getMaxNumberOfDirectionals() const; - -private: - LPDIRECTINPUT8 mpDI; - HWND mhWnd; - JXInput* mDevices[ MAX_JXINPUTS ]; - int mDeviceCounter; - - HRESULT InitDirectInput( HWND hWnd = NULL ); - HRESULT FreeDirectInput(); - - static BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, - VOID* pContext ); - void addJXInput( JXInput* pJ ); -}; - -#endif // !defined(AFX_JXINPUTMANAGER_H__24862402_14C9_407D_8532_A16A6E3A7D64__INCLUDED_) diff --git a/vendor/JXInput/0.3.4/c/ReadMe.txt b/vendor/JXInput/0.3.4/c/ReadMe.txt deleted file mode 100644 index 755cd4c..0000000 --- a/vendor/JXInput/0.3.4/c/ReadMe.txt +++ /dev/null @@ -1,37 +0,0 @@ -======================================================================== - DYNAMIC LINK LIBRARY : jxinput -======================================================================== - - -Diese jxinput-DLL hat der Anwendungs-Assistent für Sie erstellt. - -Diese Datei enthält eine Zusammenfassung dessen, was Sie in jeder der Dateien -finden, die Ihre jxinput-Anwendung bilden. - -jxinput.dsp - Diese Datei (Projektdatei) enthält Informationen auf Projektebene und wird zur - Erstellung eines einzelnen Projekts oder Teilprojekts verwendet. Andere Benutzer können - die Projektdatei (.dsp) gemeinsam nutzen, sollten aber die Makefiles lokal exportieren. - -jxinput.cpp - Dies ist die Hauptquellcodedatei für die DLL. - -jxinput.h - Diese Datei enthält Ihre DLL-Exporte. - -///////////////////////////////////////////////////////////////////////////// -Weitere Standarddateien: - -StdAfx.h, StdAfx.cpp - Diese Dateien werden zum Erstellen einer vorkompilierten Header-Datei (PCH) namens - jxinput.pch und einer vorkompilierten Typdatei namens StdAfx.obj verwendet. - - -///////////////////////////////////////////////////////////////////////////// -Weitere Hinweise: - -Der Anwendungs-Assistent verwendet "ZU ERLEDIGEN:", um Bereiche des Quellcodes zu -kennzeichnen, die Sie hinzufügen oder anpassen sollten. - - -///////////////////////////////////////////////////////////////////////////// diff --git a/vendor/JXInput/0.3.4/c/StdAfx.cpp b/vendor/JXInput/0.3.4/c/StdAfx.cpp deleted file mode 100644 index a144a09..0000000 --- a/vendor/JXInput/0.3.4/c/StdAfx.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// stdafx.cpp : Quelltextdatei, die nur die Standard-Includes einbindet -// jxinput.pch ist die vorkompilierte Header-Datei -// stdafx.obj enthält die vorkompilierte Typinformation - -#include "stdafx.h" - -// ZU ERLEDIGEN: Verweis auf alle zusätzlichen Header-Dateien, die Sie in STDAFX.H -// und nicht in dieser Datei benötigen - diff --git a/vendor/JXInput/0.3.4/c/StdAfx.h b/vendor/JXInput/0.3.4/c/StdAfx.h deleted file mode 100644 index e139c4c..0000000 --- a/vendor/JXInput/0.3.4/c/StdAfx.h +++ /dev/null @@ -1,32 +0,0 @@ -// stdafx.h : Include-Datei für Standard-System-Include-Dateien, -// oder projektspezifische Include-Dateien, die häufig benutzt, aber -// in unregelmäßigen Abständen geändert werden. -// - -#if !defined(AFX_STDAFX_H__68E14C76_098F_47ED_932B_4C01E8E9EFFB__INCLUDED_) -#define AFX_STDAFX_H__68E14C76_098F_47ED_932B_4C01E8E9EFFB__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -// Fügen Sie hier Ihre Header-Dateien ein -#define WIN32_LEAN_AND_MEAN // Selten benutzte Teile der Windows-Header nicht einbinden -#define STRICT -#include - -// ZU ERLEDIGEN: Verweisen Sie hier auf zusätzliche Header-Dateien, die Ihr Programm benötigt -#ifdef JXINPUT_EXPORTS -#define JXINPUT_API __declspec(dllexport) -#else -#define JXINPUT_API __declspec(dllimport) -#endif - -#include -#include - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ fügt zusätzliche Deklarationen unmittelbar vor der vorherigen Zeile ein. - -#endif // !defined(AFX_STDAFX_H__68E14C76_098F_47ED_932B_4C01E8E9EFFB__INCLUDED_) diff --git a/vendor/JXInput/0.3.4/c/de_hardcode_jxinput_directinput_DirectInputDriver.cpp b/vendor/JXInput/0.3.4/c/de_hardcode_jxinput_directinput_DirectInputDriver.cpp deleted file mode 100644 index 077afe8..0000000 --- a/vendor/JXInput/0.3.4/c/de_hardcode_jxinput_directinput_DirectInputDriver.cpp +++ /dev/null @@ -1,279 +0,0 @@ -#include "stdafx.h" - -#include "de_hardcode_jxinput_directinput_DirectInputDriver.h" -#include "jxinput.h" -#include "JXInputManager.h" - - -// -// Globals -// -extern HINSTANCE g_hInst; - -static JXInputManager* pJXInputManager = NULL; -static JXInput* apJXInput[ MAX_JXINPUTS ]; -static HWND hWndJava; - -// -// IDs of the static Java arrays. -// -static jfieldID sAxesFieldID; -static jfieldID sButtonsFieldID; -static jfieldID sDirectionsFieldID; - - - -/** - * Remove all resources allocated by the Java binding. - */ -void shutdownJavaResources() -{ - if ( NULL != pJXInputManager ) - delete pJXInputManager; - - if ( NULL != hWndJava ) - DestroyWindow( hWndJava ); - - pJXInputManager = NULL; - - for( int i = 0; i < MAX_JXINPUTS; ++i ) - apJXInput[ i ] = NULL; - - hWndJava = NULL; -} - - - -JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) -{ - return JNI_VERSION_1_2; -} - - -JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved) -{ - shutdownJavaResources(); -} - - -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_nativeinit - (JNIEnv * penv, jclass pClazz ) -{ - - // - // Create a non-visible window as 'owner' of the DI device. - // - hWndJava = CreateWindowEx( - 0/*WS_EX_APPWINDOW*/, // DWORD dwExStyle, // extended window style - "STATIC", // LPCTSTR lpClassName, // pointer to registered class name - NULL, // LPCTSTR lpWindowName, // pointer to window name - 0/*WS_CAPTION*/, // DWORD dwStyle, // window style - 0, // int x, // horizontal position of window - 0, // int y, // vertical position of window - 0, // int nWidth, // window width - 0, // int nHeight, // window height - NULL, // HWND hWndParent, // handle to parent or owner window - NULL, // HMENU hMenu, // handle to menu, or child-window identifier - g_hInst, // HINSTANCE hInstance, // handle to application instance - NULL // LPVOID lpParam // pointer to window-creation data - ); - - - if ( NULL == pJXInputManager ) - { - pJXInputManager = new JXInputManager( hWndJava ); - - for( int i = 0; i < MAX_JXINPUTS; ++i ) - apJXInput[ i ] = NULL; - - for ( int i = 0; i < pJXInputManager->getNumberOfJXInputs(); ++i ) - { - apJXInput[ i ] = & pJXInputManager->getJXInput( i ); - } - } - - return true; -} - - - -JNIEXPORT void JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_nativeexit - (JNIEnv *, jclass ) -{ - shutdownJavaResources(); -} - - -/** - * Bind my field IDs to the Java variables. - */ -JNIEXPORT void JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_bind - (JNIEnv * penv, jclass pClazz) -{ - // - // All fields are static. - // - sAxesFieldID = penv->GetStaticFieldID( pClazz, "sAxisValues", "[[D" ); - sButtonsFieldID = penv->GetStaticFieldID( pClazz, "sButtonStates", "[[Z" ); - sDirectionsFieldID = penv->GetStaticFieldID( pClazz, "sDirectionalValues", "[[I" ); -} - - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfDevices - (JNIEnv *penv, jclass) -{ - return pJXInputManager->getNumberOfJXInputs(); -} - - -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getName - (JNIEnv *penv, jclass, jint dev) -{ - return penv->NewStringUTF( apJXInput[ dev ]->getName() ); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfAxes - (JNIEnv *, jclass, jint dev) -{ - return apJXInput[ dev ]->getNumberOfAxes(); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfButtons - (JNIEnv *, jclass, jint dev) -{ - return apJXInput[ dev ]->getNumberOfButtons(); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfDirectionals - (JNIEnv *, jclass, jint dev) -{ - return apJXInput[ dev ]->getNumberOfDirectionals(); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getMaxNumberOfAxes - (JNIEnv *, jclass) -{ - return pJXInputManager->getMaxNumberOfAxes(); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getMaxNumberOfButtons - (JNIEnv *, jclass) -{ - return pJXInputManager->getMaxNumberOfButtons(); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getMaxNumberOfDirectionals - (JNIEnv *, jclass) -{ - return pJXInputManager->getMaxNumberOfDirectionals(); -} - -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_isAxisAvailable - (JNIEnv *, jclass, jint dev, jint idx ) -{ - return apJXInput[ dev ]->isAxisAvailable( idx ); -} - -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getAxisName - (JNIEnv *penv, jclass, jint dev, jint idx ) -{ - return penv->NewStringUTF( apJXInput[ dev ]->getAxisName( idx ) ); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getAxisType - (JNIEnv *, jclass, jint dev, jint idx ) -{ - return apJXInput[ dev ]->getAxisType( idx ); -} - - -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_isButtonAvailable - (JNIEnv *, jclass, jint dev, jint idx ) -{ - return apJXInput[ dev ]->isButtonAvailable( idx ); -} - -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getButtonName - (JNIEnv *penv, jclass, jint dev, jint idx ) -{ - return penv->NewStringUTF( apJXInput[ dev ]->getButtonName( idx ) ); -} - -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getButtonType - (JNIEnv *, jclass, jint dev, jint idx ) -{ - return apJXInput[ dev ]->getButtonType( idx ); -} - -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_isDirectionalAvailable - (JNIEnv *, jclass, jint dev, jint idx ) -{ - return apJXInput[ dev ]->isDirectionalAvailable( idx ); -} - -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getDirectionalName - (JNIEnv *penv, jclass, jint dev, jint idx ) -{ - return penv->NewStringUTF( apJXInput[ dev ]->getDirectionalName( idx ) ); -} - - - -/** - * The main update method. - * Here, the actual work is done. - */ -JNIEXPORT void JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_nativeupdate - (JNIEnv * penv, jclass pClazz ) -{ - - static jdouble axes [ MAX_JXINPUTS ][ JXINPUT_MAX_AXES ]; - static jboolean buttons [ MAX_JXINPUTS ][ JXINPUT_MAX_BUTTONS ]; - static jint directions [ MAX_JXINPUTS ][ JXINPUT_MAX_DIRECTIONALS ]; - - static jobjectArray axisarrayarray; - static jobjectArray buttonarrayarray; - static jobjectArray directionarrayarray; - - static jdoubleArray axisarray; - static jbooleanArray buttonarray; - static jintArray directionarray; - - axisarrayarray = (jobjectArray)penv->GetStaticObjectField( pClazz, sAxesFieldID ); - buttonarrayarray = (jobjectArray)penv->GetStaticObjectField( pClazz, sButtonsFieldID ); - directionarrayarray = (jobjectArray)penv->GetStaticObjectField( pClazz, sDirectionsFieldID ); - - // - // For each device.... - // - for ( int dev = 0; dev < pJXInputManager->getNumberOfJXInputs(); ++dev ) - { - // Do the update of the device. - apJXInput[ dev ]->update(); - - // - // Copy all values into my arrays. - // - for ( int i = 0; i < JXINPUT_MAX_AXES; ++i ) - axes[ dev ][ i ] = apJXInput[ dev ]->getAxisValue( i ); - for ( int i = 0; i < JXINPUT_MAX_BUTTONS; ++i ) - buttons[ dev ][ i ] = apJXInput[ dev ]->isButtonDown( i ); - for ( int i = 0; i < JXINPUT_MAX_DIRECTIONALS; ++i ) - directions[ dev ][ i ] = apJXInput[ dev ]->getDirection( i ); - - - // - // Move my arrays to the Java arrays. - // - axisarray = (jdoubleArray)penv->GetObjectArrayElement( axisarrayarray, dev ); - penv->SetDoubleArrayRegion( axisarray, 0, JXINPUT_MAX_AXES, axes[ dev ] ); - - buttonarray = (jbooleanArray)penv->GetObjectArrayElement( buttonarrayarray, dev ); - penv->SetBooleanArrayRegion( buttonarray, 0, JXINPUT_MAX_BUTTONS, buttons[ dev ] ); - - directionarray = (jintArray)penv->GetObjectArrayElement( directionarrayarray, dev ); - penv->SetIntArrayRegion( directionarray, 0, JXINPUT_MAX_DIRECTIONALS, directions[ dev ] ); - } - -} - diff --git a/vendor/JXInput/0.3.4/c/de_hardcode_jxinput_directinput_DirectInputDriver.h b/vendor/JXInput/0.3.4/c/de_hardcode_jxinput_directinput_DirectInputDriver.h deleted file mode 100644 index bb93548..0000000 --- a/vendor/JXInput/0.3.4/c/de_hardcode_jxinput_directinput_DirectInputDriver.h +++ /dev/null @@ -1,183 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include - -/* Header for class de_hardcode_jxinput_directinput_DirectInputDriver */ - -#ifndef _Included_de_hardcode_jxinput_directinput_DirectInputDriver -#define _Included_de_hardcode_jxinput_directinput_DirectInputDriver - -#ifdef __cplusplus -extern "C" { -#endif - -/* Inaccessible static: sIsOperational */ -/* Inaccessible static: sAxisValues */ -/* Inaccessible static: sButtonStates */ -/* Inaccessible static: sDirectionalValues */ -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: nativeinit - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_nativeinit - (JNIEnv *, jclass); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: nativeexit - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_nativeexit - (JNIEnv *, jclass); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: bind - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_bind - (JNIEnv *, jclass); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getNumberOfDevices - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfDevices - (JNIEnv *, jclass); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getName - * Signature: (I)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getName - (JNIEnv *, jclass, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getNumberOfAxes - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfAxes - - (JNIEnv *, jclass, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getNumberOfButtons - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfButtons - (JNIEnv *, jclass, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getNumberOfDirectionals - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getNumberOfDirectionals - (JNIEnv *, jclass, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getMaxNumberOfAxes - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getMaxNumberOfAxes - (JNIEnv *, jclass); - - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getMaxNumberOfButtons - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getMaxNumberOfButtons - (JNIEnv *, jclass); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getMaxNumberOfDirectionals - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getMaxNumberOfDirectionals - (JNIEnv *, jclass); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: isAxisAvailable - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_isAxisAvailable - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getAxisName - * Signature: (II)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getAxisName - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getAxisType - * Signature: (II)I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getAxisType - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: isButtonAvailable - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_isButtonAvailable - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getButtonName - * Signature: (II)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getButtonName - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getButtonType - * Signature: (II)I - */ -JNIEXPORT jint JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getButtonType - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: isDirectionalAvailable - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_isDirectionalAvailable - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: getDirectionalName - * Signature: (II)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_getDirectionalName - (JNIEnv *, jclass, jint, jint); - -/* - * Class: de_hardcode_jxinput_directinput_DirectInputDriver - * Method: nativeupdate - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_de_hardcode_jxinput_directinput_DirectInputDriver_nativeupdate - (JNIEnv *, jclass); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vendor/JXInput/0.3.4/c/dllmain.cpp b/vendor/JXInput/0.3.4/c/dllmain.cpp deleted file mode 100644 index 567e8d4..0000000 --- a/vendor/JXInput/0.3.4/c/dllmain.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "stdafx.h" - -HINSTANCE g_hInst; - - -BOOL APIENTRY DllMain( HANDLE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - g_hInst = (HINSTANCE)hModule; - break; - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; - case DLL_PROCESS_DETACH: - g_hInst = NULL; - break; - } - return TRUE; -} diff --git a/vendor/JXInput/0.3.4/c/jxinput.cpp b/vendor/JXInput/0.3.4/c/jxinput.cpp deleted file mode 100644 index 890805b..0000000 --- a/vendor/JXInput/0.3.4/c/jxinput.cpp +++ /dev/null @@ -1,600 +0,0 @@ -// -// jxinput.cpp -// -#include "stdafx.h" -#include "jxinput.h" - - -// -// Globals -// -extern HINSTANCE g_hInst; - - -/** - * Ctor: Connect with DI - */ -JXInput::JXInput( LPDIRECTINPUTDEVICE8 pJoystick, HWND hWnd ) : - mpJoystick( pJoystick ), - mSliderCount( 0 ), - mPOVCount( 0 ), - mButtonCount( 0 ) -{ - initAxisConfig(); - initButtonsConfig(); - initDirectionalsConfig(); - - if ( FAILED( InitDirectInput( hWnd ) ) ) - { - FreeDirectInput(); - } -} - - - -/** - * Destructor: - * Free DirectInput. - */ -JXInput::~JXInput() -{ - FreeDirectInput(); -} - - -void JXInput::update() -{ - UpdateInputState(); -} - - -TCHAR * const JXInput::getName() const -{ - return (TCHAR*)mdiDevInfo.tszInstanceName; -} - - - -int JXInput::getNumberOfAxes() const -{ - return mdiDevCaps.dwAxes; -} - -int JXInput::getNumberOfButtons() const -{ - return mButtonCount; -} - -int JXInput::getNumberOfDirectionals() const -{ - return mPOVCount; -} - - -double JXInput::getAxisValueHelper( LONG val, int idx ) const -{ - const AxisConfig& cfg = mAxisConfig[ idx ]; - - double span = (double)( cfg.mMaxValue - cfg.mMinValue ); - double ret = (double)(val - cfg.mMinValue) / span; - - if ( TYPE_SLIDER != cfg.mType ) - return ret*2.0 - 1.0; - return ret; -} - -double JXInput::getX() const -{ - return getAxisValueHelper( mJS.lX, ID_X ); -} -double JXInput::getY() const -{ - return getAxisValueHelper( mJS.lY, ID_Y ); -} -double JXInput::getZ() const -{ - return getAxisValueHelper( mJS.lZ, ID_Z ); -} -double JXInput::getRotX() const -{ - return getAxisValueHelper( mJS.lRx, ID_ROTX ); -} -double JXInput::getRotY() const -{ - return getAxisValueHelper( mJS.lRy, ID_ROTY ); -} -double JXInput::getRotZ() const -{ - return getAxisValueHelper( mJS.lRz, ID_ROTZ ); -} -double JXInput::getSlider0() const -{ - return getAxisValueHelper( mJS.rglSlider[ 0 ], ID_SLIDER0 ); -} -double JXInput::getSlider1() const -{ - return getAxisValueHelper( mJS.rglSlider[ 1 ], ID_SLIDER1 ); -} - - - -bool JXInput::isAxisAvailable( int idx ) const -{ - assert( idx < JXINPUT_MAX_AXES ); - return mAxisConfig[ idx ].mIsAvailable; -} - -TCHAR * const JXInput::getAxisName( int idx ) const -{ - assert( idx < JXINPUT_MAX_AXES ); - return (char*const)mAxisConfig[ idx ].mName; -} - -int JXInput::getAxisType( int idx ) const -{ - assert( idx < JXINPUT_MAX_AXES ); - return mAxisConfig[ idx ].mType; -} - -double JXInput::getAxisValue( int idx ) const -{ - assert( idx < JXINPUT_MAX_AXES ); - - // Failsafe if called accidentally - if ( ! mAxisConfig[ idx ].mIsAvailable ) - return 0.0; - - return (this->*mAxisConfig[ idx ].mGetValueMethod)(); -} - - - - - -bool JXInput::isButtonAvailable( int idx ) const -{ - assert( idx < JXINPUT_MAX_BUTTONS ); - return mButtonConfig[ idx ].mIsAvailable; -} - -TCHAR * const JXInput::getButtonName( int idx ) const -{ - assert( idx < JXINPUT_MAX_BUTTONS ); - return (char*const)mButtonConfig[ idx ].mName; -} - -int JXInput::getButtonType( int idx ) const -{ - assert( idx < JXINPUT_MAX_BUTTONS ); - return mButtonConfig[ idx ].mType; -} - -bool JXInput::isButtonDown( int idx ) const -{ - assert( idx < JXINPUT_MAX_BUTTONS ); - return 0 != mJS.rgbButtons[ idx ] ; -} - - -bool JXInput::isDirectionalAvailable( int idx ) const -{ - assert( idx < JXINPUT_MAX_DIRECTIONALS ); - return mDirectionalConfig[ idx ].mIsAvailable; -} - -TCHAR * const JXInput::getDirectionalName( int idx ) const -{ - assert( idx < JXINPUT_MAX_DIRECTIONALS ); - return (char*const)mDirectionalConfig[ idx ].mName; -} - -int JXInput::getDirection( int idx ) const -{ - assert( idx < JXINPUT_MAX_DIRECTIONALS ); - return mJS.rgdwPOV[ idx ] ; -} - - -/** - * Initialize axis configuration array. - */ -void JXInput::initAxisConfig() -{ - mAxisConfig[ ID_X ].mIsAvailable = false; - mAxisConfig[ ID_X ].mType = TYPE_TRANSLATION; - mAxisConfig[ ID_X ].mGetValueMethod = &JXInput::getX; - - mAxisConfig[ ID_Y ].mIsAvailable = false; - mAxisConfig[ ID_Y ].mType = TYPE_TRANSLATION; - mAxisConfig[ ID_Y ].mGetValueMethod = &JXInput::getY; - - mAxisConfig[ ID_Z ].mIsAvailable = false; - mAxisConfig[ ID_Z ].mType = TYPE_TRANSLATION; - mAxisConfig[ ID_Z ].mGetValueMethod = &JXInput::getZ; - - mAxisConfig[ ID_ROTX ].mIsAvailable = false; - mAxisConfig[ ID_ROTX ].mType = TYPE_ROTATION; - mAxisConfig[ ID_ROTX ].mGetValueMethod = &JXInput::getRotX; - - mAxisConfig[ ID_ROTY ].mIsAvailable = false; - mAxisConfig[ ID_ROTY ].mType = TYPE_ROTATION; - mAxisConfig[ ID_ROTY ].mGetValueMethod = &JXInput::getRotY; - - mAxisConfig[ ID_ROTZ ].mIsAvailable = false; - mAxisConfig[ ID_ROTZ ].mType = TYPE_ROTATION; - mAxisConfig[ ID_ROTZ ].mGetValueMethod = &JXInput::getRotZ; - - mAxisConfig[ ID_SLIDER0 ].mIsAvailable = false; - mAxisConfig[ ID_SLIDER0 ].mType = TYPE_SLIDER; - mAxisConfig[ ID_SLIDER0 ].mGetValueMethod = &JXInput::getSlider0; - - mAxisConfig[ ID_SLIDER1 ].mIsAvailable = false; - mAxisConfig[ ID_SLIDER1 ].mType = TYPE_SLIDER; - mAxisConfig[ ID_SLIDER1 ].mGetValueMethod = &JXInput::getSlider1; -} - - -/** - * Initialize buttons configuration array. - */ -void JXInput::initButtonsConfig() -{ - for ( int i = 0; i < JXINPUT_MAX_BUTTONS; ++i ) - { - mButtonConfig[ i ].mIsAvailable = false; - mButtonConfig[ i ].mName[ 0 ] = '\0'; - mButtonConfig[ i ].mType = TYPE_PUSHBUTTON; - } - -} - - -/** - * Initialize directionals configuration array. - */ -void JXInput::initDirectionalsConfig() -{ - for ( int i = 0; i < JXINPUT_MAX_DIRECTIONALS; ++i ) - { - mDirectionalConfig[ i ].mIsAvailable = false; - mDirectionalConfig[ i ].mName[ 0 ] = '\0'; - } - -} - - - -//----------------------------------------------------------------------------- -// Name: EnumAxesCallback() -// Desc: Callback function for enumerating the axes on a joystick -//----------------------------------------------------------------------------- -BOOL CALLBACK JXInput::EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext ) -{ - JXInput* pThis = (JXInput*)pContext; - - AxisConfig* pAxCfg = NULL; - - // Set the UI to reflect what objects the joystick supports - // Code derived from M$ samples, really sucks, eh? - if (pdidoi->guidType == GUID_XAxis) - { - pAxCfg = & pThis->mAxisConfig[ ID_X ]; - } - if (pdidoi->guidType == GUID_YAxis) - { - pAxCfg = & pThis->mAxisConfig[ ID_Y ]; - } - if (pdidoi->guidType == GUID_ZAxis) - { - pAxCfg = & pThis->mAxisConfig[ ID_Z ]; - } - if (pdidoi->guidType == GUID_RxAxis) - { - pAxCfg = & pThis->mAxisConfig[ ID_ROTX ]; - } - if (pdidoi->guidType == GUID_RyAxis) - { - pAxCfg = & pThis->mAxisConfig[ ID_ROTY ]; - } - if (pdidoi->guidType == GUID_RzAxis) - { - pAxCfg = & pThis->mAxisConfig[ ID_ROTZ ]; - } - if (pdidoi->guidType == GUID_Slider) - { - switch( pThis->mSliderCount++ ) - { - case 0 : - pAxCfg = & pThis->mAxisConfig[ ID_SLIDER0 ]; - break; - - case 1 : - pAxCfg = & pThis->mAxisConfig[ ID_SLIDER1 ]; - break; - } - } - - // fail-safe - if( NULL == pAxCfg ) // e.g. GUID_Unknown - return DIENUM_CONTINUE; - - - // - // Perform config. - // - - DIPROPRANGE diprg; - diprg.diph.dwSize = sizeof(DIPROPRANGE); - diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER); - diprg.diph.dwHow = DIPH_BYID; - diprg.diph.dwObj = pdidoi->dwType; // Specify the enumerated axis - - // Get the range for the axis - if( FAILED( pThis->mpJoystick->GetProperty( DIPROP_RANGE, &diprg.diph ) ) ) - return DIENUM_CONTINUE; - - pAxCfg->mMinValue = diprg.lMin; - pAxCfg->mMaxValue = diprg.lMax; - - strcpy( (char*)pAxCfg->mName, (char*)pdidoi->tszName ); - pAxCfg->mIsAvailable = true; - - return DIENUM_CONTINUE; -} - - - -//----------------------------------------------------------------------------- -// Name: EnumButtonsCallback() -// Desc: Callback function for enumerating the axes on a joystick -//----------------------------------------------------------------------------- -BOOL CALLBACK JXInput::EnumButtonsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext ) -{ - JXInput* pThis = (JXInput*)pContext; - - // - // if the maximum number of buttons is already registered, - // issue a warning and stop enumeration. - // - if( JXINPUT_MAX_BUTTONS == pThis->mButtonCount ) - { - OutputDebugString( "Max. number of buttons exceeded!" ); - return DIENUM_STOP; - } - - - ButtonConfig* pBtCfg = NULL; - - if ( pdidoi->guidType == GUID_Button ) - { - assert( JXINPUT_MAX_BUTTONS > pThis->mButtonCount ); - pBtCfg = & pThis->mButtonConfig[ pThis->mButtonCount++ ]; - } - - - // fail-safe - if( NULL == pBtCfg ) // e.g. unknown stuff - return DIENUM_CONTINUE; - assert( NULL != pBtCfg ); - - // - // Perform config. - // - - strcpy( (char*)pBtCfg->mName, (char*)pdidoi->tszName ); - pBtCfg->mIsAvailable = true; - - return DIENUM_CONTINUE; -} - - -//----------------------------------------------------------------------------- -// Name: EnumPOVsCallback() -// Desc: Callback function for enumerating the axes on a joystick -//----------------------------------------------------------------------------- -BOOL CALLBACK JXInput::EnumPOVsCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext ) -{ - JXInput* pThis = (JXInput*)pContext; - - // - // if the maximum number of buttons is already registered, - // issue a warning and stop enumeration. - // - if( JXINPUT_MAX_DIRECTIONALS == pThis->mPOVCount ) - { - OutputDebugString( "Max. number of POVs exceeded!" ); - return DIENUM_STOP; - } - - DirectionalConfig* pDirCfg = NULL; - - - if (pdidoi->guidType == GUID_POV) - { - assert( JXINPUT_MAX_DIRECTIONALS > pThis->mPOVCount ); - pDirCfg = & pThis->mDirectionalConfig[ pThis->mPOVCount++ ]; - } - - // fail-safe - if( NULL == pDirCfg ) // e.g. unknown stuff - return DIENUM_CONTINUE; - assert( NULL != pDirCfg ); - - // - // Perform config. - // - - strcpy( (char*)pDirCfg->mName, (char*)pdidoi->tszName ); - pDirCfg->mIsAvailable = true; - - return DIENUM_CONTINUE; -} - - - -//----------------------------------------------------------------------------- -// Name: EnumEffectsCallback() -// Desc: Callback function for enumerating the effects of a joystick -//----------------------------------------------------------------------------- -BOOL CALLBACK JXInput::EnumEffectsCallback( const DIEFFECTINFO* pdidoi, - VOID* pContext ) -{ - JXInput* pThis = (JXInput*)pContext; - - // - // Work on that!! - // - - return DIENUM_CONTINUE; -} - - - -//----------------------------------------------------------------------------- -// Name: InitDirectInput() -// Desc: Initialize the DirectInput variables. -//----------------------------------------------------------------------------- -HRESULT JXInput::InitDirectInput( HWND hWnd ) -{ - HRESULT hr; - - // Make sure we got a joystick - if( NULL == mpJoystick ) - { - return E_FAIL; - } - - - // - // Ask the device for some useful information. - // - mdiDevInfo.dwSize = sizeof( DIDEVICEINSTANCE ); - hr = mpJoystick->GetDeviceInfo( &mdiDevInfo ); - if( FAILED(hr) ) - return hr; - - // Set the data format to "simple joystick" - a predefined data format - // - // A data format specifies which controls on a device we are interested in, - // and how they should be reported. This tells DInput that we will be - // passing a DIJOYSTATE structure to IDirectInputDevice::GetDeviceState(). - hr = mpJoystick->SetDataFormat( &c_dfDIJoystick2 ); - if( FAILED(hr) ) - return hr; - - // Set the cooperative level to let DInput know how this device should - // interact with the system and with other DInput applications. -// hr = g_pJoystick->SetCooperativeLevel( hDlg, DISCL_EXCLUSIVE|DISCL_FOREGROUND ); - DWORD mode = ( NULL == hWnd ? DISCL_NONEXCLUSIVE|DISCL_BACKGROUND : DISCL_EXCLUSIVE|DISCL_BACKGROUND ); - hr = mpJoystick->SetCooperativeLevel( hWnd, mode ); - if( FAILED(hr) ) - return hr; - - // Determine how many axis the joystick has (so we don't error out setting - // properties for unavailable axis) - mdiDevCaps.dwSize = sizeof(DIDEVCAPS); - hr = mpJoystick->GetCapabilities(&mdiDevCaps); - if ( FAILED(hr) ) - return hr; - - - // Enumerate the axes of the joyctick and set the range of each axis. Note: - // we could just use the defaults, but we're just trying to show an example - // of enumerating device objects (axes, buttons, etc.). - mpJoystick->EnumObjects( EnumAxesCallback, (VOID*)this, DIDFT_AXIS ); - mpJoystick->EnumObjects( EnumButtonsCallback, (VOID*)this, DIDFT_BUTTON ); - mpJoystick->EnumObjects( EnumPOVsCallback, (VOID*)this, DIDFT_POV ); - - mpJoystick->EnumEffects( EnumEffectsCallback, (VOID*)this, DIEFT_ALL ); - - // For FF sticks, switch on autocenter as long as we do not use real FF - SwitchAutoCenter( true ); - - return S_OK; -} - - - - - -//----------------------------------------------------------------------------- -// Name: UpdateInputState() -// Desc: Get the input device's state and display it. -//----------------------------------------------------------------------------- -HRESULT JXInput::UpdateInputState() -{ - HRESULT hr; - - if( mpJoystick ) - { - - // Poll the device to read the current state - hr = mpJoystick->Poll(); - if( FAILED(hr) ) - { - // DInput is telling us that the input stream has been - // interrupted. We aren't tracking any state between polls, so - // we don't have any special reset that needs to be done. We - // just re-acquire and try again. - hr = mpJoystick->Acquire(); - while( hr == DIERR_INPUTLOST ) - hr = mpJoystick->Acquire(); - - // hr may be DIERR_OTHERAPPHASPRIO or other errors. This - // may occur when the app is minimized or in the process of - // switching, so just try again later - return S_OK; - } - - // Get the input's device state - if( FAILED( hr = mpJoystick->GetDeviceState( sizeof(DIJOYSTATE2), &mJS ) ) ) - return hr; // The device should have been acquired during the Poll() - - } - - return S_OK; -} - - - - -//----------------------------------------------------------------------------- -// Name: FreeDirectInput() -// Desc: Initialize the DirectInput variables. -//----------------------------------------------------------------------------- -HRESULT JXInput::FreeDirectInput() -{ - // Unacquire and release any DirectInputDevice objects. - if( NULL != mpJoystick ) - { - // Unacquire the device one last time just in case - // the app tried to exit while the device is still acquired. - mpJoystick->Unacquire(); - - mpJoystick->Release(); - mpJoystick = NULL; - } - - return S_OK; -} - - - -HRESULT JXInput::SwitchAutoCenter( bool onoff ) -{ - HRESULT hr; - - DIPROPDWORD DIPropAutoCenter; - - DIPropAutoCenter.diph.dwSize = sizeof(DIPropAutoCenter); - DIPropAutoCenter.diph.dwHeaderSize = sizeof(DIPROPHEADER); - DIPropAutoCenter.diph.dwObj = 0; - DIPropAutoCenter.diph.dwHow = DIPH_DEVICE; - DIPropAutoCenter.dwData = ( onoff ? DIPROPAUTOCENTER_ON : DIPROPAUTOCENTER_OFF ); - - hr = mpJoystick->SetProperty( DIPROP_AUTOCENTER, &DIPropAutoCenter.diph ); - return hr; -} diff --git a/vendor/JXInput/0.3.4/c/jxinput.dsp b/vendor/JXInput/0.3.4/c/jxinput.dsp deleted file mode 100644 index aac15c1..0000000 --- a/vendor/JXInput/0.3.4/c/jxinput.dsp +++ /dev/null @@ -1,175 +0,0 @@ -# Microsoft Developer Studio Project File - Name="jxinput" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=jxinput - Win32 Debug -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "jxinput.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "jxinput.mak" CFG="jxinput - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "jxinput - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "jxinput - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "jxinput - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JXINPUT_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "C:\j2sdk1.4.2\include" /I "C:\j2sdk1.4.2\include\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JXINPUT_EXPORTS" /FR /Yu"stdafx.h" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 dxguid.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\build\jxinput.dll" - -!ELSEIF "$(CFG)" == "jxinput - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JXINPUT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "C:\j2sdk1.4.2\include" /I "C:\j2sdk1.4.2\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JXINPUT_EXPORTS" /FR /Yu"stdafx.h" /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 dxguid.lib dinput8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\Classes\jxinput.dll" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "jxinput - Win32 Release" -# Name "jxinput - Win32 Debug" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\de_hardcode_jxinput_directinput_DirectInputDriver.cpp -# End Source File -# Begin Source File - -SOURCE=.\dllmain.cpp -# End Source File -# Begin Source File - -SOURCE=.\jxinput.cpp -# End Source File -# Begin Source File - -SOURCE=.\JXInputManager.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\de_hardcode_jxinput_directinput_DirectInputDriver.h - -!IF "$(CFG)" == "jxinput - Win32 Release" - -# PROP Ignore_Default_Tool 1 -USERDEP__DE_HA="..\classes\de\hardcode\jxinput\directinput\DirectInputDriver.class" -# Begin Custom Build -InputPath=.\de_hardcode_jxinput_directinput_DirectInputDriver.h - -"de_hardcode_jxinput_directinput_DirectInputDriver.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - cd ..\Classes - C:\j2sdk1.4.2\bin\javah -classpath . -d ..\win32 de.hardcode.jxinput.directinput.DirectInputDriver - cd ..\win32 - -# End Custom Build - -!ELSEIF "$(CFG)" == "jxinput - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__DE_HA="..\classes\de\hardcode\jxinput\directinput\DirectInputDriver.class" -# Begin Custom Build -InputPath=.\de_hardcode_jxinput_directinput_DirectInputDriver.h - -"de_hardcode_jxinput_directinput_DirectInputDriver.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - cd ..\Classes - C:\j2sdk1.4.2\bin\javah -classpath . -d ..\win32 de.hardcode.jxinput.directinput.DirectInputDriver - cd ..\win32 - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\jxinput.h -# End Source File -# Begin Source File - -SOURCE=.\JXInputManager.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\ReadMe.txt -# End Source File -# End Target -# End Project diff --git a/vendor/JXInput/0.3.4/c/jxinput.dsw b/vendor/JXInput/0.3.4/c/jxinput.dsw deleted file mode 100644 index deb2877..0000000 --- a/vendor/JXInput/0.3.4/c/jxinput.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! - -############################################################################### - -Project: "jxinput"=".\jxinput.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/vendor/JXInput/0.3.4/c/jxinput.h b/vendor/JXInput/0.3.4/c/jxinput.h deleted file mode 100644 index 6d47a31..0000000 --- a/vendor/JXInput/0.3.4/c/jxinput.h +++ /dev/null @@ -1,183 +0,0 @@ - -#define JXINPUT_MAX_AXES 8 -#define JXINPUT_MAX_BUTTONS 256 -#define JXINPUT_MAX_DIRECTIONALS 4 - - -/** - * This class will be exported by jxinput.dll. - */ -class JXINPUT_API JXInput -{ - -public: - - typedef enum AXISTYPE - { - TYPE_TRANSLATION, - TYPE_ROTATION, - TYPE_SLIDER - }; - - typedef enum BUTTONTYPE - { - TYPE_PUSHBUTTON, - TYPE_TOGGLEBUTTON - }; - - typedef enum AXISID - { - ID_X, ID_Y, ID_Z, - ID_ROTX, ID_ROTY, ID_ROTZ, - ID_SLIDER0, ID_SLIDER1 - }; - - - // - // Ctor - // - JXInput( LPDIRECTINPUTDEVICE8 pJoystick, HWND hWnd = NULL ); - - // - // Dtor - // - virtual ~JXInput(); - - // - // Operational methods - // - void update(); - - // Ask for the name - TCHAR * const getName() const; - - // - // Numbering methods - // - int getNumberOfAxes() const; - int getNumberOfButtons() const; - int getNumberOfDirectionals() const; - - - // - // Access axes - // - double getX() const; /** -1.0 .... 1.0 */ - double getY() const; /** -1.0 .... 1.0 */ - double getZ() const; /** -1.0 .... 1.0 */ - double getRotX() const; /** -1.0 .... 1.0 */ - double getRotY() const; /** -1.0 .... 1.0 */ - double getRotZ() const; /** -1.0 .... 1.0 */ - double getSlider0() const; /** 0.0 .... 1.0 */ - double getSlider1() const; /** 0.0 .... 1.0 */ - - - // - // Axis methods - // - bool isAxisAvailable( int idx ) const; - TCHAR* const getAxisName( int idx ) const; - int getAxisType( int idx ) const; - double getAxisValue( int idx ) const; - - // - // Button methods - // - bool isButtonAvailable( int idx ) const; - TCHAR* const getButtonName( int idx ) const; - int getButtonType( int idx ) const; - bool isButtonDown( int idx ) const; - - // - // Directional methods - // - bool isDirectionalAvailable( int idx ) const; - TCHAR* const getDirectionalName( int idx ) const; - int getDirection( int idx ) const; - -private://----------------------------------------------------------------------------------------- - LPDIRECTINPUTDEVICE8 mpJoystick; - - DIDEVICEINSTANCE mdiDevInfo; - DIDEVCAPS mdiDevCaps; - DIJOYSTATE2 mJS; // DInput joystick state - - int mSliderCount; - int mPOVCount; - int mButtonCount; - - double getAxisValueHelper( LONG val, int idx ) const; - - HRESULT SwitchAutoCenter( bool onoff = true ); - - HRESULT InitDirectInput( HWND hWnd = NULL ); - HRESULT FreeDirectInput(); - HRESULT UpdateInputState(); - - - static BOOL CALLBACK EnumAxesCallback - ( - const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext - ); - - static BOOL CALLBACK EnumButtonsCallback - ( - const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext - ); - - static BOOL CALLBACK EnumPOVsCallback - ( - const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext - ); - - static BOOL CALLBACK EnumEffectsCallback - ( - const DIEFFECTINFO* pdidoi, - VOID* pContext - ); - - - class JXINPUT_API AxisConfig - { - - public: - bool mIsAvailable; - CHAR mName[MAX_PATH]; - AXISTYPE mType; - LONG mMinValue; - LONG mMaxValue; - double (JXInput::*mGetValueMethod)() const; - - } mAxisConfig [ JXINPUT_MAX_AXES ]; - - void initAxisConfig(); - - - class JXINPUT_API ButtonConfig - { - - public: - bool mIsAvailable; - CHAR mName[MAX_PATH]; - BUTTONTYPE mType; - - } mButtonConfig[ JXINPUT_MAX_BUTTONS ]; - - void initButtonsConfig(); - - - class JXINPUT_API DirectionalConfig - { - - public: - bool mIsAvailable; - CHAR mName[MAX_PATH]; - - } mDirectionalConfig[ JXINPUT_MAX_DIRECTIONALS ]; - - void initDirectionalsConfig(); -}; - diff --git a/vendor/JXInput/0.3.4/c/jxinput.sln b/vendor/JXInput/0.3.4/c/jxinput.sln deleted file mode 100644 index 714fdc7..0000000 --- a/vendor/JXInput/0.3.4/c/jxinput.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jxinput", "jxinput.vcproj", "{8AEA84DC-D8F0-4425-BEBF-A84E91115F76}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8AEA84DC-D8F0-4425-BEBF-A84E91115F76}.Debug|Win32.ActiveCfg = Debug|Win32 - {8AEA84DC-D8F0-4425-BEBF-A84E91115F76}.Debug|Win32.Build.0 = Debug|Win32 - {8AEA84DC-D8F0-4425-BEBF-A84E91115F76}.Release|Win32.ActiveCfg = Release|Win32 - {8AEA84DC-D8F0-4425-BEBF-A84E91115F76}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/vendor/JXInput/0.3.4/c/jxinput.vcproj b/vendor/JXInput/0.3.4/c/jxinput.vcproj deleted file mode 100644 index c87fc0f..0000000 --- a/vendor/JXInput/0.3.4/c/jxinput.vcproj +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Axis.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Axis.java deleted file mode 100644 index 9f1d710..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Axis.java +++ /dev/null @@ -1,72 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 19. Dezember 2001, 21:58 -//********************************************************************************************** -package de.hardcode.jxinput; - -/** - * The Axis interface describes the most common feature of a joystick or other input devices. - * - * @author Herkules - */ -public interface Axis extends Feature -{ - // Enumeration of axes. - final static int ID_X = 0; - final static int ID_Y = 1; - final static int ID_Z = 2; - final static int ID_ROTX = 3; - final static int ID_ROTY = 4; - final static int ID_ROTZ = 5; - final static int ID_SLIDER0 = 6; - final static int ID_SLIDER1 = 7; - final static int NUMBER_OF_ID = 8; - - // Enumeration of axis types - final static int TRANSLATION = 0; - final static int ROTATION = 1; - final static int SLIDER = 2; - - /** - * Retrieve the type of the axis. - * The type is describes the meaning and the range of values of the axis. - *

- * TRANSLATION typed axes denote a translational deviation from a center - * position. This can be e.g. the common, basic joystick axes. - * The range of getValue() is [-1.0,1.0]. - *

- * ROTATION typed axes denote a rotational deviation from a center - * position. Something on the stick is turned or twisted. - * The range of getValue() is [-1.0,1.0]. - *

- * SLIDER typed axes denote a shifting device without a center position. - * A good sample is a throttle control. - * The range of getValue() is [0.0,1.0]. - * - * @return [ TRANSLATION | ROTATION | SLIDER ] - */ - int getType(); - - /** - * Returns the current value of the axis. - * The range of the result depends on the axis type. - * - * @return value [-1.0,1.0] or [0.0,1.0] - */ - double getValue(); - - - /** - * Inform about the resolution of the axis. - * - * @return resolution, e.g. 2^-16 - */ - double getResolution(); - -} - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Button.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Button.java deleted file mode 100644 index 418e2b6..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Button.java +++ /dev/null @@ -1,35 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 19. Dezember 2001, 21:58 -//********************************************************************************************** -package de.hardcode.jxinput; - -/** - * - * @author Herkules - */ -public interface Button extends Feature -{ - // Enumeration of button types - final static int PUSHBUTTON = 0; - final static int TOGGLEBUTTON = 1; - - /** - * Retrieve the type of the button. - * Pushbutton will deliver true==getState() as long as they are pressed down. - * Togglebuttons will change their state once they are pressed and keep that state - * until they are pressed again. - * @return [ PUSHBUTTON | TOGGLEBUTTON ] - */ - int getType(); - - /** - * Tells the state of the button at last update. - */ - boolean getState(); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Directional.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Directional.java deleted file mode 100644 index ccd27c1..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Directional.java +++ /dev/null @@ -1,45 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 27. Dezember 2001, 23:33 -//********************************************************************************************** -package de.hardcode.jxinput; - -/** - * - * @author Herkules - */ -public interface Directional extends Feature -{ - /** - * If the Directional has a center position where it points to no direction, this - * flag is true when this position is reached. - */ - boolean isCentered(); - - /** - * Retrieve the direction pointed to. - * Value is given in 1/100 degree, [0,36000] - */ - int getDirection(); - - /** - * Retrieve the analog value pointing to the angle described by - * getDirection(). - * For coolie hats this will be either 1,0 for any direction or 0.0 - * when isCentered()==true. - */ - double getValue(); - - /** - * Inform about the resolution of the value returned by getValue(). - * - * @return resolution, e.g. 1.0 for coolie hats - */ - double getResolution(); - -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Feature.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Feature.java deleted file mode 100644 index 20c396f..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/Feature.java +++ /dev/null @@ -1,38 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 27. Dezember 2001, 00:19 -//********************************************************************************************** -package de.hardcode.jxinput; - -/** - * An input device offers a set of features (otherwise it would be pretty useless). - * Features in this sense can be axes, buttons and a feature callede directional here. - * Coolie hats are typical directionals because they control a direction (to look at e.g.). - *

- * There are no concrete classes directly derived from Feature - it only - * provides a basis for other interfaces. - * - * @see Axis - * @see Button - * @see Directional - * - * @author Herkules - */ -public abstract interface Feature -{ - /** - * Features may have a name provided e.g. by the driver. - */ - String getName(); - - /** - * Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - boolean hasChanged(); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/JXInputDevice.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/JXInputDevice.java deleted file mode 100644 index d8a8bc8..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/JXInputDevice.java +++ /dev/null @@ -1,71 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 19. Dezember 2001, 21:47 -//********************************************************************************************** -package de.hardcode.jxinput; - -/** - * The JXInputDevise is the main entrypoint to the jxinput package. - *

- * A JXInputDevice represents one physical device like a joystick, a gamepad or - * even some emulation (e.g. using keyboard) that implements the interface. - *

- * The basis task of a JXInputDevise is to maintain a consistent state of all its features. - *
- * It is save to distribute the Feature objects into application without worrying - * about someone else performing an update method and thereby destructing the consistent state. - *

- * An additional task is to provide basic device features information like number of axes, buttons - * and directional features. - * - * @see Feature - * @see JXInputManager - * - * @author Herkules - * @version 0.2beta - */ -public interface JXInputDevice -{ - /** - * @directed - */ - /*#Features lnkFeatures;*/ - - /** - *@link aggregationByValue - */ - /*#Feature lnkFeature;*/ - - /** - * Devices may have a name. - * This name might be provided by a system dependant driver. - */ - String getName(); - - /** Actual number of available axes. */ - int getNumberOfAxes(); - - /** Actual number of available buttons. */ - int getNumberOfButtons(); - - /** Actual number of available directional features. */ - int getNumberOfDirectionals(); - - /** Maximum number of axes as an upper bound for index values. */ - int getMaxNumberOfAxes(); - - /** Maximum number of buttons as an upper bound for index values. */ - int getMaxNumberOfButtons(); - - /** Maximum number of directional features as an upper bound for index values. */ - int getMaxNumberOfDirectionals(); - - Axis getAxis( int idx ); - Button getButton( int idx ); - Directional getDirectional( int idx ); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/JXInputManager.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/JXInputManager.java deleted file mode 100644 index 8c3e050..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/JXInputManager.java +++ /dev/null @@ -1,233 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 29. Dezember 2001, 02:17 -//********************************************************************************************** -package de.hardcode.jxinput; - -// -// Import driver stuff -// -import de.hardcode.jxinput.directinput.DirectInputDevice; -import de.hardcode.jxinput.event.JXInputEventManager; -import de.hardcode.jxinput.keyboard.JXKeyboardInputDevice; -import de.hardcode.jxinput.virtual.JXVirtualInputDevice; - - -import java.util.ArrayList; -import java.util.Iterator; -import java.awt.Component; - - -/** - * Manages the available instances of JXInputDevice. - * It holds the one central update method which synchronizes with the physical device. - * @author Herkules - */ -public class JXInputManager -{ - - /** Remember when the last update took place. */ - private static long mTimeOfLastUpdate; - - /** Maintain a list of devices. */ - private final static ArrayList mDevices = new ArrayList(); - - /** Maintain a list of direct input devices. */ - private final static ArrayList mDIDevices = new ArrayList(); - - /** Maintain a list of virtual devices. */ - private final static ArrayList mVirtualDevices = new ArrayList(); - - /** Maintain a list of keyboard devices. */ - private final static ArrayList mKBDevices = new ArrayList(); - - /** - * Statically retrieve all DirectInputDevices available. - */ - static - { - reset(); - } - - - /** - * @directed - */ - /*#JXInputDevice lnkJXInputDevice;*/ - - /** - * Creates a new instance of JXInputManager. - * This is prohibited - it only has static members. - */ - private JXInputManager() - { - } - - - /** - * Retrieve the number of available input devices. - */ - public static int getNumberOfDevices() - { - return mDevices.size(); - } - - /** - * Delivers the JXInputDevice with the desired index. - *

- * Take care that idx < getNumberOfDevices()! - */ - public static JXInputDevice getJXInputDevice( int idx ) - { - // - // Be well-behaved even if idx is out of range. - // - if ( idx >= mDevices.size() ) - return null; - return (JXInputDevice)mDevices.get( idx ); - } - - - /** - * Master reset for all devices and events. - * After calling reset(), better forget all devices created or retrieved. - * They are no longer valid. - * Event listeners will no longer be called and should be discarded. - */ - synchronized public static void reset() - { - JXInputEventManager.reset(); - - mDevices.clear(); - - mVirtualDevices.clear(); - mDIDevices.clear(); - - DirectInputDevice.reset(); - - for ( int i = 0; i < DirectInputDevice.getNumberOfDevices(); ++i ) - { - DirectInputDevice dev = new DirectInputDevice( i ); - mDevices.add( dev ); - mDIDevices.add( dev ); - } - - // I have to call updateFeatures one time here during initialization - // bc. I experienced difficulties otherwise while running with the - // J3D sensoring stuff! -// updateFeatures(); - DirectInputDevice.update(); - - int n = mKBDevices.size(); - for ( int i = 0; i < n; ++i ) - ((JXKeyboardInputDevice)mKBDevices.get( i )).shutdown(); - mKBDevices.clear(); - } - - - /** - * Update the (shared) state of all features in one step. - * This method asks the actual device for a consistant state. - * After calling this method, all features may have new values. - * updateFeatures() is meant to be called e.g. once per frame in a gaming environment. - */ - public static void updateFeatures() - { - // Get timing - long now = System.currentTimeMillis(); - long deltaT = now - mTimeOfLastUpdate; - - // Update available driver - DirectInputDevice.update(); - - // - // Update the virtual devices. - // - Iterator vdevices = mVirtualDevices.iterator(); - while ( vdevices.hasNext() ) - { - ((JXVirtualInputDevice)vdevices.next()).update( deltaT ); - } - - // Remember time - mTimeOfLastUpdate = now; - - // Fire all events. - JXInputEventManager.trigger(); - } - - - - /** - * Get time when last update occurred. - * @return tickervalue in milliseconds - */ - public static long getLastUpdateTime() - { - return mTimeOfLastUpdate; - } - - - /** - * Create a new pseudo-device. - */ - public static JXKeyboardInputDevice createKeyboardDevice() - { - JXKeyboardInputDevice d = new JXKeyboardInputDevice(); - mDevices.add( d ); - mKBDevices.add( d ); - return d; - } - - - /** - * Create a new pseudo-device listening to a Swing component. - * Make sure that the component also has the keyboard focus!! - */ - public static JXKeyboardInputDevice createKeyboardDevice( Component comp ) - { - JXKeyboardInputDevice d = new JXKeyboardInputDevice( comp ); - mDevices.add( d ); - mKBDevices.add( d ); - return d; - } - - - /** - * Delete a keyboard device again e.g. when the corresponding - * JComponent gets deleted. - */ - public static void deleteKeyboardDevice( JXKeyboardInputDevice dev ) - { - mDevices.remove( dev ); - mKBDevices.remove( dev ); - ((JXKeyboardInputDevice)dev).shutdown(); - } - - - /** - * Create a new pseudo-device. - */ - public static JXVirtualInputDevice createVirtualDevice() - { - JXVirtualInputDevice d = new JXVirtualInputDevice(); - mDevices.add( d ); - mVirtualDevices.add( d ); - return d; - } - - - /** - * Delete a virtual device again. - */ - public static void deleteVirtualDevice( JXVirtualInputDevice dev ) - { - mDevices.remove( dev ); - mVirtualDevices.remove( dev ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIAxis.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIAxis.java deleted file mode 100644 index a6d0eac..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIAxis.java +++ /dev/null @@ -1,70 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 27. Dezember 2001, 00:14 -//********************************************************************************************** -package de.hardcode.jxinput.directinput; - -import de.hardcode.jxinput.Axis; - -/** - * - * @author Herkules - */ -class DIAxis implements Axis -{ - private final int mDeviceIdx; - private final int mIdx; - - /** - * Creates a new instance of DIAxis. - */ - DIAxis( int devidx, int idx ) - { - mDeviceIdx = devidx; - mIdx = idx; - } - - public String getName() - { - return DirectInputDriver.getAxisName( mDeviceIdx, mIdx ); - } - - - /** - * Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - public boolean hasChanged() - { - return true; - } - - public double getValue() - { - return DirectInputDriver.getAxisValue( mDeviceIdx, mIdx ); - } - - public int getType() - { - return DirectInputDriver.getAxisType( mDeviceIdx, mIdx ); - } - - /** - * Inform about the resolution of the axis. - * - * @return resolution, e.g. 2^-16 - */ - public double getResolution() - { - // extend the driver here!! - // Here I assume typical 16 bit resolution - return ( getType() == Axis.SLIDER ? 1.0/65536.0 : 2.0/65536.0 ) ; - } - -} - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIButton.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIButton.java deleted file mode 100644 index 5419550..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIButton.java +++ /dev/null @@ -1,55 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 27. Dezember 2001, 00:14 -//********************************************************************************************** -package de.hardcode.jxinput.directinput; - -import de.hardcode.jxinput.Button; - - -/** - * - * @author Herkules - */ -class DIButton implements Button -{ - private final int mDeviceIdx; - private final int mIdx; - - /** - * Creates a new instance of DIButton. - */ - DIButton( int devidx, int idx ) - { - mDeviceIdx = devidx; - mIdx = idx; - } - - public String getName() - { - return DirectInputDriver.getButtonName( mDeviceIdx, mIdx ); - } - - /** - * Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - public boolean hasChanged() - { - return true; - } - - public int getType() - { - return DirectInputDriver.getButtonType( mDeviceIdx, mIdx ); - } - - public boolean getState() - { - return DirectInputDriver.getButtonState( mDeviceIdx, mIdx ); - } -} \ No newline at end of file diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIDirectional.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIDirectional.java deleted file mode 100644 index 9da2d3d..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DIDirectional.java +++ /dev/null @@ -1,78 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 27. Dezember 2001, 23:40 -//********************************************************************************************** -package de.hardcode.jxinput.directinput; - -import de.hardcode.jxinput.Directional; - -/** - * - * @author Herkules - */ -class DIDirectional implements Directional -{ - private final int mDeviceIdx; - private final int mIdx; - - /** - * Creates a new instance of DIDirectional. - */ - DIDirectional( int devidx, int idx ) - { - mDeviceIdx = devidx; - mIdx = idx; - } - - /** Features may have a name provided e.g. by the driver. */ - public String getName() - { - return DirectInputDriver.getDirectionalName( mDeviceIdx, mIdx ); - } - - /** - * Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - public boolean hasChanged() - { - return true; - } - - - public boolean isCentered() - { - return ( 0xffff == (DirectInputDriver.getDirection( mDeviceIdx, mIdx ) & 0xffff) ); - } - - public int getDirection() - { - return isCentered() ? 0 : DirectInputDriver.getDirection( mDeviceIdx, mIdx ); - } - - public double getValue() - { - if ( isCentered() ) - return 0.0; - return 1.0; - } - - /** - * Inform about the resolution of the value returned by getValue(). - * - * @return resolution, e.g. 1.0 for coolie hats - */ - public double getResolution() - { - // DI POV always return 0.0 or 1.0, so the resolution is 1.0. - return 1.0; - } - - -} - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DirectInputDevice.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DirectInputDevice.java deleted file mode 100644 index a20eab3..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DirectInputDevice.java +++ /dev/null @@ -1,170 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 26. Dezember 2001, 00:40 -//********************************************************************************************** -package de.hardcode.jxinput.directinput; - -import de.hardcode.jxinput.JXInputDevice; -import de.hardcode.jxinput.Axis; -import de.hardcode.jxinput.Directional; -import de.hardcode.jxinput.Button; - -/** - * - * @author Herkules - */ -public class DirectInputDevice implements JXInputDevice -{ - int mDeviceIdx; - - private DIAxis[] mAxes; - private DIButton[] mButtons; - private DIDirectional[] mDirectionals; - - /** - * The number of DirectInput devices available with the driver. - */ - public static int getNumberOfDevices() - { - if ( DirectInputDriver.isAvailable() ) - return DirectInputDriver.getNumberOfDevices(); - return 0; - } - - - /** - * Update the state of all devices. - */ - public static void update() - { - if ( DirectInputDriver.isAvailable() ) - DirectInputDriver.nativeupdate(); - } - - - - - /** - * Creates a new instance of DirectInputDevice. - */ - public DirectInputDevice( int devidx ) - { - mDeviceIdx = devidx; - - init(); - } - - /** - * Reset the DirectInput connection. - */ - public static void reset() - { - if ( DirectInputDriver.isAvailable() ) - DirectInputDriver.reset(); - } - - - /** - * Initialisation of fields. - */ - private final void init() - { - // - // Allocate arrays for max. number of features - // - mAxes = new DIAxis [ getMaxNumberOfAxes() ]; - mButtons = new DIButton [ getMaxNumberOfButtons() ]; - mDirectionals = new DIDirectional [ getMaxNumberOfDirectionals() ]; - - // - // Fill arrays due to the state of the driver. - // - for ( int i = 0; i < mAxes.length; ++i ) - { - if ( DirectInputDriver.isAxisAvailable( mDeviceIdx, i ) ) - mAxes[ i ] = new DIAxis( mDeviceIdx, i ); - } - - for ( int i = 0; i < mButtons.length; ++i ) - { - if ( DirectInputDriver.isButtonAvailable( mDeviceIdx, i ) ) - mButtons[ i ] = new DIButton( mDeviceIdx, i ); - } - - for ( int i = 0; i < mDirectionals.length; ++i ) - { - if ( DirectInputDriver.isDirectionalAvailable( mDeviceIdx, i ) ) - mDirectionals[ i ] = new DIDirectional( mDeviceIdx, i ); - } - } - - /** Devices may have a name. */ - public String getName() - { - String name = DirectInputDriver.getName( mDeviceIdx ); - if ( null == name ) - return "Win32 DirectInput Joystick"; - return name; - } - - - /** Actual number of available buttons. */ - public int getNumberOfButtons() - { - return DirectInputDriver.getNumberOfButtons( mDeviceIdx ); - } - - /** Actual number of available axes. */ - public int getNumberOfAxes() - { - return DirectInputDriver.getNumberOfAxes( mDeviceIdx ); - } - - /** Actual number of available directional features. */ - public int getNumberOfDirectionals() - { - return DirectInputDriver.getNumberOfDirectionals( mDeviceIdx ); - } - - /** Maximum number of buttons as an upper bound for index values. */ - public int getMaxNumberOfButtons() - { - return DirectInputDriver.getMaxNumberOfButtons(); - } - - /** Maximum number of axes as an upper bound for index values. */ - public int getMaxNumberOfAxes() - { - return DirectInputDriver.getMaxNumberOfAxes(); - } - - /** Maximum number of available directional features. */ - public int getMaxNumberOfDirectionals() - { - return DirectInputDriver.getMaxNumberOfDirectionals(); - } - - - public Axis getAxis(int idx) - { - return mAxes[ idx ]; - } - - public Button getButton(int idx) - { - return mButtons[ idx ]; - } - - public Directional getDirectional(int idx) - { - return mDirectionals[ idx ]; - } - -} - - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DirectInputDriver.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DirectInputDriver.java deleted file mode 100644 index 558f7d8..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/DirectInputDriver.java +++ /dev/null @@ -1,184 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 19. Dezember 2001, 22:44 -//********************************************************************************************** -package de.hardcode.jxinput.directinput; - -import java.lang.reflect.Array; - -/** - * DirectInputDriver: the connection to the Win32 joystick. - * There is only one allowed, so the layout of this class is merely static. - * - * History: - * - * Changes since 0.1beta: - * - support of multiple devices addressed by the dev index - * - * - * @author Herkules - * @version 0.2beta - */ -class DirectInputDriver -{ - private final static String NATIVE_LIB_NAME = "jxinput"; - - /** Remember wether nativeinit() succeeded. */ - static boolean sIsOperational = false; - - // - // Static arrays to hold the values. - // - private static double [][] sAxisValues; - private static boolean [][] sButtonStates; - private static int [][] sDirectionalValues; - - /** - * Perform the static initialization. - */ - static - { - try - { - // Load the native lib. - System.loadLibrary( NATIVE_LIB_NAME ); - - init(); - } - catch( SecurityException e ) - { - Log.logger.warning("Native library jxinput not loaded due to a SecurityException."); - } - catch( UnsatisfiedLinkError e ) - { - Log.logger.info("Native library jxinput not loaded due to an UnsatisfiedLinkError."); - } - } - - - private final static void init() - { - sIsOperational = false; - // - // Initialize it. - // - if ( nativeinit() ) - { - int devs = getNumberOfDevices(); - sAxisValues = new double [ devs ][ DirectInputDriver.getMaxNumberOfAxes() ]; - sButtonStates = new boolean [ devs ][ DirectInputDriver.getMaxNumberOfButtons() ]; - sDirectionalValues = new int [ devs ][ DirectInputDriver.getMaxNumberOfDirectionals() ]; - - // Bind the native lib to my variables. - bind(); - - // Remember I am fine. - sIsOperational = true; - } - - } - - - /** - * Static ctor of DirectInputDriver. - * No object will be created due to the static layout. - */ - private DirectInputDriver() - { - } - - // Administration - private static native boolean nativeinit(); - private static native void nativeexit(); - private static native void bind(); - - static native int getNumberOfDevices(); - - // Configuration - static native String getName( int dev ); - static native int getNumberOfAxes( int dev ); - static native int getNumberOfButtons( int dev ); - static native int getNumberOfDirectionals( int dev ); - static native int getMaxNumberOfAxes(); - static native int getMaxNumberOfButtons(); - static native int getMaxNumberOfDirectionals(); - - static native boolean isAxisAvailable( int dev, int idx ); - static native String getAxisName( int dev, int idx ); - static native int getAxisType( int dev, int idx ); - - static native boolean isButtonAvailable( int dev, int idx ); - static native String getButtonName( int dev, int idx ); - static native int getButtonType( int dev, int idx ); - - static native boolean isDirectionalAvailable( int dev, int idx ); - static native String getDirectionalName( int dev, int idx ); - - // Operation - static native void nativeupdate(); - - - public static boolean isAvailable() - { - return sIsOperational; - } - - - /** - * Shutdown the device and free all Win32 resources. - * It is not a good idea to access any joystick features after - * shutdown(). - */ - static void shutdown() - { - nativeexit(); - sAxisValues = null; - sButtonStates = null; - sDirectionalValues = null; - } - - - /** - * Reset the device and free all Win32 resources. - */ - static void reset() - { - shutdown(); - init(); - } - - static double getAxisValue( int dev, int idx ) - { - return sAxisValues[ dev ][ idx ]; - } - - static boolean getButtonState( int dev, int idx ) - { - return sButtonStates[ dev ][ idx ]; - } - - static int getDirection( int dev, int idx ) - { - return sDirectionalValues[ dev ][ idx ]; - } - - /** - * @param args the command line arguments - */ - public static void main (String args[]) - { - - if ( ! sIsOperational ) - return; - - for( int i = 0; i < 5000; ++i ) - nativeupdate(); - - shutdown(); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/Log.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/Log.java deleted file mode 100644 index 95e586c..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/directinput/Log.java +++ /dev/null @@ -1,34 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 29. Oktober 2002, 22:57 -//********************************************************************************************** -package de.hardcode.jxinput.directinput; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author Herkules - */ -public class Log -{ - public final static Logger logger = Logger.getLogger( Log.class.getPackage().getName() ); - -// static -// { -// logger.setLevel( Level.ALL ); -// } - - /** - * Creates a new instance of Log. - */ - private Log() - { - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputAxisEvent.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputAxisEvent.java deleted file mode 100644 index c353b5e..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputAxisEvent.java +++ /dev/null @@ -1,48 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:33 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -import de.hardcode.jxinput.JXInputDevice; -import de.hardcode.jxinput.Axis; - -/** - * Represents an event coming from an axis. - * @author Joerg Plewe - */ -public class JXInputAxisEvent -{ - private final Axis mAxis; - double mDelta; - - /** - * Creates a new instance of JXInputEvent. - */ - JXInputAxisEvent( Axis axis ) - { - mAxis = axis; - } - - /** - * The feature that caused the event. - */ - public final Axis getAxis() - { - return mAxis; - } - - - /** - * Return the change in value that caused the event. - */ - public double getDelta() - { - return mDelta; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputAxisEventListener.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputAxisEventListener.java deleted file mode 100644 index d8adf46..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputAxisEventListener.java +++ /dev/null @@ -1,19 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:54 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -/** - * - * @author Herkules - */ -public interface JXInputAxisEventListener -{ - void changed( JXInputAxisEvent ev ); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputButtonEvent.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputButtonEvent.java deleted file mode 100644 index d82d0b9..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputButtonEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:33 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -import de.hardcode.jxinput.JXInputDevice; -import de.hardcode.jxinput.Button; - -/** - * Represents event coming from a button. - * @author Joerg Plewe - */ -public class JXInputButtonEvent -{ - final Button mButton; - - /** - * Creates a new instance of JXInputEvent. - */ - JXInputButtonEvent( Button button ) - { - mButton = button; - } - - /** - * The feature that caused the event. - */ - public final Button getButton() - { - return mButton; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputButtonEventListener.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputButtonEventListener.java deleted file mode 100644 index afdc323..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputButtonEventListener.java +++ /dev/null @@ -1,19 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:54 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -/** - * - * @author Herkules - */ -public interface JXInputButtonEventListener -{ - void changed( JXInputButtonEvent ev ); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputDirectionalEvent.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputDirectionalEvent.java deleted file mode 100644 index 70e6bcd..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputDirectionalEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:33 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -import de.hardcode.jxinput.JXInputDevice; -import de.hardcode.jxinput.Directional; - -/** - * Represents an event coming from an axis. - * @author Joerg Plewe - */ -public class JXInputDirectionalEvent -{ - private final Directional mDirectional; - double mValueDelta; - int mDirectionDelta; - - /** - * Creates a new instance of JXInputEvent. - */ - JXInputDirectionalEvent( Directional directional ) - { - mDirectional = directional; - } - - /** - * The feature that caused the event. - */ - public final Directional getDirectional() - { - return mDirectional; - } - - /** - * Return the change in value that caused the event. - */ - public double getValueDelta() - { - return mValueDelta; - } - - /** - * Return the change in direction that caused the event. - */ - public int getDirectionDelta() - { - return mDirectionDelta; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputDirectionalEventListener.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputDirectionalEventListener.java deleted file mode 100644 index 65c7efa..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputDirectionalEventListener.java +++ /dev/null @@ -1,19 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:54 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -/** - * - * @author Herkules - */ -public interface JXInputDirectionalEventListener -{ - void changed( JXInputDirectionalEvent ev ); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputEventManager.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputEventManager.java deleted file mode 100644 index aa196d7..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/event/JXInputEventManager.java +++ /dev/null @@ -1,284 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 31. Januar 2002, 23:42 -//********************************************************************************************** -package de.hardcode.jxinput.event; - -import de.hardcode.jxinput.JXInputManager; -import de.hardcode.jxinput.JXInputDevice; - -import java.util.ArrayList; -import de.hardcode.jxinput.Axis; -import java.util.Iterator; -import de.hardcode.jxinput.Button; -import de.hardcode.jxinput.Directional; - -/** - * Handles all events and listeners. - * JXInputEventManager is layed out a static singleton. - * @author Herkules - */ -public class JXInputEventManager -{ - - private final static ArrayList mAxisEventListeners = new ArrayList(); - private final static ArrayList mButtonEventListeners = new ArrayList(); - private final static ArrayList mDirectionalEventListeners = new ArrayList(); - - private static autotrigger mAutoTrigger = null; - - /** - * Inner class combining a listener with its scheduling parameters. - */ - private static class axislistener - { - final JXInputAxisEventListener mListener; - final double mTreshold; - final JXInputAxisEvent mEvent; - double mLastValueFired = 0.0; - - axislistener( JXInputAxisEventListener l, Axis axis, double treshold ) - { - mListener = l; - mTreshold = treshold; - mEvent = new JXInputAxisEvent( axis ); - } - - final void checkTrigger() - { - double curval = mEvent.getAxis().getValue(); - double delta = curval - mLastValueFired; - - if ( Math.abs( delta ) >= mTreshold ) - { - mLastValueFired = curval; - mEvent.mDelta = delta; - mListener.changed( mEvent ); - } - } - } - - /** - * Inner class combining a listener with its scheduling parameters. - */ - private static class buttonlistener - { - final JXInputButtonEventListener mListener; - final JXInputButtonEvent mEvent; - boolean mLastValueFired = false; - - buttonlistener( JXInputButtonEventListener l, Button button ) - { - mListener = l; - mEvent = new JXInputButtonEvent( button ); - } - - final void checkTrigger() - { - boolean curstate = mEvent.getButton().getState(); - if ( curstate != mLastValueFired ) - { - mLastValueFired = curstate; - mListener.changed( mEvent ); - } - } - } - - - private static class directionallistener - { - final JXInputDirectionalEventListener mListener; - final double mValueTreshold; - final JXInputDirectionalEvent mEvent; - double mLastValueFired = 0.0; - boolean mLastCenteredFired = true; - int mLastDirectionFired = 0; - - directionallistener( JXInputDirectionalEventListener l, Directional directional, double valuetreshold ) - { - mListener = l; - mValueTreshold = valuetreshold; - mEvent = new JXInputDirectionalEvent( directional ); - } - - final void checkTrigger() - { - double curval = mEvent.getDirectional().getValue(); - int curdir = mEvent.getDirectional().getDirection(); - boolean curctr = mEvent.getDirectional().isCentered(); - - double delta = curval - mLastValueFired; - int dirdelta = curdir - mLastDirectionFired; - boolean centeredchanged = mLastCenteredFired != curctr; - - if ( Math.abs( delta ) >= mValueTreshold - || Math.abs( dirdelta ) > 0 - || centeredchanged ) - { - mLastValueFired = curval; - mLastDirectionFired = curdir; - mLastCenteredFired = curctr; - - mEvent.mValueDelta = delta; - mEvent.mDirectionDelta = dirdelta; - mListener.changed( mEvent ); - } - } - } - - /** - * Creates a new instance of JXInputEventManager. - */ - private JXInputEventManager() - { - } - - - /** - * Remove all listeners at once. - */ - public static void reset() - { - mAxisEventListeners.clear(); - mButtonEventListeners.clear(); - mDirectionalEventListeners.clear(); - } - - - /** - * Query devices and fire all occuring events. - * trigger() is thought to be called by JXInputManager#updateFeatures(). - */ - public static void trigger() - { - int n = mAxisEventListeners.size(); - for ( int i = 0; i < n; i++ ) - { - axislistener l = (axislistener)mAxisEventListeners.get( i ); - l.checkTrigger(); - } - - n = mButtonEventListeners.size(); - for ( int i = 0; i < n; i++ ) - { - buttonlistener l = (buttonlistener)mButtonEventListeners.get( i ); - l.checkTrigger(); - } - - n = mDirectionalEventListeners.size(); - for ( int i = 0; i < n; i++ ) - { - directionallistener l = (directionallistener)mDirectionalEventListeners.get( i ); - l.checkTrigger(); - } - } - - - private final static class autotrigger extends Thread - { - boolean mFinish = false; - final int mDelay; - - autotrigger( int delay ) - { - mDelay = delay; - } - - public void run() - { - while ( ! mFinish ) - { - try - { - Thread.sleep( mDelay ); - JXInputManager.updateFeatures(); - } - catch ( InterruptedException ex ) - { - } - } - } - } - - - /** - * Set the intervall in ms that is used to check for new values of the features. - * Set it to <= 0 to prohibit automatic triggering. Events will then only be fired - * when somebody invokes JXInputManager#updateFeatures(). - */ - public static void setTriggerIntervall( int ms ) - { - // - // Kill current thread, if any - // - if ( null != mAutoTrigger ) - { - mAutoTrigger.mFinish = true; - try - { - mAutoTrigger.join(); - } - catch ( InterruptedException ex ) - { - } - } - - mAutoTrigger = null; - - if ( ms > 0 ) - { - mAutoTrigger = new autotrigger( ms ); - mAutoTrigger.start(); - } - - } - - - - - public static void addListener( JXInputAxisEventListener l, Axis axis, double treshold ) - { - mAxisEventListeners.add( new JXInputEventManager.axislistener( l, axis, treshold ) ); - } - - public static void addListener( JXInputAxisEventListener l, Axis axis ) - { - mAxisEventListeners.add( new JXInputEventManager.axislistener( l, axis, axis.getResolution() ) ); - } - - public static void removeListener( JXInputAxisEventListener l ) - { - mAxisEventListeners.remove( l ); - } - - - public static void addListener( JXInputButtonEventListener l, Button button ) - { - mButtonEventListeners.add( new JXInputEventManager.buttonlistener( l, button ) ); - } - - public static void removeListener( JXInputButtonEventListener l ) - { - mButtonEventListeners.remove( l ); - } - - public static void addListener( JXInputDirectionalEventListener l, Directional directional, double valuetreshold ) - { - mDirectionalEventListeners.add( new JXInputEventManager.directionallistener( l, directional, valuetreshold ) ); - } - - public static void addListener( JXInputDirectionalEventListener l, Directional directional ) - { - mDirectionalEventListeners.add( new JXInputEventManager.directionallistener( l, directional, directional.getResolution() ) ); - } - - public static void removeListener( JXInputDirectionalEventListener l ) - { - mDirectionalEventListeners.remove( l ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/DeviceConfiguration.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/DeviceConfiguration.java deleted file mode 100644 index 8c1288a..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/DeviceConfiguration.java +++ /dev/null @@ -1,95 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 23. Februar 2002, 14:05 -//********************************************************************************************** -package de.hardcode.jxinput.j3d; - -import de.hardcode.jxinput.Axis; - - -/** - * Connects JXInput with J3DInputDevice. - * - * @author Herkules - */ -public class DeviceConfiguration -{ - public final static int AXIS_X = 0; - public final static int AXIS_Y = 1; - public final static int AXIS_Z = 2; - - private final static class axisvalue - { - private final Axis mAxis; - private final IsActiveCondition mIsActive; - private final IsActiveCondition mIsIncremental; - private final double mScale; - private final double mOffset; - private double mValue; - - axisvalue( Axis axis, IsActiveCondition active, IsActiveCondition incremental, double offset, double scale ) - { - mAxis = axis; - mIsActive = active; - mIsIncremental = incremental; - mValue = mOffset = offset; - mScale = scale; - } - - double value() - { - if ( mIsActive.isActive() ) - { - double newval = mAxis.getValue() * mScale; - - if ( mIsIncremental.isActive() ) - mValue += newval; - else - mValue = newval + mOffset; - } - return mValue; - } - } - - DeviceConfiguration.axisvalue [] mAxisTrans = new DeviceConfiguration.axisvalue[ 3 ]; - DeviceConfiguration.axisvalue [] mAxisRot = new DeviceConfiguration.axisvalue[ 3 ]; - - /** - * Creates a new instance of DeviceConfiguration. - */ - public DeviceConfiguration() - { - } - - - double getTranslational( int axisid ) - { - DeviceConfiguration.axisvalue val = mAxisTrans[ axisid ]; - return null == val ? 0.0 : val.value(); - } - - double getRotational( int axisid ) - { - DeviceConfiguration.axisvalue val = mAxisRot[ axisid ]; - return null == val ? 0.0 : val.value(); - } - - public void setTranslational( int axisid, Axis axis, IsActiveCondition active, IsActiveCondition incremental, double offset, double scale ) - { - if ( axisid < 0 || axisid > AXIS_Z ) - throw new IllegalArgumentException(); - mAxisTrans[ axisid ] = new DeviceConfiguration.axisvalue( axis, active, incremental, offset, scale ); - } - - public void setRotational( int axisid, Axis axis, IsActiveCondition active, IsActiveCondition incremental, double offset, double scale ) - { - if ( axisid < 0 || axisid > AXIS_Z ) - throw new IllegalArgumentException(); - mAxisRot[ axisid ] = new DeviceConfiguration.axisvalue( axis, active, incremental, offset, scale ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsActiveCondition.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsActiveCondition.java deleted file mode 100644 index af6ca08..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsActiveCondition.java +++ /dev/null @@ -1,25 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 25. Februar 2002, 22:41 -//********************************************************************************************** -package de.hardcode.jxinput.j3d; - -/** - * - * @author Herkules - */ -public interface IsActiveCondition -{ - public final static IsActiveCondition ALWAYS = IsAlwaysActiveCondition.ALWAYS; - public final static IsActiveCondition NEVER = IsAlwaysActiveCondition.NEVER; - - /** - * Tell wether a certain thing is active. - */ - boolean isActive(); -} - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsActiveOnButtonCondition.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsActiveOnButtonCondition.java deleted file mode 100644 index 98da7bb..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsActiveOnButtonCondition.java +++ /dev/null @@ -1,39 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 25. Februar 2002, 22:43 -//********************************************************************************************** -package de.hardcode.jxinput.j3d; - -import de.hardcode.jxinput.Button; - -/** - * - * @author Herkules - */ -public class IsActiveOnButtonCondition implements IsActiveCondition -{ - private final boolean mActiveState; - private final Button mButton; - - /** - * Creates a new instance of IsAlwayActiveCondition. - */ - public IsActiveOnButtonCondition( Button button, boolean activestate ) - { - mActiveState = activestate; - mButton = button; - } - - /** - * Tell wether a certain thing is active. - */ - public boolean isActive() - { - return mButton.getState() == mActiveState; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsAlwaysActiveCondition.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsAlwaysActiveCondition.java deleted file mode 100644 index cd8b1fe..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/IsAlwaysActiveCondition.java +++ /dev/null @@ -1,38 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 25. Februar 2002, 22:43 -//********************************************************************************************** -package de.hardcode.jxinput.j3d; - -/** - * - * @author Herkules - */ -final class IsAlwaysActiveCondition implements IsActiveCondition -{ - private final boolean mIsActive; - - public final static IsActiveCondition ALWAYS = new IsAlwaysActiveCondition( true ); - public final static IsActiveCondition NEVER = new IsAlwaysActiveCondition( false ); - - /** - * Creates a new instance of IsAlwayActiveCondition. - */ - private IsAlwaysActiveCondition(boolean isactive) - { - mIsActive = isactive; - } - - /** - * Tell wether a certain thing is active. - */ - public boolean isActive() - { - return mIsActive; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/J3DInputDevice.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/J3DInputDevice.java deleted file mode 100644 index f5b08f2..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/J3DInputDevice.java +++ /dev/null @@ -1,171 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 22. Februar 2002, 13:21 -//********************************************************************************************** -package de.hardcode.jxinput.j3d; - -import javax.media.j3d.InputDevice; -import javax.media.j3d.Sensor; -import javax.media.j3d.SensorRead; -import javax.vecmath.Vector3d; -import javax.media.j3d.Transform3D; -import de.hardcode.jxinput.JXInputManager; - - -/** - * Implementation of Java3D's InputDevice - * - * @author Herkules - */ -public class J3DInputDevice - implements InputDevice -{ - private Vector3d mPosition = new Vector3d(); - private Transform3D mNewTransform = new Transform3D(); - - private Transform3D mRotTransX = new Transform3D(); - private Transform3D mRotTransY = new Transform3D(); - private Transform3D mRotTransZ = new Transform3D(); - - private Vector3d mInitPos = new Vector3d( 0.0, 0.0, 0.0 ); - - private Sensor mSensor = new Sensor( this ); - private SensorRead mSensorRead = new SensorRead(); - - private DeviceConfiguration mConfig; - - /** - * Creates a new instance of J3DInputDevice. - */ - public J3DInputDevice( DeviceConfiguration config ) - { - mConfig = config; - setNominalPositionAndOrientation(); - } - - - public void close() - { - // Intentionally empty - } - - - /** - * Retrieve processing mode. - * For this device, it always is NON_BLOCKING. - */ - public int getProcessingMode() - { - return InputDevice.NON_BLOCKING; - } - - - /** - * Don't care for the index, I only support one sensor. - * And I deliver that. - */ - public Sensor getSensor( int param ) - { - return mSensor; - } - - - /** - * Tell the world about the only one sensor I support. - */ - public int getSensorCount() - { - return 1; - } - - - /** - * Well - initialize! - * Nothing to do here. - */ - public boolean initialize() - { - return true; - } - - - /** - * The main update method. - */ - public void pollAndProcessInput() - { - JXInputManager.updateFeatures(); - - mSensorRead.setTime( JXInputManager.getLastUpdateTime() ); - - mRotTransX.rotX( mConfig.getRotational( DeviceConfiguration.AXIS_X ) ); - mRotTransY.rotY( mConfig.getRotational( DeviceConfiguration.AXIS_Y ) ); - mRotTransZ.rotZ( mConfig.getRotational( DeviceConfiguration.AXIS_Z ) ); - - mPosition.set( - mConfig.getTranslational( DeviceConfiguration.AXIS_X ), - mConfig.getTranslational( DeviceConfiguration.AXIS_Y ), - mConfig.getTranslational( DeviceConfiguration.AXIS_Z ) - ); - - mNewTransform.set( mPosition ); - - mNewTransform.mul( mRotTransX ); - mNewTransform.mul( mRotTransY ); - mNewTransform.mul( mRotTransZ ); - - mSensorRead.set( mNewTransform ); - mSensor.setNextSensorRead( mSensorRead ); - } - - - /** - * Not called by current j3d implementation. - */ - public void processStreamInput() - { - // Intentionally empty - } - - - /** - * Reset state. - */ - public void setNominalPositionAndOrientation() - { - mSensorRead.setTime( JXInputManager.getLastUpdateTime() ); - - mRotTransX.rotX( 0.0 ); - mRotTransY.rotY( 0.0 ); - mRotTransZ.rotZ( 0.0 ); - - mPosition.set( mInitPos ); - - mNewTransform.set( mPosition ); - - mNewTransform.mul( mRotTransX ); - mNewTransform.mul( mRotTransY ); - mNewTransform.mul( mRotTransZ ); - - mSensorRead.set( mNewTransform ); - mSensor.setNextSensorRead( mSensorRead ); - - } - - - /** - * Set the processing mode. - * Only NON_BLOCKING is allowed! - */ - public void setProcessingMode(int param) - { - if ( param != InputDevice.NON_BLOCKING ) - throw new IllegalArgumentException("Processing mode must be NON_BLOCKING"); - - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/package.html b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/package.html deleted file mode 100644 index 9b92964..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/package.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -Connecting JXInput to Java3D by implementing the interface -javax.media.j3d.InputDevice. - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/test/HelloUniverse.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/test/HelloUniverse.java deleted file mode 100644 index fde34bc..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/test/HelloUniverse.java +++ /dev/null @@ -1,205 +0,0 @@ - -/* - * @(#)HelloUniverse.java 1.15 02/02/07 14:48:36 - * - * Copyright (c) 1996-2002 Sun Microsystems, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * Neither the name of Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES - * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN - * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR - * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR - * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF - * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, - * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that Software is not designed,licensed or intended - * for use in the design, construction, operation or maintenance of - * any nuclear facility. - */ - -package de.hardcode.jxinput.j3d.test; - - -import java.applet.Applet; -import java.awt.*; -import java.awt.event.*; -import com.sun.j3d.utils.applet.MainFrame; -import com.sun.j3d.utils.geometry.ColorCube; -import com.sun.j3d.utils.universe.*; -import javax.media.j3d.*; -import javax.vecmath.*; -import de.hardcode.jxinput.j3d.DeviceConfiguration; -import de.hardcode.jxinput.Axis; -import de.hardcode.jxinput.JXInputManager; -import de.hardcode.jxinput.j3d.IsActiveCondition; -import de.hardcode.jxinput.j3d.J3DInputDevice; -import de.hardcode.jxinput.j3d.IsActiveOnButtonCondition; - - -public class HelloUniverse extends Applet -{ - - private SimpleUniverse u = null; - TransformGroup objTrans; - - public BranchGroup createSceneGraph() - { - BranchGroup objRoot = new BranchGroup(); - objTrans = new TransformGroup(); - objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); - objRoot.addChild(objTrans); - objTrans.addChild(new ColorCube(0.4)); - -// Transform3D yAxis = new Transform3D(); -// Alpha rotationAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE, -// 0, 0, -// 4000, 0, 0, -// 0, 0, 0); -// RotationInterpolator rotator = new RotationInterpolator(rotationAlpha, objTrans, yAxis, -// 0.0f, (float) Math.PI*2.0f); -// BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0); -// rotator.setSchedulingBounds(bounds); -// objTrans.addChild(rotator); - return objRoot; - } - - - public HelloUniverse() - { - - } - - public void init() - { - // These are the string arguments given to the VirtualInputDevice - // constructor. These are settable parameters. Look in the - // VirtualInputDevice constructor for a complete list. - String[] args = new String[10]; - args[0] = "printvalues"; - args[1] = "true"; - args[2] = "yscreeninitloc"; - args[3] = "50"; - args[4] = null; - - - // now create the HelloUniverse Canvas - setLayout(new BorderLayout()); - GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration(); - - Canvas3D c = new Canvas3D(config); - add("Center", c); - - // Create a simple scene and attach it to the virtual universe - BranchGroup scene = createSceneGraph(); - u = new SimpleUniverse(c); - - // - // Use the inputdevice - // - InputDevice device = createInputDevice(); - - // Register the VirtualInputDevice with Java 3D - u.getViewer().getPhysicalEnvironment().addInputDevice( device ); - -// TransformGroup viewTrans = u.getViewingPlatform().getViewPlatformTransform(); - - // Put the behavoir to teh object - SensorBehavior s = new SensorBehavior( objTrans, device.getSensor(0) ); - s.setSchedulingBounds( new BoundingSphere( new Point3d(0.0,0.0,0.0), Float.MAX_VALUE ) ); - objTrans.addChild( s ); - - u.getViewingPlatform().setNominalViewingTransform(); - u.addBranchGraph(scene); - } - - public void destroy() - { - u.removeAllLocales(); - } - - - /** - * Setup an input device. - */ - private InputDevice createInputDevice() - { - IsActiveCondition button1down = new IsActiveOnButtonCondition(JXInputManager.getJXInputDevice( 0 ).getButton( 0 ), true ); - IsActiveCondition button1up = new IsActiveOnButtonCondition(JXInputManager.getJXInputDevice( 0 ).getButton( 0 ), false ); - - Axis xaxis = JXInputManager.getJXInputDevice( 0 ).getAxis( Axis.ID_X ); - Axis yaxis = JXInputManager.getJXInputDevice( 0 ).getAxis( Axis.ID_Y ); - - DeviceConfiguration cnf = new DeviceConfiguration(); - - // - // Setup the configuration to use joysticks x/y for rotation is not button is pressed - // and for translation if button1 is pressed. - // - cnf.setRotational( - DeviceConfiguration.AXIS_Y, - xaxis, - button1up, - IsActiveCondition.NEVER, - 0.0, Math.PI - ); - - cnf.setRotational( - DeviceConfiguration.AXIS_X, - yaxis, - button1up, - IsActiveCondition.NEVER, - 0.0, Math.PI - ); - - cnf.setTranslational( - DeviceConfiguration.AXIS_Z, - yaxis, - button1down, - IsActiveCondition.NEVER, - -5.0, 4.0 - ); - cnf.setTranslational( - DeviceConfiguration.AXIS_X, - xaxis, - button1down, - IsActiveCondition.NEVER, - 0.0, 4.0 - ); - - // We have the config, create the device... - J3DInputDevice d = new J3DInputDevice( cnf ); - - // The InputDevice must be initialized before registering it - // with the PhysicalEnvironment object. - d.initialize(); - - return d; - } - - - public static void main(String[] args) - { - new MainFrame(new HelloUniverse(), 350, 350); - } -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/test/SensorBehavior.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/test/SensorBehavior.java deleted file mode 100644 index 6836ebb..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/j3d/test/SensorBehavior.java +++ /dev/null @@ -1,70 +0,0 @@ -package de.hardcode.jxinput.j3d.test; - -/* - * @(#)SensorBehavior.java 1.8 02/02/07 14:48:34 - * - * Copyright (c) 1996-2002 Sun Microsystems, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * Neither the name of Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES - * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN - * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR - * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR - * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF - * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, - * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that Software is not designed,licensed or intended - * for use in the design, construction, operation or maintenance of - * any nuclear facility. - */ - -import javax.media.j3d.*; -import java.util.*; - -public class SensorBehavior extends Behavior -{ - private WakeupOnElapsedFrames conditions = new WakeupOnElapsedFrames(0); - private TransformGroup transformGroup; - private Sensor sensor; - private Transform3D transform = new Transform3D(); - - public SensorBehavior( TransformGroup tg, Sensor sensor ) - { - transformGroup = tg; - this.sensor = sensor; - } - - public void initialize() - { - wakeupOn( conditions ); - } - - public void processStimulus( Enumeration criteria ) - { - sensor.getRead( transform ); - transformGroup.setTransform( transform ); - wakeupOn( conditions ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/InvalidKeyCodeException.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/InvalidKeyCodeException.java deleted file mode 100644 index f44ee6b..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/InvalidKeyCodeException.java +++ /dev/null @@ -1,35 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 16. April 2002, 23:31 -//********************************************************************************************** -package de.hardcode.jxinput.keyboard; - -/** - * Exeception to be thrown if keycode is not in then range [0,255]. - * - * @author Herkules - */ -public class InvalidKeyCodeException - extends IllegalArgumentException -{ - - /** - * Creates a new instance of InvalidKeyCodeException. - */ - public InvalidKeyCodeException() - { - } - - - /** - * Creates a new instance of InvalidKeyCodeException. - */ - public InvalidKeyCodeException( String s ) - { - super( s ); - } -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/JXKeyboardInputDevice.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/JXKeyboardInputDevice.java deleted file mode 100644 index 858bdb7..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/JXKeyboardInputDevice.java +++ /dev/null @@ -1,175 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 9. April 2002, 22:40 -//********************************************************************************************** -package de.hardcode.jxinput.keyboard; - - -import de.hardcode.jxinput.*; -import java.awt.Component; - - -/** - * Virtual input device treating a AWT keyboard as a source for Buttons. - * - * @author Herkules - */ -public class JXKeyboardInputDevice - implements JXInputDevice -{ - private static final String DEVICENAME = "Swing Keyboard"; - - /** The driver doing all the real work. */ - private final KeyboardDriver mDriver = new KeyboardDriver(); - - /** The Component I am listening to. */ - private Component mComponent = null; - - /** Hold the biggest keycode for which a button has been created. */ - private int mMaxIdxCreated = 0; - - - /** - * Creates a new instance of JXKeyboardInputDevice. - */ - public JXKeyboardInputDevice() - { - } - - - /** - * Creates a new instance of JXKeyboardInputDevice - * immediately listening to a JComponent. - */ - public JXKeyboardInputDevice( Component comp ) - { - listenTo( comp ); - } - - /** - * Makes this device listen to a certain JComponent. - */ - public final void listenTo( Component comp ) - { - shutdown(); - mComponent = comp; - mComponent.addKeyListener( mDriver ); - } - - /** - * Shut down. No longer listen to my JComponent. - */ - public final void shutdown() - { - if ( null != mComponent ) - mComponent.removeKeyListener( mDriver ); - } - - - /** - * Create a button object for a certain keycode. - */ - public Button createButton( int keycode ) - { - if ( 0 > keycode || 0x100 < keycode ) - throw new InvalidKeyCodeException(); - - KeyButton b; - if ( null == (b = mDriver.getButton( keycode ) ) ) - { - b = new KeyButton( keycode ); - mDriver.registerKeyButton( b ); - if ( keycode > mMaxIdxCreated ) - mMaxIdxCreated = keycode; - } - return b; - } - - - public void removeButton( Button b ) - { - mDriver.unregisterKeyButton( (KeyButton) b ); - } - - - - //********************************************************************************************* - // - // Implement JXInputDevice - // - //********************************************************************************************* - - public Axis getAxis(int idx) - { - // No axes on keyboard. - return null; - } - - - public Button getButton(int idx) - { - // idx is interpreted as the keycode - return mDriver.getButton( idx ); - } - - public Directional getDirectional(int idx) - { - // No directionals on keyboard. - return null; - } - - /** Maximum number of axes as an upper bound for index values. */ - public int getMaxNumberOfAxes() - { - // No axes on keyboard. - return 0; - } - - /** Maximum number of buttons as an upper bound for index values. */ - public int getMaxNumberOfButtons() - { - // Return biggest keycode (inclusive). - return mMaxIdxCreated + 1; - } - - /** Maximum number of directional features as an upper bound for index values. */ - public int getMaxNumberOfDirectionals() - { - // No directionals on keyboard. - return 0; - } - - /** - * Devices may have a name. - * This name might be provided by a system dependant driver. - */ - public String getName() - { - return DEVICENAME; - } - - /** Actual number of available axes. */ - public int getNumberOfAxes() - { - // No axes on keyboard. - return 0; - } - - /** Actual number of available buttons. */ - public int getNumberOfButtons() - { - return mDriver.getNumberOfButtons(); - } - - /** Actual number of available directional features. */ - public int getNumberOfDirectionals() - { - // No directionals on keyboard. - return 0; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/KeyButton.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/KeyButton.java deleted file mode 100644 index 3fd7130..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/KeyButton.java +++ /dev/null @@ -1,94 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 9. April 2002, 22:51 -//********************************************************************************************** -package de.hardcode.jxinput.keyboard; - -import de.hardcode.jxinput.Button; -import java.awt.event.KeyEvent; - - -/** - * Associates a keycode with a Button and handles the current state of that button. - * - * @author Herkules - */ -class KeyButton - implements Button -{ - private final int mKeyCode; - private boolean mIsPressed; - private boolean mHasChanged; - - /** - * Creates a new instance of KeyButton. - */ - public KeyButton( int keycode ) - { - mKeyCode = keycode; - } - - - /** - * Return the keycode assigned with this button. - */ - public final int getKeyCode() - { - return mKeyCode; - } - - final void setIsPressed( boolean flag ) - { - mIsPressed = flag; - } - - //********************************************************************************************* - // - // Implement Button - // - //********************************************************************************************* - - - /** - * Features may have a name provided e.g. by the driver. - */ - public String getName() - { - return KeyEvent.getKeyText( mKeyCode ); - } - - /** - * Tells the state of the button at last update. - */ - public boolean getState() - { - return mIsPressed; - } - - /** - * Retrieve the type of the button. - * Pushbutton will deliver true==getState() as long as they are pressed down. - * Togglebuttons will change their state once they are pressed and keep that state - * until they are pressed again. - * @return [ PUSHBUTTON | TOGGLEBUTTON ] - */ - public int getType() - { - return Button.PUSHBUTTON; - } - - - /** - * Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - public boolean hasChanged() - { - return true; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/KeyboardDriver.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/KeyboardDriver.java deleted file mode 100644 index 7eb6232..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/KeyboardDriver.java +++ /dev/null @@ -1,141 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 9. April 2002, 22:43 -//********************************************************************************************** -package de.hardcode.jxinput.keyboard; - -import java.awt.event.KeyListener; -import java.awt.event.KeyEvent; -import java.util.HashMap; -import java.security.InvalidParameterException; - - - -/** - * Listen to a JComponent handle handle all associated button objects. - * This is the main worker class for JXKeyboardInputDevice. - * - * @author Herkules - */ -class KeyboardDriver implements KeyListener -{ -// HashMap mKeysToObserveMap = new HashMap(); - - int mNumberOfKeysObserved = 0; - KeyButton [] mKeysObserved = new KeyButton [ 0x100 ]; - - - /** - * Creates a new instance of KeyboardDriver. - */ - public KeyboardDriver() - { - } - - - /** - * How many buttons are registered? - */ - final int getNumberOfButtons() - { - return mNumberOfKeysObserved; -// return mKeysToObserveMap.size(); - } - - - /** - * Place a new button under my observation. - */ - final boolean registerKeyButton( KeyButton b ) - { - final int keycode = b.getKeyCode(); - - if ( 0 > keycode || 0x100 < keycode ) - throw new InvalidKeyCodeException(); - - if ( null == mKeysObserved[ keycode ] ) - { - mKeysObserved[ keycode ] = b; - mNumberOfKeysObserved++; - return true; - } - else - { - return false; - } - -// Integer code = new Integer( b.getKeyCode() ); -// if ( ! mKeysToObserveMap.containsKey( code ) ) -// { -// mKeysToObserveMap.put( code, b ); -// return true; -// } -// else -// { -// return false; -// } - } - - final void unregisterKeyButton( KeyButton b ) - { - final int keycode = b.getKeyCode(); - - if ( 0 > keycode || 0x100 < keycode ) - throw new InvalidKeyCodeException(); - - if ( null != mKeysObserved[ b.getKeyCode() ] ) - { - mKeysObserved[ keycode ] = null; - mNumberOfKeysObserved--; - } - -// Integer code = new Integer( b.getKeyCode() ); -// mKeysToObserveMap.remove( code ); - } - - - /** - * Retrieve the button from its keycode. - */ - final KeyButton getButton( int keycode ) - { - if ( 0 > keycode || 0x100 < keycode ) - throw new InvalidKeyCodeException(); - - return mKeysObserved[ keycode ]; - -// Integer code = new Integer( keycode ); -// return (KeyButton)mKeysToObserveMap.get( code ); - } - - - //********************************************************************************************* - // - // Implement KeyListener - // - //********************************************************************************************* - - public void keyPressed( KeyEvent keyEvent ) - { - KeyButton b = getButton( keyEvent.getKeyCode() ); - if ( null != b ) - b.setIsPressed( true ); - } - - public void keyReleased( KeyEvent keyEvent ) - { - KeyButton b = getButton( keyEvent.getKeyCode() ); - if ( null != b ) - b.setIsPressed( false ); - } - - public void keyTyped( KeyEvent keyEvent ) - { - // Intentionally empty. - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/package.html b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/package.html deleted file mode 100644 index e1021d1..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/keyboard/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - de.hardcode.jxinput.keyboard - - -Connects Swing keyboard handling to the JXInput infrastructure. - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/AxisListener.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/AxisListener.java deleted file mode 100644 index 7d2b138..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/AxisListener.java +++ /dev/null @@ -1,39 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 20. Februar 2002, 22:19 -//********************************************************************************************** -package de.hardcode.jxinput.test; - -import de.hardcode.jxinput.event.JXInputEventManager; -import de.hardcode.jxinput.event.JXInputAxisEventListener; -import de.hardcode.jxinput.event.JXInputAxisEvent; -import de.hardcode.jxinput.Axis; - -/** - * Example listener to an axis. - * - * @author Herkules - */ -public class AxisListener - implements JXInputAxisEventListener -{ - - /** - * Creates a new instance of AxisListener. - */ - public AxisListener( Axis axis ) - { - JXInputEventManager.addListener( this, axis, 0.1 ); - } - - - public void changed( JXInputAxisEvent ev ) - { - System.out.println( "Axis " + ev.getAxis().getName() + " changed : value=" + ev.getAxis().getValue() + ", event causing delta=" + ev.getDelta() ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/ButtonListener.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/ButtonListener.java deleted file mode 100644 index 604002d..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/ButtonListener.java +++ /dev/null @@ -1,38 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 20. Februar 2002, 22:19 -//********************************************************************************************** -package de.hardcode.jxinput.test; - -import de.hardcode.jxinput.event.JXInputEventManager; -import de.hardcode.jxinput.event.JXInputButtonEventListener; -import de.hardcode.jxinput.event.JXInputButtonEvent; -import de.hardcode.jxinput.Button; - -/** - * Sample button listener. - * - * @author Herkules - */ -public class ButtonListener implements JXInputButtonEventListener -{ - - /** - * Creates a new instance of AxisListener. - */ - public ButtonListener( Button button ) - { - JXInputEventManager.addListener( this, button ); - } - - - public void changed( JXInputButtonEvent ev ) - { - System.out.println( "Button " + ev.getButton().getName() + " changed : state=" + ev.getButton().getState() ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/DirectionalListener.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/DirectionalListener.java deleted file mode 100644 index 9f79796..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/DirectionalListener.java +++ /dev/null @@ -1,37 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 20. Februar 2002, 22:19 -//********************************************************************************************** -package de.hardcode.jxinput.test; - -import de.hardcode.jxinput.event.JXInputEventManager; -import de.hardcode.jxinput.event.JXInputDirectionalEventListener; -import de.hardcode.jxinput.event.JXInputDirectionalEvent; -import de.hardcode.jxinput.Directional; - -/** - * Sample directional listener. - * - * @author Herkules - */ -public class DirectionalListener implements JXInputDirectionalEventListener -{ - /** - * Creates a new instance of AxisListener. - */ - public DirectionalListener( Directional directional ) - { - JXInputEventManager.addListener( this, directional, 1.0 ); - } - - - public void changed( JXInputDirectionalEvent ev ) - { - System.out.println( "Directional " + ev.getDirectional().getName() + " changed : direction=" + ev.getDirectional().getDirection() + ", value=" + ev.getDirectional().getValue() + ", event causing delta=" + ev.getDirectionDelta() ); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputDevicePanel.form b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputDevicePanel.form deleted file mode 100644 index fe9f69e..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputDevicePanel.form +++ /dev/null @@ -1,97 +0,0 @@ - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputDevicePanel.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputDevicePanel.java deleted file mode 100644 index 81fbef3..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputDevicePanel.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * JXInputDevicePanel.java - * - * Created on 23. Januar 2002, 22:19 - */ -package de.hardcode.jxinput.test; - -import de.hardcode.jxinput.JXInputManager; -import de.hardcode.jxinput.JXInputDevice; -import de.hardcode.jxinput.Axis; -import de.hardcode.jxinput.Directional; -import de.hardcode.jxinput.Button; - -import javax.swing.*; -import java.awt.GridLayout; -import java.util.ArrayList; -import java.util.Iterator; -import java.awt.BorderLayout; -import java.awt.Font; -import java.util.Dictionary; -import java.util.Enumeration; - -/** - * - * @author Herkules - */ -public class JXInputDevicePanel extends javax.swing.JPanel -{ - private static final Font AXIS_SLIDER_FONT = new Font( "Verdana", Font.PLAIN, 9 ); - - private final JXInputDevice mDev; - private final ArrayList mAxisSliders = new ArrayList(); - private final ArrayList mButtonCheckboxes = new ArrayList(); - private final ArrayList mDirectionalLabels = new ArrayList(); - - - /** Creates new form JXInputDevicePanel */ - public JXInputDevicePanel( JXInputDevice dev ) - { - mDev = dev; - initComponents(); - initFromDevice(); - } - - /** - * Helper class connecting a JSlider with an Axis. - */ - private class AxisSlider extends JSlider - { - Axis mAxis; - AxisSlider( Axis axis ) - { - super( ( Axis.SLIDER == axis.getType() ? 0 : -100 ), 100 ); - this.setMajorTickSpacing( Axis.SLIDER == axis.getType() ? 25 : 50 ); - this.setMinorTickSpacing( 5 ); - this.setPaintTicks( true ); - this.setPaintLabels( true ); - this.setEnabled( false ); - - Dictionary labeldict = this.getLabelTable(); - Enumeration labels = labeldict.elements(); - while ( labels.hasMoreElements() ) - { - JLabel label = (JLabel)labels.nextElement(); - label.setFont( AXIS_SLIDER_FONT ); - label.setSize( 32, 12 ); - label.setHorizontalAlignment( SwingConstants.LEFT ); - } - - mAxis = axis; - } - - void update() - { - int ax = (int)(mAxis.getValue() * 100.0); - - // - // Only if value really changes - // - if ( ax != this.getValue() ) - { - this.setValue( ax ); - this.setToolTipText( mAxis.getName() + ": " + Double.toString( mAxis.getValue() ) ); - } - } - - } - - - private class ButtonCheckbox extends JCheckBox - { - Button mButton; - ButtonCheckbox( Button button ) - { - super( button.getName() ); - this.setEnabled( false ); - mButton = button; - } - - void update() - { - boolean state = mButton.getState(); - - // - // Only if value really changes - // - if ( state != this.isSelected() ) - { - this.setSelected( state ); - } - } - } - - - private class DirectionalLabel extends JLabel - { - Directional mDirectional; - int mCurrent = 0; - - DirectionalLabel( Directional directional ) - { - super( directional.getName() ); - mDirectional = directional; - } - - void update() - { - int dir = mDirectional.getDirection(); - - // - // Only if value really changes - // - if ( dir != mCurrent ) - { - this.setText( mDirectional.getName() + ": " + ( mDirectional.isCentered() ? "-" : Integer.toString( dir ) ) ); - mCurrent = dir; - } - } - } - - - /** - * Setup the dialogs content from the JXInputDevice. - */ - void initFromDevice() - { - if ( null != mDev ) - { - ((GridLayout)mAxesPanel.getLayout()).setRows( mDev.getNumberOfAxes() ); - - for ( int i = 0; i < mDev.getMaxNumberOfAxes(); ++i ) - { - if ( null != mDev.getAxis( i ) ) - { - AxisSlider slider = new AxisSlider( mDev.getAxis( i ) ); - - JLabel name = new JLabel( mDev.getAxis( i ).getName() ); - name.setVerticalAlignment( SwingConstants.TOP ); - name.setHorizontalAlignment( SwingConstants.CENTER ); - name.setPreferredSize( new java.awt.Dimension( 90, 0 ) ); - - JPanel p = new JPanel(); - p.setLayout( new BorderLayout() ); - - p.add( name, BorderLayout.WEST ); - p.add( slider, BorderLayout.CENTER ); - - mAxesPanel.add( p ); - - // Add to list of all AxisSlider controls - mAxisSliders.add( slider ); - - // Add an event listener: - new AxisListener( mDev.getAxis( i ) ); - } - } - - - ((GridLayout)mButtonsPanel.getLayout()).setRows( mDev.getNumberOfButtons() ); - for ( int i = 0; i < mDev.getMaxNumberOfButtons(); ++i ) - { - if ( null != mDev.getButton( i ) ) - { - ButtonCheckbox chk = new ButtonCheckbox( mDev.getButton( i ) ); - mButtonCheckboxes.add( chk ); - mButtonsPanel.add( chk ); - - // Add an event listener: - new ButtonListener( mDev.getButton( i ) ); - } - } - - ((GridLayout)mDirectionalPanel.getLayout()).setRows( mDev.getNumberOfDirectionals() / 2 ); - for ( int i = 0; i < mDev.getMaxNumberOfDirectionals(); ++i ) - { - if ( null != mDev.getDirectional( i ) ) - { - DirectionalLabel lbl = new DirectionalLabel( mDev.getDirectional( i ) ); - mDirectionalLabels.add( lbl ); - mDirectionalPanel.add( lbl ); - - // Add an event listener: - new DirectionalListener( mDev.getDirectional( i ) ); - } - } - } - } - - - public void update() - { - Iterator it = mAxisSliders.iterator(); - while ( it.hasNext() ) - { - ((AxisSlider)it.next()).update(); - } - - it = mButtonCheckboxes.iterator(); - while ( it.hasNext() ) - { - ((ButtonCheckbox)it.next()).update(); - } - - it = mDirectionalLabels.iterator(); - while ( it.hasNext() ) - { - ((DirectionalLabel)it.next()).update(); - } - } - - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() - { - mAxesPanelContainer = new javax.swing.JPanel(); - mAxesPanel = new javax.swing.JPanel(); - mDirectionalPanel = new javax.swing.JPanel(); - mButtonScrollPane = new javax.swing.JScrollPane(); - mButtonsPanel = new javax.swing.JPanel(); - - setLayout(new java.awt.BorderLayout(2, 2)); - - addComponentListener(new java.awt.event.ComponentAdapter() - { - public void componentShown(java.awt.event.ComponentEvent evt) - { - OnShow(evt); - } - }); - - mAxesPanelContainer.setLayout(new java.awt.BorderLayout()); - - mAxesPanelContainer.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); - mAxesPanel.setLayout(new java.awt.GridLayout(1, 1, 0, 20)); - - mAxesPanelContainer.add(mAxesPanel, java.awt.BorderLayout.NORTH); - - add(mAxesPanelContainer, java.awt.BorderLayout.CENTER); - - mDirectionalPanel.setLayout(new java.awt.GridLayout(1, 1)); - - mDirectionalPanel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); - add(mDirectionalPanel, java.awt.BorderLayout.SOUTH); - - mButtonsPanel.setLayout(new java.awt.GridLayout(1, 1)); - - mButtonsPanel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); - mButtonScrollPane.setViewportView(mButtonsPanel); - - add(mButtonScrollPane, java.awt.BorderLayout.EAST); - - }// //GEN-END:initComponents - - private void OnShow(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_OnShow - {//GEN-HEADEREND:event_OnShow - // Commented: the focus is held by a parent component -// System.out.println("OnShow"); -// this.requestFocus(); - }//GEN-LAST:event_OnShow - - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel mAxesPanel; - private javax.swing.JPanel mAxesPanelContainer; - private javax.swing.JScrollPane mButtonScrollPane; - private javax.swing.JPanel mButtonsPanel; - private javax.swing.JPanel mDirectionalPanel; - // End of variables declaration//GEN-END:variables - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputTestDialog.form b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputTestDialog.form deleted file mode 100644 index 1abc589..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputTestDialog.form +++ /dev/null @@ -1,79 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputTestDialog.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputTestDialog.java deleted file mode 100644 index 3829aa2..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/test/JXInputTestDialog.java +++ /dev/null @@ -1,286 +0,0 @@ -//********************************************************************************************** -// Dipl. Phys. Joerg Plewe, HARDCODE Development -// Created on 27. Dezember 2001, 01:15 -//********************************************************************************************** - -package de.hardcode.jxinput.test; - -import de.hardcode.jxinput.*; -import de.hardcode.jxinput.event.*; -import de.hardcode.jxinput.keyboard.JXKeyboardInputDevice; -import de.hardcode.jxinput.virtual.JXVirtualInputDevice; -import de.hardcode.jxinput.virtual.VirtualAxis; - -import javax.swing.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; - - -/** - * Test dialog showing some features of JXInput. - * @author Herkules - */ -public class JXInputTestDialog extends javax.swing.JDialog - implements ActionListener -{ - - private JXKeyboardInputDevice mKeyboardDevice = null; - private JXVirtualInputDevice mVirtualDevice = null; - - Button mButtonUp; - Button mButtonDown; - Button mButtonLeft; - Button mButtonRight; - Button mButtonFire; - Button mButtonSpace; - - /** Creates new form JXInputTestDialog */ - public JXInputTestDialog(java.awt.Frame parent, boolean modal) - { - super(parent, modal); - initComponents(); - configureKeyboardInputDevice(); - configureVirtualInputDevice(); - initDevicePanels(); - pack(); - - // Request the focus so that the keyboarddevice can work - mMainPanel.requestFocus(); - - new Timer( 50, this ).start(); - - // Uncomment this line as an alternative to the Timer above. - // Don't use both!! - //JXInputEventManager.setTriggerIntervall( 50 ); - } - - - /** - * Implement ActionListener#actionPerformed(). - * This is called by the Timer. - */ - public void actionPerformed( ActionEvent e ) - { - JXInputManager.updateFeatures(); - SwingUtilities.invokeLater( - new Runnable() - { - public void run() - { - for ( int i = 0; i < mDevicesTabbedPane.getComponentCount(); ++i ) - { - ((JXInputDevicePanel)mDevicesTabbedPane.getComponent( i )).update(); - } - } - } - ); - } - - - /** - * Configure a test JXKeyboardInputdevice. - */ - void configureKeyboardInputDevice() - { - mKeyboardDevice = JXInputManager.createKeyboardDevice(); - - mKeyboardDevice.createButton( KeyEvent.VK_ESCAPE ); - - mKeyboardDevice.createButton( KeyEvent.VK_F1 ); - mKeyboardDevice.createButton( KeyEvent.VK_F2 ); - mKeyboardDevice.createButton( KeyEvent.VK_F3 ); - mKeyboardDevice.createButton( KeyEvent.VK_F4 ); - - mKeyboardDevice.createButton( KeyEvent.VK_LEFT ); - mKeyboardDevice.createButton( KeyEvent.VK_RIGHT ); - mKeyboardDevice.createButton( KeyEvent.VK_UP ); - mKeyboardDevice.createButton( KeyEvent.VK_DOWN ); - - mKeyboardDevice.createButton( KeyEvent.VK_PAGE_UP ); - mKeyboardDevice.createButton( KeyEvent.VK_PAGE_DOWN ); - - mButtonSpace = mKeyboardDevice.createButton( KeyEvent.VK_SPACE ); - mButtonLeft = mKeyboardDevice.createButton( KeyEvent.VK_A ); - mButtonRight = mKeyboardDevice.createButton( KeyEvent.VK_D ); - mButtonDown = mKeyboardDevice.createButton( KeyEvent.VK_S ); - mButtonUp = mKeyboardDevice.createButton( KeyEvent.VK_W ); - - // Configure it to make it listen to the main panel. - // I try to keep the kbd focus on it. - mKeyboardDevice.listenTo( mMainPanel ); - } - - - /** - * Configure a test JXVirtualInputdevice. - */ - void configureVirtualInputDevice() - { - mVirtualDevice = JXInputManager.createVirtualDevice(); - - Button firebutton; - // - // Remember 'fire' button of first device for use - // in the virtual device. - // For we ran configureKeyboardInputDevice() before, - // getJXInputDevice( 0 ) should not return null - // - firebutton = JXInputManager.getJXInputDevice( 0 ).getButton( 0 ); - - VirtualAxis x = mVirtualDevice.createAxis( Axis.ID_X ); - x.setButtons( mButtonRight, mButtonLeft ); - x.setName( "x: A-D" ); - - VirtualAxis y = mVirtualDevice.createAxis( Axis.ID_Y ); - y.setButtons( mButtonUp, mButtonDown ); - y.setSpringSpeed( 0.0 ); - y.setName( "y: S|W" ); - - VirtualAxis slider = mVirtualDevice.createAxis( Axis.ID_SLIDER0 ); - slider.setIncreaseButton( mButtonSpace ); - slider.setTimeFor0To1( 2000 ); - slider.setName( "" ); - slider.setType( Axis.SLIDER ); - - if ( null != firebutton ) - { - slider = mVirtualDevice.createAxis( Axis.ID_SLIDER1 ); - slider.setIncreaseButton( firebutton ); - slider.setTimeFor0To1( 2000 ); - slider.setName( "JoyButton 0" ); - } - - - } - - - /** - * Initialize one panel for each device available. - */ - void initDevicePanels() - { - int cnt = JXInputManager.getNumberOfDevices(); - - mLabelNoDevice.setVisible( cnt == 0 ); - mDevicesTabbedPane.setVisible( cnt != 0 ); - - for ( int i = 0; i < cnt; ++i ) - { - JXInputDevice dev = JXInputManager.getJXInputDevice( i ); - if ( null != dev ) - { - // - // Setup an own panel for each device. - // - JPanel panel = new JXInputDevicePanel( dev ); - mDevicesTabbedPane.addTab( dev.getName(), panel ); - } - } - } - - - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() - { - mMainPanel = new javax.swing.JPanel(); - mLabelNoDevice = new javax.swing.JLabel(); - mDevicesTabbedPane = new javax.swing.JTabbedPane(); - mButtonReset = new javax.swing.JButton(); - - setTitle("JXInput (C) 2001-2006 HARDCODE Dev."); - addWindowListener(new java.awt.event.WindowAdapter() - { - public void windowClosing(java.awt.event.WindowEvent evt) - { - closeDialog(evt); - } - }); - - mMainPanel.setLayout(new java.awt.BorderLayout(10, 0)); - - mLabelNoDevice.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - mLabelNoDevice.setText("No JXInputDevice available!"); - mLabelNoDevice.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); - mMainPanel.add(mLabelNoDevice, java.awt.BorderLayout.NORTH); - - mDevicesTabbedPane.addFocusListener(new java.awt.event.FocusAdapter() - { - public void focusGained(java.awt.event.FocusEvent evt) - { - mDevicesTabbedPaneFocusGained(evt); - } - }); - - mMainPanel.add(mDevicesTabbedPane, java.awt.BorderLayout.CENTER); - - mButtonReset.setText("Reset "); - mButtonReset.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(java.awt.event.ActionEvent evt) - { - mButtonResetActionPerformed(evt); - } - }); - - mMainPanel.add(mButtonReset, java.awt.BorderLayout.SOUTH); - - getContentPane().add(mMainPanel, java.awt.BorderLayout.CENTER); - - pack(); - }// //GEN-END:initComponents - - private void mButtonResetActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_mButtonResetActionPerformed - {//GEN-HEADEREND:event_mButtonResetActionPerformed - - while ( this.mDevicesTabbedPane.getTabCount() > 0 ) - this.mDevicesTabbedPane.removeTabAt( 0 ); - - JXInputManager.reset(); - configureKeyboardInputDevice(); - configureVirtualInputDevice(); - initDevicePanels(); - pack(); - - // Request the focus so that the keyboarddevice can work - mMainPanel.requestFocus(); - - }//GEN-LAST:event_mButtonResetActionPerformed - - private void mDevicesTabbedPaneFocusGained(java.awt.event.FocusEvent evt)//GEN-FIRST:event_mDevicesTabbedPaneFocusGained - {//GEN-HEADEREND:event_mDevicesTabbedPaneFocusGained - // Switch focus back to main panel! - this.mMainPanel.requestFocus(); - }//GEN-LAST:event_mDevicesTabbedPaneFocusGained - - /** Closes the dialog */ - private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog - setVisible(false); - dispose(); - System.exit( 0 ); - }//GEN-LAST:event_closeDialog - - /** - * Allow the dialog to run standalone. - * @param args the command line arguments - */ - public static void main(String args[]) - { - new JXInputTestDialog(new javax.swing.JFrame(), true).setVisible(true); - } - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton mButtonReset; - private javax.swing.JTabbedPane mDevicesTabbedPane; - private javax.swing.JLabel mLabelNoDevice; - private javax.swing.JPanel mMainPanel; - // End of variables declaration//GEN-END:variables - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/util/LatestChangedValueAxis.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/util/LatestChangedValueAxis.java deleted file mode 100644 index f4f2c35..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/util/LatestChangedValueAxis.java +++ /dev/null @@ -1,98 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 17. April 2002, 23:24 -//********************************************************************************************** -package de.hardcode.jxinput.util; - -import de.hardcode.jxinput.Axis; - -/** - * - * @author Herkules - */ -public class LatestChangedValueAxis implements Axis -{ - private final Axis mAxis1; - private final Axis mAxis2; - private Axis mAxisInUse; - - private double mSaved1; - private double mSaved2; - - /** - * Creates a new instance of MeanValueAxis. - */ - public LatestChangedValueAxis(Axis a1, Axis a2) - { - mAxis1 = a1; - mAxis2 = a2; - mAxisInUse = a1; - - mSaved1 = a1.getValue(); - mSaved2 = a2.getValue(); - } - - /** - * Features may have a name provided e.g. by the driver. - */ - public String getName() - { - return mAxis1.getName(); - } - - /** Inform about the resolution of the axis. - * - * @return resolution, e.g. 2^-16 - */ - public double getResolution() - { - return mAxis1.getResolution(); - } - - /** - * Retrieve the type of the axis. - * - * @return [ TRANSLATION | ROTATION | SLIDER ] - */ - public int getType() - { - return mAxis1.getType(); - } - - /** Returns the current value of the axis. - * The range of the result depends on the axis type. - *s - * @return value [-1.0,1.0] or [0.0,1.0] - */ - public double getValue() - { - double v1 = mAxis1.getValue(); - double v2 = mAxis2.getValue(); - - if ( Math.abs( v2 - mSaved2 ) > 0.2 ) - { - mAxisInUse = mAxis2; - mSaved2 = v2; - } - if ( Math.abs( v1 - mSaved1 ) > 0.2 ) - { - mAxisInUse = mAxis1; - mSaved1 = v1; - } - - return mAxisInUse.getValue(); - } - - /** Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - public boolean hasChanged() - { - return true; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/util/OrButton.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/util/OrButton.java deleted file mode 100644 index 338538c..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/util/OrButton.java +++ /dev/null @@ -1,52 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 23. Dezember 2002, 19:21 -//********************************************************************************************** -package de.hardcode.jxinput.util; - -import de.hardcode.jxinput.Button; - -/** - * - * @author Herkules - */ -public class OrButton implements Button -{ - private final Button mButton1; - private final Button mButton2; - - - /** - * Creates a new instance of OrButton. - */ - public OrButton( Button b1, Button b2 ) - { - mButton1 = b1; - mButton2 = b2; - } - - public String getName() - { - return mButton1.getName(); - } - - public boolean getState() - { - return mButton1.getState() || mButton2.getState(); - } - - public int getType() - { - return mButton1.getType(); - } - - public boolean hasChanged() - { - return mButton1.hasChanged() || mButton2.hasChanged(); - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/JXVirtualInputDevice.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/JXVirtualInputDevice.java deleted file mode 100644 index aa125af..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/JXVirtualInputDevice.java +++ /dev/null @@ -1,140 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 9. April 2002, 22:40 -//********************************************************************************************** -package de.hardcode.jxinput.virtual; - - -import de.hardcode.jxinput.*; - - -/** - * Virtual input device. - * - * @author Herkules - */ -public class JXVirtualInputDevice implements JXInputDevice -{ - private static final String DEVICENAME = "Virtual Device"; - - /** The driver doing all the real work. */ - private final VirtualDriver mDriver = new VirtualDriver(); - - - /** - * Creates a new instance of JXKeyboardInputDevice. - */ - public JXVirtualInputDevice() - { - } - - - /** - * The virtual input device needs to be updated regularly. - */ - public final void update( long deltaT ) - { - // - // Delegate the update call to the driver. - // - mDriver.update( deltaT ); - } - - /** - * Create a virtual axis object with a certain ID, e.g. Axis.ID_X. - */ - public VirtualAxis createAxis( int id ) - { - VirtualAxis a; - a = new VirtualAxis( id ); - mDriver.registerVirtualAxis( id, a ); - return a; - } - - - public void removeAxis( VirtualAxis a ) - { - mDriver.unregisterVirtualAxis( a ); - } - - - - //********************************************************************************************* - // - // Implement JXInputDevice - // - //********************************************************************************************* - - public Axis getAxis(int idx) - { - return mDriver.getAxis( idx ); - } - - - public Button getButton(int idx) - { - // No virtual buttons. - return null; - } - - - public Directional getDirectional(int idx) - { - // No virtual directionals. - return null; - } - - /** Maximum number of axes as an upper bound for index values. */ - public int getMaxNumberOfAxes() - { - return Axis.NUMBER_OF_ID; - } - - /** Maximum number of buttons as an upper bound for index values. */ - public int getMaxNumberOfButtons() - { - // No virtual buttons. - return 0; - } - - /** Maximum number of directional features as an upper bound for index values. */ - public int getMaxNumberOfDirectionals() - { - // No virtual directionals. - return 0; - } - - /** - * Devices may have a name. - * This name might be provided by a system dependant driver. - */ - public String getName() - { - return DEVICENAME; - } - - /** Actual number of available axes. */ - public int getNumberOfAxes() - { - // No axes on keyboard. - return mDriver.getNumberOfAxes(); - } - - /** Actual number of available buttons. */ - public int getNumberOfButtons() - { - return 0; - } - - /** Actual number of available directional features. */ - public int getNumberOfDirectionals() - { - // No directionals on keyboard. - return 0; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/VirtualAxis.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/VirtualAxis.java deleted file mode 100644 index b272c6e..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/VirtualAxis.java +++ /dev/null @@ -1,207 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 11. April 2002, 23:40 -//********************************************************************************************** -package de.hardcode.jxinput.virtual; - -import de.hardcode.jxinput.Axis; -import de.hardcode.jxinput.Button; -import java.security.InvalidParameterException; - -/** - * - * @author Jörg Plewe - */ -public class VirtualAxis - implements Axis -{ - - private int mType = Axis.TRANSLATION; - private final int mID; - private String mName = "VirtualAxis"; - private double mCurrentValue = 0; - - private Button mButtonIncrease = null; - private Button mButtonDecrease = null; - private double mSpeed = 1.0 / 500.0; - private double mSpringSpeed = 1.0 / 500.0; - - /** - * Creates a new instance of VirtualAxis. - */ - public VirtualAxis( int id ) - { - mID = id; - } - - - /** - * Set the type of this axis to be either Axis.ROTATION, - * Axis.TRANSLATION or Axis.SLIDER. - */ - public void setType( int type ) - { - if ( Axis.ROTATION != type - && Axis.TRANSLATION != type - && Axis.SLIDER != type - ) - throw new InvalidParameterException( "Invalid type for axis!" ); - - mType = type; - } - - /** - * Update features under my control. - */ - final void update( long deltaT ) - { - double change = mSpeed * deltaT; - double springchange = mSpringSpeed * deltaT; - boolean doincrease = ( null != mButtonIncrease && mButtonIncrease.getState() ); - boolean dodecrease = ( null != mButtonDecrease && mButtonDecrease.getState() ); - boolean iscontrolled = doincrease || dodecrease; - - double controlledchange = 0.0; - if ( doincrease ) - controlledchange += change; - if ( dodecrease ) - controlledchange -= change; - - mCurrentValue += controlledchange; - - if ( mCurrentValue > 0.0 && ! doincrease ) - { - springchange = Math.min( mCurrentValue, springchange ); - mCurrentValue -= springchange; - } - if ( mCurrentValue < 0.0 && ! dodecrease ) - { - springchange = Math.min( -mCurrentValue, springchange ); - mCurrentValue += springchange; - } - - // - // Hold value within range - // - if ( mCurrentValue > 1.0 ) - mCurrentValue = 1.0; - double lowerlimit = Axis.SLIDER == mType ? 0.0 : -1.0; - if ( mCurrentValue < lowerlimit ) - mCurrentValue = lowerlimit; - } - - - /** - * Set the button to increase the axis for a single button axis. - */ - public final void setIncreaseButton( Button b ) - { - if ( null == b ) - throw new InvalidParameterException( "Button may not be null!" ); - - mButtonIncrease = b; - } - - - /** - * Set the buttons to increase and descrease the axis. - */ - public final void setButtons( Button increase, Button decrease ) - { - if ( null == increase || null == decrease ) - throw new InvalidParameterException( "Buttons may not be null!" ); - - mButtonIncrease = increase; - mButtonDecrease = decrease; - } - - - public final void setSpeed( double speed ) - { - mSpeed = speed; - } - - public final void setSpringSpeed( double springspeed ) - { - mSpringSpeed = springspeed; - } - - - public final void setTimeFor0To1( int ms ) - { - if ( 0 >= ms ) - mSpeed = 0.0; - else - mSpeed = 1.0/ ms; - } - public final void setTimeFor1To0( int ms ) - { - if ( 0 >= ms ) - mSpringSpeed = 0.0; - else - mSpringSpeed = 1.0/ ms; - } - - - public final void setName( String name ) - { - mName = name; - } - - //********************************************************************************************* - // - // Implement Axis - // - //********************************************************************************************* - - /** - * Features may have a name provided e.g. by the driver. - */ - public String getName() - { - return mName; - } - - /** - * Inform about the resolution of the axis. - * - * @return resolution, e.g. 2^-16 - */ - public double getResolution() - { - return 1.0/65536.0; - } - - - /** - * Retrieve the type of the axis. - * @return [ TRANSLATION | ROTATION | SLIDER ] - */ - public int getType() - { - return mType; - } - - /** Returns the current value of the axis. - * The range of the result depends on the axis type. - * - * @return value [-1.0,1.0] or [0.0,1.0] - */ - public double getValue() - { - return mCurrentValue; - } - - /** Denote wether this feature has changed beyond it's resolution since it got last - * updated. - */ - public boolean hasChanged() - { - return true; - } - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/VirtualDriver.java b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/VirtualDriver.java deleted file mode 100644 index 5952eff..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/VirtualDriver.java +++ /dev/null @@ -1,95 +0,0 @@ -//********************************************************************************************** -// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development -// All rights reserved. Copying, modification, -// distribution or publication without the prior written -// consent of the author is prohibited. -// -// Created on 9. April 2002, 22:43 -//********************************************************************************************** -package de.hardcode.jxinput.virtual; - -import java.util.ArrayList; -import de.hardcode.jxinput.Axis; - - - -/** - * This is the main worker class for JXVirtualInputDevice. - * - * @author Herkules - */ -class VirtualDriver -{ - - private final VirtualAxis[] mVAxes = new VirtualAxis[ Axis.NUMBER_OF_ID ]; - - /** - * Creates a new instance of KeyboardDriver. - */ - VirtualDriver() - { - } - - - /** - * Update features under my control. - */ - final void update( long deltaT ) - { - // - // Delegate the update call to the axes in use. - // - for ( int i = 0; i < mVAxes.length; i++ ) - { - if ( null != mVAxes[ i ] ) - mVAxes[ i ].update( deltaT ); - } - } - - - /** - * How many axes are registered? - */ - final int getNumberOfAxes() - { - int ctr = 0; - for ( int i = 0; i < mVAxes.length; i++ ) - { - if ( null != mVAxes[ i ] ) - ctr++; - } - return ctr; - } - - Axis getAxis(int idx) - { - return mVAxes[ idx ]; - } - - - /** - * Place a new axis under my observation. - */ - final void registerVirtualAxis( int id, VirtualAxis a ) - { - mVAxes[ id ] = a; - } - - - /** - * Remove an axis from my control. - */ - final void unregisterVirtualAxis( VirtualAxis a ) - { - for ( int i = 0; i < mVAxes.length; ++i ) - { - if ( mVAxes[ i ] == a ) - { - mVAxes[ i ] = null; - break; - } - } - } - - -} diff --git a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/package.html b/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/package.html deleted file mode 100644 index d8e1d6a..0000000 --- a/vendor/JXInput/0.3.4/java/de/hardcode/jxinput/virtual/package.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - de.hardcode.jxinput.virtual - - -Allows to define virtual axes that are not derived from any device -but from other JXInput feature objects. - - diff --git a/vendor/JXInput/0.3.4/jxinput.dll b/vendor/JXInput/0.3.4/jxinput.dll deleted file mode 100644 index 720b9bb..0000000 Binary files a/vendor/JXInput/0.3.4/jxinput.dll and /dev/null differ diff --git a/vendor/JXInput/0.3.4/jxinput.jar b/vendor/JXInput/0.3.4/jxinput.jar deleted file mode 100644 index dbb035a..0000000 Binary files a/vendor/JXInput/0.3.4/jxinput.jar and /dev/null differ diff --git a/vendor/JavaWinampApi/1.1/cpp/Makefile.win b/vendor/JavaWinampApi/1.1/cpp/Makefile.win deleted file mode 100644 index 206b141..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/Makefile.win +++ /dev/null @@ -1,34 +0,0 @@ -# Project: wpcom -# Makefile created by Dev-C++ 4.9.9.2 - -CPP = g++.exe -CC = gcc.exe -WINDRES = windres.exe -RES = -OBJ = WinampController.o $(RES) -LINKOBJ = WinampController.o $(RES) -LIBS = -L"E:/java/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias -INCS = -I"E:/java/Dev-Cpp/include" -I"E:/Program Files/Java/jdk1.6.0_11/include" -I"E:/Program Files/Java/jdk1.6.0_11/include/win32" -CXXINCS = -I"E:/java/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"E:/java/Dev-Cpp/include/c++/3.4.2/backward" -I"E:/java/Dev-Cpp/include/c++/3.4.2/mingw32" -I"E:/java/Dev-Cpp/include/c++/3.4.2" -I"E:/java/Dev-Cpp/include" -I"E:/Program Files/Java/jdk1.6.0_11/include" -I"E:/Program Files/Java/jdk1.6.0_11/include/win32" -BIN = ../../wpcom.dll -CXXFLAGS = $(CXXINCS) -DBUILDING_DLL=1 -CFLAGS = $(INCS) -DBUILDING_DLL=1 -RM = rm -f - -.PHONY: all all-before all-after clean clean-custom - -all: all-before ../../wpcom.dll all-after - - -clean: clean-custom - ${RM} $(OBJ) $(BIN) - -DLLWRAP=dllwrap.exe -DEFFILE=../../libwpcom.def -STATICLIB=../../libwpcom.a - -$(BIN): $(LINKOBJ) - $(DLLWRAP) --output-def $(DEFFILE) --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN) - -WinampController.o: WinampController.c - $(CC) -c WinampController.c -o WinampController.o $(CFLAGS) diff --git a/vendor/JavaWinampApi/1.1/cpp/WINAMPCMD.H b/vendor/JavaWinampApi/1.1/cpp/WINAMPCMD.H deleted file mode 100644 index 068b55c..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/WINAMPCMD.H +++ /dev/null @@ -1,62 +0,0 @@ -#define WINAMP_FILE_QUIT 40001 -#define WINAMP_OPTIONS_PREFS 40012 -#define WINAMP_OPTIONS_AOT 40019 -#define WINAMP_FILE_REPEAT 40022 -#define WINAMP_FILE_SHUFFLE 40023 -#define WINAMP_HIGH_PRIORITY 40025 -#define WINAMP_FILE_PLAY 40029 -#define WINAMP_OPTIONS_EQ 40036 -#define WINAMP_OPTIONS_ELAPSED 40037 -#define WINAMP_OPTIONS_REMAINING 40038 -#define WINAMP_OPTIONS_PLEDIT 40040 -#define WINAMP_HELP_ABOUT 40041 -#define WINAMP_MAINMENU 40043 -#define WINAMP_BUTTON1 40044 -#define WINAMP_BUTTON2 40045 -#define WINAMP_BUTTON3 40046 -#define WINAMP_BUTTON4 40047 -#define WINAMP_BUTTON5 40048 -#define WINAMP_VOLUMEUP 40058 -#define WINAMP_VOLUMEDOWN 40059 -#define WINAMP_FFWD5S 40060 -#define WINAMP_REW5S 40061 -#define WINAMP_NEXT_WINDOW 40063 -#define WINAMP_OPTIONS_WINDOWSHADE 40064 -#define WINAMP_BUTTON1_SHIFT 40144 -#define WINAMP_BUTTON2_SHIFT 40145 -#define WINAMP_BUTTON3_SHIFT 40146 -#define WINAMP_BUTTON4_SHIFT 40147 -#define WINAMP_BUTTON5_SHIFT 40148 -#define WINAMP_BUTTON1_CTRL 40154 -#define WINAMP_BUTTON2_CTRL 40155 -#define WINAMP_BUTTON3_CTRL 40156 -#define WINAMP_BUTTON4_CTRL 40157 -#define WINAMP_BUTTON5_CTRL 40158 -#define WINAMP_OPTIONS_DSIZE 40165 -#define IDC_SORT_FILENAME 40166 -#define IDC_SORT_FILETITLE 40167 -#define IDC_SORT_ENTIREFILENAME 40168 -#define IDC_SELECTALL 40169 -#define IDC_SELECTNONE 40170 -#define IDC_SELECTINV 40171 -#define IDM_EQ_LOADPRE 40172 -#define IDM_EQ_LOADMP3 40173 -#define IDM_EQ_LOADDEFAULT 40174 -#define IDM_EQ_SAVEPRE 40175 -#define IDM_EQ_SAVEMP3 40176 -#define IDM_EQ_SAVEDEFAULT 40177 -#define IDM_EQ_DELPRE 40178 -#define IDM_EQ_DELMP3 40180 -#define IDC_PLAYLIST_PLAY 40184 -#define WINAMP_FILE_LOC 40185 -#define WINAMP_OPTIONS_EASYMOVE 40186 -#define WINAMP_FILE_DIR 40187 -#define WINAMP_EDIT_ID3 40188 -#define WINAMP_TOGGLE_AUTOSCROLL 40189 -#define WINAMP_VISSETUP 40190 -#define WINAMP_PLGSETUP 40191 -#define WINAMP_VISPLUGIN 40192 -#define WINAMP_JUMP 40193 -#define WINAMP_JUMPFILE 40194 -#define WINAMP_JUMP10FWD 40195 -#define WINAMP_JUMP10BACK 40197 diff --git a/vendor/JavaWinampApi/1.1/cpp/WinampController.c b/vendor/JavaWinampApi/1.1/cpp/WinampController.c deleted file mode 100644 index 1b6f46e..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/WinampController.c +++ /dev/null @@ -1,587 +0,0 @@ -/* meu .h */ -#include "WinampController.h" - -/* mingw */ -#include -#include -#include - -/* winamp sdk */ -#include "wa_ipc.h" -#include "WINAMPCMD.H" - -const int WA_CLOSE = 40001 ; -const int WA_PLAY = WINAMP_BUTTON2; -const int WA_STOP = WINAMP_BUTTON4; -const int WA_PAUSE = WINAMP_BUTTON3; -const int WA_PREVTRACK = WINAMP_BUTTON1; -const int WA_NEXTTRACK = WINAMP_BUTTON5; -const int WA_FWD5SECS = WINAMP_FFWD5S; -const int WA_REW5SECS = WINAMP_REW5S; - -const int WA_PLAYLISTLEN = IPC_GETLISTLENGTH; -const int WA_SETVOLUME = IPC_SETVOLUME; -const int WA_SETPLAYLISTPOS = IPC_SETPLAYLISTPOS; -const int WA_WRITEPLAYLIST = IPC_WRITEPLAYLIST; -const int WA_ENQUEUEFILE = IPC_ENQUEUEFILE; - -const int WA_VOLUMEUP = WINAMP_VOLUMEUP; -const int WA_VOLUMEDOWN = WINAMP_VOLUMEDOWN; - -const int WA_CLEARPLAYLIST = IPC_DELETE; -const int WA_NOTHING = 0; -const int WA_TRACK_LENGTH = 1; - -const int WA_RESTART = IPC_RESTARTWINAMP; -const int WA_REFRESHPLCACHE = IPC_REFRESHPLCACHE; -const int WA_GETSHUFFLESTATUS = IPC_GET_SHUFFLE; -const int WA_GETREPEATSTATUS = IPC_GET_REPEAT; -const int WA_SETSHUFFLESTATUS = IPC_SET_SHUFFLE; -const int WA_SETREPEATSTATUS = IPC_SET_REPEAT; - -const int WA_GETSTATUS = IPC_ISPLAYING; - -const int WA_GETLISTPOS = IPC_GETLISTPOS; -const int WA_GETTITLE = IPC_GETPLAYLISTTITLE; - -const int WA_VERSION = IPC_GETVERSION; -const int WA_FILENAMEINLIST = IPC_GETPLAYLISTFILE; -const int WA_GETFILEINFO = IPC_GET_EXTENDED_FILE_INFO; - -HWND hwnd_winamp = NULL; -INT position = 0; -STARTUPINFO si; -PROCESS_INFORMATION pi; -char messageReturn[255]; -wchar_t* wMessageReturn; - -LPDWORD temp; - -void initWinampHandle() { - hwnd_winamp = NULL; - if (hwnd_winamp == NULL) { - hwnd_winamp = FindWindow("Winamp v1.x", NULL); - } - if (hwnd_winamp == NULL) { - hwnd_winamp = FindWindow("Winamp v2.x", NULL); - } - if (hwnd_winamp == NULL) { - hwnd_winamp = FindWindow("Winamp v3.x", NULL); - } -} - -jboolean runWinamp(unsigned char* pathWinamp) { - - /* STARTUPINFO si; - PROCESS_INFORMATION pi;*/ - - ZeroMemory( &si, sizeof(si) ); - si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - - - // Start the child process. - if(!CreateProcess(pathWinamp, - NULL, - 0, - 0, - FALSE, - CREATE_NEW_CONSOLE, - 0, - 0, - &si, - &pi)) - { - return FALSE; - } - - DWORD dwResult = WaitForInputIdle(pi.hProcess,INFINITE); - if (dwResult != 0) return FALSE; - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - - return TRUE; - - -} - -int getListPos() { - - initWinampHandle(); - if (hwnd_winamp != NULL) { - - return SendMessage(hwnd_winamp,WM_USER,WA_NOTHING,WA_GETLISTPOS); - - } - return -1; - -} - -void getPluginMessage(int param, int sendMessage) -{ - - LPCVOID message = (LPCVOID)SendMessageW(hwnd_winamp, WM_USER, param, sendMessage); - ZeroMemory( &pi, sizeof(pi)); - GetWindowThreadProcessId(hwnd_winamp, &pi.dwThreadId); - pi.hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pi.dwThreadId); - ReadProcessMemory(pi.hProcess, message, messageReturn,2056,temp); - free(temp); - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_run - (JNIEnv *env, jobject obj) { - - initWinampHandle(); - - if ( hwnd_winamp == NULL ) { - - unsigned char path[MAX_PATH]=""; - DWORD size = MAX_PATH; - - HKEY key; - DWORD tipo; - - if (!RegOpenKey(HKEY_LOCAL_MACHINE,"Software\\Clients\\Media\\Winamp\\shell\\open\\command",&key)==ERROR_SUCCESS) - { - - printf("0"); - return FALSE; - - } - - if (!(RegQueryValueEx(key,"",NULL,&tipo,path,&size))==ERROR_SUCCESS) - { - - RegCloseKey(key); - return FALSE; - - } - - if (!runWinamp(path)) - { - - RegCloseKey(key); - return FALSE; - - } - return TRUE; - - } - - int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION); - return TRUE; - -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_exit - (JNIEnv *env, jobject obj) { - - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_CLOSE, WA_NOTHING); - return TRUE; - } - - return FALSE; - - -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_play - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - - SendMessageA(hwnd_winamp, WM_COMMAND, WA_PLAY, WA_NOTHING); - return TRUE; - - } - - return FALSE; -} - - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_stop - (JNIEnv *env, jobject obj) -{ - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_STOP, WA_NOTHING); - return TRUE; - } - - return FALSE; -} - - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_resume - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_PAUSE, WA_NOTHING); - return TRUE; - } - - return FALSE; -} - - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_pause - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_PAUSE, WA_NOTHING); - return TRUE; - } - - return FALSE; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_previousTrack - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_PREVTRACK, WA_NOTHING); - return TRUE; - } - - return FALSE; - -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_nextTrack - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_NEXTTRACK, WA_NOTHING); - return TRUE; - } - - return FALSE; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_fwd5Secs - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_FWD5SECS, WA_NOTHING); - return TRUE; - } - - return FALSE; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_rew5Secs - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_REW5SECS, WA_NOTHING); - return TRUE; - } - - return FALSE; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_increaseVolume - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_VOLUMEUP, WA_NOTHING); - return TRUE; - } - - return FALSE; - -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_decreaseVolume - (JNIEnv *env, jobject obj) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_COMMAND, WA_VOLUMEDOWN, WA_NOTHING); - return TRUE; - } - - return FALSE; - -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_increaseVolumePercent - (JNIEnv *env, jobject obj, jint percent) { - initWinampHandle(); - int i = 0; - if (hwnd_winamp != NULL) { - for(i=0;i0?1:0; -} - -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_isRepeatStatusOn - (JNIEnv *env, jobject obj) { - jint status = 0; - initWinampHandle(); - if (hwnd_winamp != NULL) { - status = (jint)SendMessageA(hwnd_winamp, WM_USER, WA_NOTHING, WA_GETREPEATSTATUS); - } else - return -1; - - return status>0?1:0; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_setRepeatStatusOn - (JNIEnv *env, jobject obj, jboolean status) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_USER, status, WA_SETREPEATSTATUS); - return TRUE; - } - - return FALSE; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_setShuffleStatusOn - (JNIEnv *env, jobject obj, jboolean status) { - initWinampHandle(); - if (hwnd_winamp != NULL) { - SendMessageA(hwnd_winamp, WM_USER, status, WA_SETSHUFFLESTATUS); - return TRUE; - } - - return FALSE; -} - -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_appendToPlayList - (JNIEnv *env, jobject obj, jstring mp3filename) { - initWinampHandle(); - jboolean iscopy; - if (hwnd_winamp != NULL) { - wMessageReturn = (wchar_t*)(*env)->GetStringChars(env, mp3filename, &iscopy); - int length = wcslen(wMessageReturn); - COPYDATASTRUCT cds; - cds.dwData = IPC_PLAYFILEW; - cds.lpData = (void*)wMessageReturn; - cds.cbData = length * 2 + 2 ; // it sums white space - - SendMessageW(hwnd_winamp, WM_COPYDATA, WA_NOTHING, (LPARAM)&cds); - return TRUE; - } - - return FALSE; - -} - -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getStatus - (JNIEnv *env, jobject obj) { - jint status = -1; - initWinampHandle(); - if (hwnd_winamp != NULL) { - status = SendMessageA(hwnd_winamp, WM_USER, WA_NOTHING, WA_GETSTATUS); - } - - return status; - - -} - -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getListPos - (JNIEnv *env, jobject obj) { - - return getListPos(); - -} - -JNIEXPORT jstring JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getTitle - (JNIEnv *env, jobject obj) { - - initWinampHandle(); - if (hwnd_winamp != NULL) { - - char title[500] = ""; - GetWindowText(hwnd_winamp,title,500); - return (*env)->NewStringUTF(env,title); - - - } - - return NULL; - -} - -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getTime - (JNIEnv *env, jobject obj, jint mode) { - - initWinampHandle(); - if (hwnd_winamp != NULL) { - - return SendMessage(hwnd_winamp,WM_USER,mode,IPC_GETOUTPUTTIME); - - } - - return -2; - -} - -JNIEXPORT jstring JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getFileNameInList - (JNIEnv *env, jobject obj, jint index) -{ - - initWinampHandle(); - - if (hwnd_winamp != NULL) { - - getPluginMessage(index, WA_FILENAMEINLIST); - char* filePath = messageReturn; - jstring strReturn = (*env)->NewStringUTF(env,filePath); - return strReturn; - - } - - return NULL; - -} - -JNIEXPORT jstring JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getFileNamePlaying - (JNIEnv *env, jobject obj) -{ - - initWinampHandle(); - - if (hwnd_winamp != NULL) { - - getPluginMessage(WA_NOTHING, IPC_GET_PLAYING_FILENAME); - wchar_t* fileName = (wchar_t*)messageReturn; - int length = wcslen(fileName); - jstring strReturn = (*env)->NewString(env,fileName,length); - return strReturn; - - } - - return NULL; - -} diff --git a/vendor/JavaWinampApi/1.1/cpp/WinampController.h b/vendor/JavaWinampApi/1.1/cpp/WinampController.h deleted file mode 100644 index 7f2ace1..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/WinampController.h +++ /dev/null @@ -1,285 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class WinampController */ - - -#ifndef _Included_WinampController -#define _Included_WinampController -#ifdef __cplusplus -extern "C" { -#endif - -void initWinampHandle(); - -jboolean runWinamp(unsigned char* pathWinamp); - -int getListPos(); - -void getPluginMessage(int param, int sendMessage); - -/* - * Class: WinampController - * Method: run - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_run - (JNIEnv *, jclass); -/* - * Class: WinampController - * Method: exit - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_exit - (JNIEnv *, jclass); -/* - * Class: WinampController - * Method: play - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_play - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: stop - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_stop - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: resume - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_resume - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: pause - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_pause - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: previousTrack - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_previousTrack - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: nextTrack - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_nextTrack - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: fwd5Secs - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_fwd5Secs - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: fwd5Secs - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_rew5Secs - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: increaseVolume - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_increaseVolume - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: decreaseVolume - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_decreaseVolume - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: increaseVolumePercent - * Signature: (I)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_increaseVolumePercent - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: decreaseVolumePercent - * Signature: (I)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_decreaseVolumePercent - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: setVolume - * Signature: (I)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_setVolume - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: setVolume - * Signature: (I)V - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getVolume - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: restart - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_restart - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: setPlaylistPosition - * Signature: (I)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_setPlaylistPosition - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: clearPlayList - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_clearPlayList - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: refreshPlayListCache - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_refreshPlayListCache - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: getPlayListLength - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getPlayListLength - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: writePlayListToFile - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_writePlayListToFile - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: isShuffleStatusOn - * Signature: ()Z - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_isShuffleStatusOn - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: isRepeatStatusOn - * Signature: ()Z - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_isRepeatStatusOn - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: setRepeatStatusOn - * Signature: (Z)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_setRepeatStatusOn - (JNIEnv *, jclass, jboolean); - -/* - * Class: WinampController - * Method: setShuffleStatusOn - * Signature: (Z)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_setShuffleStatusOn - (JNIEnv *, jclass, jboolean); - -/* - * Class: WinampController - * Method: appendToPlayList - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT jboolean JNICALL Java_com_qotsa_jni_controller_JNIWinamp_appendToPlayList - (JNIEnv *, jclass, jstring); - -/* - * Class: WinampController - * Method: getStatus - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getStatus - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: getListPos - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getListPos - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: getTitle - * Signature: ()I - */ -JNIEXPORT jstring JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getTitle - (JNIEnv *, jclass); - -/* - * Class: WinampController - * Method: getTime - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getTime - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: getFileNameInList - * Signature: ()I - */ -JNIEXPORT jstring JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getFileNameInList - (JNIEnv *, jclass, jint); - -/* - * Class: WinampController - * Method: getFileNamePlaying - * Signature: ()I - */ -JNIEXPORT jstring JNICALL Java_com_qotsa_jni_controller_JNIWinamp_getFileNamePlaying - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vendor/JavaWinampApi/1.1/cpp/cpy.bat b/vendor/JavaWinampApi/1.1/cpp/cpy.bat deleted file mode 100644 index 2abdf4a..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/cpy.bat +++ /dev/null @@ -1 +0,0 @@ -copy /y wpcom.dll c:\winnt\system32\ \ No newline at end of file diff --git a/vendor/JavaWinampApi/1.1/cpp/libwpcom.def b/vendor/JavaWinampApi/1.1/cpp/libwpcom.def deleted file mode 100644 index e17c91c..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/libwpcom.def +++ /dev/null @@ -1,58 +0,0 @@ -; dlltool --base-file C:\DOCUME~1\FRANCI~1\CONFIG~1\Temp/cca03628.base --output-exp wpcom.exp --dllname wpcom.dll --output-def libwpcom.def --no-export-all-symbols --add-stdcall-alias --exclude-symbol=DllMainCRTStartup@12 --def C:\DOCUME~1\FRANCI~1\CONFIG~1\Temp/cca03628.def --output-lib libwpcom.a -EXPORTS - Java_controller_JNIWinampController_appendToPlayList = Java_controller_JNIWinampController_appendToPlayList@12 @ 1 - Java_controller_JNIWinampController_appendToPlayList@12 @ 2 - Java_controller_JNIWinampController_clearPlayList = Java_controller_JNIWinampController_clearPlayList@8 @ 3 - Java_controller_JNIWinampController_clearPlayList@8 @ 4 - Java_controller_JNIWinampController_clearPlayListCache = Java_controller_JNIWinampController_clearPlayListCache@8 @ 5 - Java_controller_JNIWinampController_clearPlayListCache@8 @ 6 - Java_controller_JNIWinampController_decreaseVolume = Java_controller_JNIWinampController_decreaseVolume@8 @ 7 - Java_controller_JNIWinampController_decreaseVolume@8 @ 8 - Java_controller_JNIWinampController_decreaseVolumePercent = Java_controller_JNIWinampController_decreaseVolumePercent@12 @ 9 - Java_controller_JNIWinampController_decreaseVolumePercent@12 @ 10 - Java_controller_JNIWinampController_exit = Java_controller_JNIWinampController_exit@8 @ 11 - Java_controller_JNIWinampController_exit@8 @ 12 - Java_controller_JNIWinampController_getListPos = Java_controller_JNIWinampController_getListPos@8 @ 13 - Java_controller_JNIWinampController_getListPos@8 @ 14 - Java_controller_JNIWinampController_getPlayListLength = Java_controller_JNIWinampController_getPlayListLength@8 @ 15 - Java_controller_JNIWinampController_getPlayListLength@8 @ 16 - Java_controller_JNIWinampController_getSeconds = Java_controller_JNIWinampController_getSeconds@8 @ 17 - Java_controller_JNIWinampController_getSeconds@8 @ 18 - Java_controller_JNIWinampController_getStatus = Java_controller_JNIWinampController_getStatus@8 @ 19 - Java_controller_JNIWinampController_getStatus@8 @ 20 - Java_controller_JNIWinampController_getTitle = Java_controller_JNIWinampController_getTitle@8 @ 21 - Java_controller_JNIWinampController_getTitle@8 @ 22 - Java_controller_JNIWinampController_increaseVolume = Java_controller_JNIWinampController_increaseVolume@8 @ 23 - Java_controller_JNIWinampController_increaseVolume@8 @ 24 - Java_controller_JNIWinampController_increaseVolumePercent = Java_controller_JNIWinampController_increaseVolumePercent@12 @ 25 - Java_controller_JNIWinampController_increaseVolumePercent@12 @ 26 - Java_controller_JNIWinampController_isRepeatStatusOn = Java_controller_JNIWinampController_isRepeatStatusOn@8 @ 27 - Java_controller_JNIWinampController_isRepeatStatusOn@8 @ 28 - Java_controller_JNIWinampController_isShuffleStatusOn = Java_controller_JNIWinampController_isShuffleStatusOn@8 @ 29 - Java_controller_JNIWinampController_isShuffleStatusOn@8 @ 30 - Java_controller_JNIWinampController_nextTrack = Java_controller_JNIWinampController_nextTrack@8 @ 31 - Java_controller_JNIWinampController_nextTrack@8 @ 32 - Java_controller_JNIWinampController_pause = Java_controller_JNIWinampController_pause@8 @ 33 - Java_controller_JNIWinampController_pause@8 @ 34 - Java_controller_JNIWinampController_play = Java_controller_JNIWinampController_play@8 @ 35 - Java_controller_JNIWinampController_play@8 @ 36 - Java_controller_JNIWinampController_previousTrack = Java_controller_JNIWinampController_previousTrack@8 @ 37 - Java_controller_JNIWinampController_previousTrack@8 @ 38 - Java_controller_JNIWinampController_restart = Java_controller_JNIWinampController_restart@8 @ 39 - Java_controller_JNIWinampController_restart@8 @ 40 - Java_controller_JNIWinampController_resume = Java_controller_JNIWinampController_resume@8 @ 41 - Java_controller_JNIWinampController_resume@8 @ 42 - Java_controller_JNIWinampController_run = Java_controller_JNIWinampController_run@8 @ 43 - Java_controller_JNIWinampController_run@8 @ 44 - Java_controller_JNIWinampController_setPlaylistPosition = Java_controller_JNIWinampController_setPlaylistPosition@12 @ 45 - Java_controller_JNIWinampController_setPlaylistPosition@12 @ 46 - Java_controller_JNIWinampController_setRepeatStatusOn = Java_controller_JNIWinampController_setRepeatStatusOn@12 @ 47 - Java_controller_JNIWinampController_setRepeatStatusOn@12 @ 48 - Java_controller_JNIWinampController_setShuffleStatusOn = Java_controller_JNIWinampController_setShuffleStatusOn@12 @ 49 - Java_controller_JNIWinampController_setShuffleStatusOn@12 @ 50 - Java_controller_JNIWinampController_setVolume = Java_controller_JNIWinampController_setVolume@12 @ 51 - Java_controller_JNIWinampController_setVolume@12 @ 52 - Java_controller_JNIWinampController_stop = Java_controller_JNIWinampController_stop@8 @ 53 - Java_controller_JNIWinampController_stop@8 @ 54 - Java_controller_JNIWinampController_writePlayListToFile = Java_controller_JNIWinampController_writePlayListToFile@8 @ 55 - Java_controller_JNIWinampController_writePlayListToFile@8 @ 56 diff --git a/vendor/JavaWinampApi/1.1/cpp/wa_ipc.h b/vendor/JavaWinampApi/1.1/cpp/wa_ipc.h deleted file mode 100644 index 8bc8402..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/wa_ipc.h +++ /dev/null @@ -1,1620 +0,0 @@ -/* -** Copyright (C) 2006 Nullsoft, Inc. -** -** This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held -** liable for any damages arising from the use of this software. -** -** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to -** alter it and redistribute it freely, subject to the following restrictions: -** -** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. -** If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -** -** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -** -** 3. This notice may not be removed or altered from any source distribution. -** -*/ - -#ifndef _WA_IPC_H_ -#define _WA_IPC_H_ - -#include -#include -#if (_MSC_VER <= 1200) -typedef int intptr_t; -#endif -/* -** This is the modern replacement for the classic 'frontend.h'. Most of these -** updates are designed for in-process use, i.e. from a plugin. -** -*/ - -/* message used to sent many messages to winamp's main window. -** most all of the IPC_* messages involve sending the message in the form of: -** result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*); -** -** When you use SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*) and specify a IPC_* -** which is not currently implemented/supported by the Winamp version being used then it -** will return 1 for 'result'. This is a good way of helping to check if an api being -** used which returns a function pointer, etc is even going to be valid. -*/ -#define WM_WA_IPC WM_USER -/* but some of them use WM_COPYDATA. be afraid. -*/ - -#define WINAMP_VERSION_MAJOR(winampVersion) ((winampVersion & 0x0000FF00) >> 12) -#define WINAMP_VERSION_MINOR(winampVersion) (winampVersion & 0x000000FF) // returns, i.e. 0x12 for 5.12 and 0x10 for 5.1... - -#define IPC_GETVERSION 0 -/* int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION); -** -** The version returned will be 0x20yx for Winamp 2.yx. -** Versions previous to Winamp 2.0 typically (but not always) use 0x1zyx for 1.zx. -** Just a bit weird but that's the way it goes. -** -** For Winamp 5.x it uses the format 0x50yx for Winamp 5.yx -** e.g. 5.01 -> 0x5001 -** 5.09 -> 0x5009 -** 5.1 -> 0x5010 -** -** Notes: For 5.02 this api will return the same value as for a 5.01 build. -** For 5.07 this api will return the same value as for a 5.06 build. -*/ -#define IPC_GETVERSIONSTRING 1 - -#define IPC_GETREGISTEREDVERSION 770 - - -typedef struct { - const char *filename; - const char *title; - int length; -} enqueueFileWithMetaStruct; // send this to a IPC_PLAYFILE in a non WM_COPYDATA, -// and you get the nice desired result. if title is NULL, it is treated as a "thing", -// otherwise it's assumed to be a file (for speed) - -typedef struct { - const wchar_t *filename; - const wchar_t *title; - int length; -} enqueueFileWithMetaStructW; - -#define IPC_PLAYFILE 100 // dont be fooled, this is really the same as enqueufile -#define IPC_ENQUEUEFILE 100 -#define IPC_PLAYFILEW 1100 -/* This is sent as a WM_COPYDATA with IPC_PLAYFILE as the dwData member and the string -** of the file / playlist to be enqueued into the playlist editor as the lpData member. -** This will just enqueue the file or files since you can use this to enqueue a playlist. -** It will not clear the current playlist or change the playback state. -** -** COPYDATASTRUCT cds = {0}; -** cds.dwData = IPC_ENQUEUEFILE; -** cds.lpData = (void*)"c:\\test\\folder\\test.mp3"; -** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char -** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds); -** -** -** With 2.9+ and all of the 5.x versions you can send this as a normal WM_WA_IPC -** (non WM_COPYDATA) with an enqueueFileWithMetaStruct as the param. -** If the title member is null then it is treated as a "thing" otherwise it will be -** assumed to be a file (for speed). -** -** enqueueFileWithMetaStruct eFWMS = {0}; -** eFWMS.filename = "c:\\test\\folder\\test.mp3"; -** eFWMS.title = "Whipping Good"; -** eFWMS.length = 300; // this is the number of seconds for the track -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&eFWMS,IPC_ENQUEUEFILE); -*/ - - -#define IPC_DELETE 101 -#define IPC_DELETE_INT 1101 -/* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_DELETE); -** Use this api to clear Winamp's internal playlist. -** You should not need to use IPC_DELETE_INT since it is used internally by Winamp when -** it is dealing with some lame Windows Explorer issues (hard to believe that!). -*/ - - -#define IPC_STARTPLAY 102 -#define IPC_STARTPLAY_INT 1102 -/* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_STARTPLAY); -** Sending this will start playback and is almost the same as hitting the play button. -** The IPC_STARTPLAY_INT version is used internally and you should not need to use it -** since it won't be any fun. -*/ - -#define IPC_CHDIR 103 -/* This is sent as a WM_COPYDATA type message with IPC_CHDIR as the dwData value and the -** directory you want to change to as the lpData member. -** -** COPYDATASTRUCT cds = {0}; -** cds.dwData = IPC_CHDIR; -** cds.lpData = (void*)"c:\\download"; -** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char -** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds); -** -** The above example will make Winamp change to the directory 'C:\download'. -*/ - - -#define IPC_ISPLAYING 104 -/* int res = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING); -** This is sent to retrieve the current playback state of Winamp. -** If it returns 1, Winamp is playing. -** If it returns 3, Winamp is paused. -** If it returns 0, Winamp is not playing. -*/ - - -#define IPC_GETOUTPUTTIME 105 -/* int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME); -** This api can return two different sets of information about current playback status. -** -** If mode = 0 then it will return the position (in ms) of the currently playing track. -** Will return -1 if Winamp is not playing. -** -** If mode = 1 then it will return the current track length (in seconds). -** Will return -1 if there are no tracks (or possibly if Winamp cannot get the length). -*/ - - - -#define IPC_JUMPTOTIME 106 -/* (requires Winamp 1.60+) -** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME); -** This api sets the current position (in milliseconds) for the currently playing song. -** The resulting playback position may only be an approximate time since some playback -** formats do not provide exact seeking e.g. mp3 -** This returns -1 if Winamp is not playing, 1 on end of file, or 0 if it was successful. -*/ - -#define IPC_GETMODULENAME 109 -#define IPC_EX_ISRIGHTEXE 666 -/* usually shouldnt bother using these, but here goes: -** send a WM_COPYDATA with IPC_GETMODULENAME, and an internal -** flag gets set, which if you send a normal WM_WA_IPC message with -** IPC_EX_ISRIGHTEXE, it returns whether or not that filename -** matches. lame, I know. -*/ - -#define IPC_WRITEPLAYLIST 120 -/* (requires Winamp 1.666+) -** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST); -** -** IPC_WRITEPLAYLIST will write the current playlist to '\\Winamp.m3u' and -** will also return the current playlist position (see IPC_GETLISTPOS). -** -** This is kinda obsoleted by some of the newer 2.x api items but it still is good for -** use with a front-end program (instead of a plug-in) and you want to see what is in the -** current playlist. -** -** This api will only save out extended file information in the #EXTINF entry if Winamp -** has already read the data such as if the file was played of scrolled into view. If -** Winamp has not read the data then you will only find the file with its filepath entry -** (as is the base requirements for a m3u playlist). -*/ - - -#define IPC_SETPLAYLISTPOS 121 -/* (requires Winamp 2.0+) -** SendMessage(hwnd_winamp,WM_WA_IPC,position,IPC_SETPLAYLISTPOS) -** IPC_SETPLAYLISTPOS sets the playlist position to the specified 'position'. -** It will not change playback status or anything else. It will just set the current -** position in the playlist and will update the playlist view if necessary. -** -** If you use SendMessage(hwnd_winamp,WM_COMMAND,MAKEWPARAM(WINAMP_BUTTON2,0),0); -** after using IPC_SETPLAYLISTPOS then Winamp will start playing the file at 'position'. -*/ - - -#define IPC_SETVOLUME 122 -/* (requires Winamp 2.0+) -** SendMessage(hwnd_winamp,WM_WA_IPC,volume,IPC_SETVOLUME); -** IPC_SETVOLUME sets the volume of Winamp (between the range of 0 to 255). -** -** If you pass 'volume' as -666 then the message will return the current volume. -** int curvol = SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETVOLUME); -*/ - - -#define IPC_SETPANNING 123 -/* (requires Winamp 2.0+) -** SendMessage(hwnd_winamp,WM_WA_IPC,panning,IPC_SETPANNING); -** IPC_SETPANNING sets the panning of Winamp from 0 (left) to 255 (right). -** -** At least in 5.x+ this works from -127 (left) to 127 (right). -** -** If you pass 'panning' as -666 to this api then it will return the current panning. -** int curpan = SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETPANNING); -*/ - - -#define IPC_GETLISTLENGTH 124 -/* (requires Winamp 2.0+) -** int length = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTLENGTH); -** IPC_GETLISTLENGTH returns the length of the current playlist as the number of tracks. -*/ - - -#define IPC_GETLISTPOS 125 -/* (requires Winamp 2.05+) -** int pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS); -** IPC_GETLISTPOS returns the current playlist position (which is shown in the playlist -** editor as a differently coloured text entry e.g is yellow for the classic skin). -** -** This api is a lot like IPC_WRITEPLAYLIST but a lot faster since it does not have to -** write out the whole of the current playlist first. -*/ - - -#define IPC_GETINFO 126 -/* (requires Winamp 2.05+) -** int inf=SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETINFO); -** IPC_GETINFO returns info about the current playing song. The value -** it returns depends on the value of 'mode'. -** Mode Meaning -** ------------------ -** 0 Samplerate, in kilohertz (i.e. 44) -** 1 Bitrate (i.e. 128) -** 2 Channels (i.e. 2) -** 3 (5+) Video LOWORD=w HIWORD=h -** 4 (5+) > 65536, string (video description) -** 5 (5.25+) Samplerate, in hertz (i.e. 44100) -*/ - - -#define IPC_GETEQDATA 127 -/* (requires Winamp 2.05+) -** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA); -** IPC_GETEQDATA queries the status of the EQ. -** The value returned depends on what 'pos' is set to: -** Value Meaning -** ------------------ -** 0-9 The 10 bands of EQ data. 0-63 (+20db - -20db) -** 10 The preamp value. 0-63 (+20db - -20db) -** 11 Enabled. zero if disabled, nonzero if enabled. -** 12 Autoload. zero if disabled, nonzero if enabled. -*/ - - -#define IPC_SETEQDATA 128 -/* (requires Winamp 2.05+) -** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA); -** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETEQDATA); -** IPC_SETEQDATA sets the value of the last position retrieved -** by IPC_GETEQDATA. This is pretty lame, and we should provide -** an extended version that lets you do a MAKELPARAM(pos,value). -** someday... - - new (2.92+): - if the high byte is set to 0xDB, then the third byte specifies - which band, and the bottom word specifies the value. -*/ - -#define IPC_ADDBOOKMARK 129 -#define IPC_ADDBOOKMARKW 131 -/* (requires Winamp 2.4+) -** This is sent as a WM_COPYDATA using IPC_ADDBOOKMARK as the dwData value and the -** directory you want to change to as the lpData member. This will add the specified -** file / url to the Winamp bookmark list. -** -** COPYDATASTRUCT cds = {0}; -** cds.dwData = IPC_ADDBOOKMARK; -** cds.lpData = (void*)"http://www.blah.com/listen.pls"; -** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char -** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds); -** -** -** In Winamp 5.0+ we use this as a normal WM_WA_IPC and the string is null separated as -** the filename and then the title of the entry. -** -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(char*)"filename\0title\0",IPC_ADDBOOKMARK); -** -** This will notify the library / bookmark editor that a bookmark was added. -** Note that using this message in this context does not actually add the bookmark. -** Do not use, it is essentially just a notification type message :) -*/ - - -#define IPC_INSTALLPLUGIN 130 -/* This is not implemented (and is very unlikely to be done due to safety concerns). -** If it was then you could do a WM_COPYDATA with a path to a .wpz and it would then -** install the plugin for you. -** -** COPYDATASTRUCT cds = {0}; -** cds.dwData = IPC_INSTALLPLUGIN; -** cds.lpData = (void*)"c:\\path\\to\\file.wpz"; -** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char -** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds); -*/ - - -#define IPC_RESTARTWINAMP 135 -/* (requires Winamp 2.2+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_RESTARTWINAMP); -** IPC_RESTARTWINAMP will restart Winamp (isn't that obvious ? :) ) -** If this fails to make Winamp start after closing then there is a good chance one (or -** more) of the currently installed plugins caused Winamp to crash on exit (either as a -** silent crash or a full crash log report before it could call itself start again. -*/ - - -#define IPC_ISFULLSTOP 400 -/* (requires winamp 2.7+ I think) -** int ret=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISFULLSTOP); -** This is useful for when you're an output plugin and you want to see if the stop/close -** happening is a full stop or if you are just between tracks. This returns non zero if -** it is a full stop or zero if it is just a new track. -*/ - - -#define IPC_INETAVAILABLE 242 -/* (requires Winamp 2.05+) -** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INETAVAILABLE); -** IPC_INETAVAILABLE will return 1 if an Internet connection is available for Winamp and -** relates to the internet connection type setting on the main general preferences page -** in the Winamp preferences. -*/ - - -#define IPC_UPDTITLE 243 -/* (requires Winamp 2.2+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_UPDTITLE); -** IPC_UPDTITLE will ask Winamp to update the information about the current title and -** causes GetFileInfo(..) in the input plugin associated with the current playlist entry -** to be called. This can be called such as when an input plugin is buffering a file so -** that it can cause the buffer percentage to appear in the playlist. -*/ - - -#define IPC_REFRESHPLCACHE 247 -/* (requires Winamp 2.2+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REFRESHPLCACHE); -** IPC_REFRESHPLCACHE will flush the playlist cache buffer and you send this if you want -** Winamp to go refetch the titles for all of the entries in the current playlist. - -5.3+: pass a wchar_t * string in wParam, and it'll do a strnicmp() before clearing the cache -*/ - - -#define IPC_GET_SHUFFLE 250 -/* (requires Winamp 2.4+) -** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE); -** IPC_GET_SHUFFLE returns the status of the shuffle option. -** If set then it will return 1 and if not set then it will return 0. -*/ - - -#define IPC_GET_REPEAT 251 -/* (requires Winamp 2.4+) -** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_REPEAT); -** IPC_GET_REPEAT returns the status of the repeat option. -** If set then it will return 1 and if not set then it will return 0. -*/ - - -#define IPC_SET_SHUFFLE 252 -/* (requires Winamp 2.4+) -** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_SHUFFLE); -** IPC_SET_SHUFFLE sets the status of the shuffle option. -** If 'value' is 1 then shuffle is turned on. -** If 'value' is 0 then shuffle is turned off. -*/ - - -#define IPC_SET_REPEAT 253 -/* (requires Winamp 2.4+) -** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_REPEAT); -** IPC_SET_REPEAT sets the status of the repeat option. -** If 'value' is 1 then shuffle is turned on. -** If 'value' is 0 then shuffle is turned off. -*/ - - -#define IPC_ENABLEDISABLE_ALL_WINDOWS 259 // 0xdeadbeef to disable -/* (requires Winamp 2.9+) -** SendMessage(hwnd_winamp,WM_WA_IPC,(enable?0:0xdeadbeef),IPC_ENABLEDISABLE_ALL_WINDOWS); -** Sending this message with 0xdeadbeef as the param will disable all winamp windows and -** any other values will enable all of the Winamp windows again. When disabled you won't -** get any response on clicking or trying to do anything to the Winamp windows. If the -** taskbar icon is shown then you may still have control ;) -*/ - - -#define IPC_GETWND 260 -/* (requires Winamp 2.9+) -** HWND h=SendMessage(hwnd_winamp,WM_WA_IPC,IPC_GETWND_xxx,IPC_GETWND); -** returns the HWND of the window specified. -*/ - #define IPC_GETWND_EQ 0 // use one of these for the param - #define IPC_GETWND_PE 1 - #define IPC_GETWND_MB 2 - #define IPC_GETWND_VIDEO 3 -#define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND - - - - -/************************************************************************ -***************** in-process only (WE LOVE PLUGINS) -************************************************************************/ - -#define IPC_SETSKINW 199 -#define IPC_SETSKIN 200 -/* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"skinname",IPC_SETSKIN); -** IPC_SETSKIN sets the current skin to "skinname". Note that skinname -** can be the name of a skin, a skin .zip file, with or without path. -** If path isn't specified, the default search path is the winamp skins -** directory. -*/ - - -#define IPC_GETSKIN 201 -/* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)skinname_buffer,IPC_GETSKIN); -** IPC_GETSKIN puts the directory where skin bitmaps can be found -** into skinname_buffer. -** skinname_buffer must be MAX_PATH characters in length. -** When using a .zip'd skin file, it'll return a temporary directory -** where the ZIP was decompressed. -*/ - - -#define IPC_EXECPLUG 202 -/* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"vis_file.dll",IPC_EXECPLUG); -** IPC_EXECPLUG executes a visualization plug-in pointed to by WPARAM. -** the format of this string can be: -** "vis_whatever.dll" -** "vis_whatever.dll,0" // (first mod, file in winamp plug-in dir) -** "C:\\dir\\vis_whatever.dll,1" -*/ - - -#define IPC_GETPLAYLISTFILE 211 -#define IPC_GETPLAYLISTFILEW 214 -/* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) -** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE); -** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index]. -** returns a pointer to it. returns NULL on error. -*/ - - -#define IPC_GETPLAYLISTTITLE 212 -#define IPC_GETPLAYLISTTITLEW 213 -/* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) -** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE); -** -** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index]. -** returns a pointer to it. returns NULL on error. -*/ - - -#define IPC_GETHTTPGETTER 240 -/* retrieves a function pointer to a HTTP retrieval function. -** if this is unsupported, returns 1 or 0. -** the function should be: -** int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle); -** if you call this function, with a parent window, a URL, an output file, and a dialog title, -** it will return 0 on successful download, 1 on error. -*/ - - -#define IPC_MBOPEN 241 -/* (requires Winamp 2.05+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_MBOPEN); -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPEN); -** IPC_MBOPEN will open a new URL in the minibrowser. if url is NULL, it will open the Minibrowser window. -*/ - - - -#define IPC_CHANGECURRENTFILE 245 -/* (requires Winamp 2.05+) -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILE); -** IPC_CHANGECURRENTFILE will set the current playlist item. -*/ - -#define IPC_CHANGECURRENTFILEW 1245 -/* (requires Winamp 2.05+) -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILEW); -** IPC_CHANGECURRENTFILEW will set the current playlist item. -*/ - - -#define IPC_GETMBURL 246 -/* (requires Winamp 2.2+) -** char buffer[4096]; // Urls can be VERY long -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)buffer,IPC_GETMBURL); -** IPC_GETMBURL will retrieve the current Minibrowser URL into buffer. -** buffer must be at least 4096 bytes long. -*/ - - -#define IPC_MBBLOCK 248 -/* (requires Winamp 2.4+) -** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_MBBLOCK); -** -** IPC_MBBLOCK will block the Minibrowser from updates if value is set to 1 -*/ - -#define IPC_MBOPENREAL 249 -/* (requires Winamp 2.4+) -** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPENREAL); -** -** IPC_MBOPENREAL works the same as IPC_MBOPEN except that it will works even if -** IPC_MBBLOCK has been set to 1 -*/ - -#define IPC_ADJUST_OPTIONSMENUPOS 280 -/* (requires Winamp 2.9+) -** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_OPTIONSMENUPOS); -** moves where winamp expects the Options menu in the main menu. Useful if you wish to insert a -** menu item above the options/skins/vis menus. -*/ - -#define IPC_GET_HMENU 281 -/* (requires Winamp 2.9+) -** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU); -** values for data: -** 0 : main popup menu -** 1 : main menubar file menu -** 2 : main menubar options menu -** 3 : main menubar windows menu -** 4 : main menubar help menu -** other values will return NULL. -*/ - -#define IPC_GET_EXTENDED_FILE_INFO 290 //pass a pointer to the following struct in wParam -#define IPC_GET_EXTENDED_FILE_INFO_HOOKABLE 296 -/* (requires Winamp 2.9+) -** to use, create an extendedFileInfoStruct, point the values filename and metadata to the -** filename and metadata field you wish to query, and ret to a buffer, with retlen to the -** length of that buffer, and then SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_GET_EXTENDED_FILE_INFO); -** the results should be in the buffer pointed to by ret. -** returns 1 if the decoder supports a getExtendedFileInfo method -*/ -typedef struct { - const char *filename; - const char *metadata; - char *ret; - size_t retlen; -} extendedFileInfoStruct; - - -#define IPC_GET_BASIC_FILE_INFO 291 //pass a pointer to the following struct in wParam -typedef struct { - const char *filename; - - int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used) - - // filled in by winamp - int length; - char *title; - int titlelen; -} basicFileInfoStruct; - -#define IPC_GET_BASIC_FILE_INFOW 1291 //pass a pointer to the following struct in wParam -typedef struct { - const wchar_t *filename; - - int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used) - - // filled in by winamp - int length; - wchar_t *title; - int titlelen; -} basicFileInfoStructW; - - -#define IPC_GET_EXTLIST 292 //returns doublenull delimited. GlobalFree() it when done. if data is 0, returns raw extlist, if 1, returns something suitable for getopenfilename -#define IPC_GET_EXTLISTW 1292 // wide char version of above - -#define IPC_INFOBOX 293 -typedef struct { - HWND parent; - char *filename; -} infoBoxParam; - -#define IPC_INFOBOXW 1293 -typedef struct { - HWND parent; - const wchar_t *filename; -} infoBoxParamW; - -#define IPC_SET_EXTENDED_FILE_INFO 294 //pass a pointer to the a extendedFileInfoStruct in wParam -/* (requires Winamp 2.9+) -** to use, create an extendedFileInfoStruct, point the values filename and metadata to the -** filename and metadata field you wish to write in ret. (retlen is not used). and then -** SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_SET_EXTENDED_FILE_INFO); -** returns 1 if the metadata is supported -** Call IPC_WRITE_EXTENDED_FILE_INFO once you're done setting all the metadata you want to update -*/ - -#define IPC_WRITE_EXTENDED_FILE_INFO 295 -/* (requires Winamp 2.9+) -** writes all the metadata set thru IPC_SET_EXTENDED_FILE_INFO to the file -** returns 1 if the file has been successfully updated, 0 if error -*/ - -#define IPC_FORMAT_TITLE 297 -typedef struct -{ - char *spec; // NULL=default winamp spec - void *p; - - char *out; - int out_len; - - char * (*TAGFUNC)(const char * tag, void * p); //return 0 if not found - void (*TAGFREEFUNC)(char * tag,void * p); -} waFormatTitle; - -#define IPC_FORMAT_TITLE_EXTENDED 298 // similiar to IPC_FORMAT_TITLE, but falls back to Winamp's %tags% if your passed tag function doesn't handle it -typedef struct -{ - const wchar_t *filename; - int useExtendedInfo; // set to 1 if you want the Title Formatter to query the input plugins for any tags that your tag function fails on - const wchar_t *spec; // NULL=default winamp spec - void *p; - - wchar_t *out; - int out_len; - - wchar_t * (*TAGFUNC)(const wchar_t * tag, void * p); //return 0 if not found, -1 for empty tag - void (*TAGFREEFUNC)(wchar_t *tag, void *p); -} waFormatTitleExtended; - -#define IPC_COPY_EXTENDED_FILE_INFO 299 -typedef struct -{ - const char *source; - const char *dest; -} copyFileInfoStruct; - -#define IPC_COPY_EXTENDED_FILE_INFOW 1299 -typedef struct -{ - const wchar_t *source; - const wchar_t *dest; -} copyFileInfoStructW; - - -#define IPC_GETUNCOMPRESSINTERFACE 331 -/* returns a function pointer to uncompress(). -** int (*uncompress)(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen); -** right out of zlib, useful for decompressing zlibbed data. -** if you pass the parm of 0x10100000, it will return a wa_inflate_struct * to an inflate API. -*/ - -typedef struct { - int (*inflateReset)(void *strm); - int (*inflateInit_)(void *strm,const char *version, int stream_size); - int (*inflate)(void *strm, int flush); - int (*inflateEnd)(void *strm); - unsigned long (*crc32)(unsigned long crc, const unsigned char *buf, unsigned int len); -} wa_inflate_struct; - - -#define IPC_ADD_PREFS_DLG 332 -#define IPC_REMOVE_PREFS_DLG 333 -/* (requires Winamp 2.9+) -** to use, allocate a prefsDlgRec structure (either on the heap or some global -** data, but NOT on the stack), initialze the members: -** hInst to the DLL instance where the resource is located -** dlgID to the ID of the dialog, -** proc to the window procedure for the dialog -** name to the name of the prefs page in the prefs. -** where to 0 (eventually we may add more options) -** then, SendMessage(hwnd_winamp,WM_WA_IPC,&prefsRec,IPC_ADD_PREFS_DLG); -** -** you can also IPC_REMOVE_PREFS_DLG with the address of the same prefsRec, -** but you shouldn't really ever have to. -** -*/ -#define IPC_OPENPREFSTOPAGE 380 // pass an id of a builtin page, or a &prefsDlgRec of prefs page to open - -typedef struct _prefsDlgRec { - HINSTANCE hInst; - int dlgID; - void *proc; - - char *name; - intptr_t where; // 0 for options, 1 for plugins, 2 for skins, 3 for bookmarks, 4 for prefs - - intptr_t _id; - struct _prefsDlgRec *next; -} prefsDlgRec; - - -#define IPC_GETINIFILE 334 // returns a pointer to winamp.ini -#define IPC_GETINIDIRECTORY 335 // returns a pointer to the directory to put config files in (if you dont want to use winamp.ini) -#define IPC_GETPLUGINDIRECTORY 336 -#define IPC_GETM3UDIRECTORY 337 // returns a char pointer to the directory where winamp.m3u is stored in. -#define IPC_GETM3UDIRECTORYW 338 // returns a wchar_t pointer to the directory where winamp.m3u is stored in. - -#define IPC_SPAWNBUTTONPOPUP 361 // param = -// 0 = eject -// 1 = previous -// 2 = next -// 3 = pause -// 4 = play -// 5 = stop - -#define IPC_OPENURLBOX 360 // pass a HWND to a parent, returns a HGLOBAL that needs to be freed with GlobalFree(), if successful -#define IPC_OPENFILEBOX 362 // pass a HWND to a parent -#define IPC_OPENDIRBOX 363 // pass a HWND to a parent - -// pass an HWND to a parent. call this if you take over the whole UI so that the dialogs are not appearing on the -// bottom right of the screen since the main winamp window is at 3000x3000, call again with NULL to reset -#define IPC_SETDIALOGBOXPARENT 364 - - - -#define IPC_DRO_MIN 401 // reserved for DrO -#define IPC_SET_JTF_COMPARATOR 409 -/* pass me an int (__cdecl *)(const char *, const char *) in wParam */ -#define IPC_SET_JTF_COMPARATOR_W 410 -/* pass me an int (__cdecl *)(const wchar_t *, const wchar_t *) in wParam ... maybe someday :) */ -#define IPC_SET_JTF_DRAWTEXT 416 - -#define IPC_DRO_MAX 499 - - -// pass 0 for a copy of the skin HBITMAP -// pass 1 for name of font to use for playlist editor likeness -// pass 2 for font charset -// pass 3 for font size -#define IPC_GET_GENSKINBITMAP 503 - - -#define IPC_GET_EMBEDIF 505 // pass an embedWindowState -// returns an HWND embedWindow(embedWindowState *); if the data is NULL, otherwise returns the HWND directly -typedef struct -{ - HWND me; //hwnd of the window - - int flags; - - RECT r; - - void *user_ptr; // for application use - - intptr_t extra_data[64]; // for internal winamp use -} embedWindowState; - -#define EMBED_FLAGS_NORESIZE 0x1 // set this bit in embedWindowState.flags to keep window from being resizable -#define EMBED_FLAGS_NOTRANSPARENCY 0x2 // set this bit in embedWindowState.flags to make gen_ff turn transparency off for this wnd -#define EMBED_FLAGS_NOWINDOWMENU 0x4 // set this bit to prevent gen_ff from automatically adding your window to the right-click menu -#define EMBED_FLAGS_GUID 0x8 // call SET_EMBED_GUID(yourEmbedWindowStateStruct, GUID) to define a GUID for this window - -#define SET_EMBED_GUID(windowState, windowGUID) { windowState->flags |= EMBED_FLAGS_GUID; *((GUID *)&windowState->extra_data[4])=windowGUID; } -#define GET_EMBED_GUID(windowState) (*((GUID *)&windowState->extra_data[4])) - -#define IPC_EMBED_ENUM 532 -typedef struct embedEnumStruct -{ - int (*enumProc)(embedWindowState *ws, struct embedEnumStruct *param); // return 1 to abort - int user_data; // or more :) -} embedEnumStruct; - // pass - -#define IPC_EMBED_ISVALID 533 - -#define IPC_CONVERTFILE 506 -/* (requires Winamp 2.92+) -** Converts a given file to a different format (PCM, MP3, etc...) -** To use, pass a pointer to a waFileConvertStruct struct -** This struct can be either on the heap or some global -** data, but NOT on the stack. At least, until the conversion is done. -** -** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE); -** -** Return value: -** 0: Can't start the conversion. Look at myConvertStruct->error for details. -** 1: Conversion started. Status messages will be sent to the specified callbackhwnd. -** Be sure to call IPC_CONVERTFILE_END when your callback window receives the -** IPC_CB_CONVERT_DONE message. -*/ -typedef struct -{ - char *sourcefile; // "c:\\source.mp3" - char *destfile; // "c:\\dest.pcm" - int destformat[8]; // like 'PCM ',srate,nch,bps. - //hack alert! you can set destformat[6]=mmioFOURCC('I','N','I',' '); and destformat[7]=(int)my_ini_file; (where my_ini_file is a char*) - HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages - - //filled in by winamp.exe - char *error; //if IPC_CONVERTFILE returns 0, the reason will be here - - int bytes_done; //you can look at both of these values for speed statistics - int bytes_total; - int bytes_out; - - int killswitch; // don't set it manually, use IPC_CONVERTFILE_END - intptr_t extra_data[64]; // for internal winamp use -} convertFileStruct; - -#define IPC_CONVERTFILE_END 507 -/* (requires Winamp 2.92+) -** Stop/ends a convert process started from IPC_CONVERTFILE -** You need to call this when you receive the IPC_CB_CONVERTDONE message or when you -** want to abort a conversion process -** -** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE_END); -** -** No return value -*/ - -typedef struct { - HWND hwndParent; - int format; - - //filled in by winamp.exe - HWND hwndConfig; - int extra_data[8]; - //hack alert! you can set extra_data[6]=mmioFOURCC('I','N','I',' '); and extra_data[7]=(int)my_ini_file; (where my_ini_file is a char*) -} convertConfigStruct; -#define IPC_CONVERT_CONFIG 508 -#define IPC_CONVERT_CONFIG_END 509 - -typedef struct -{ - void (*enumProc)(intptr_t user_data, const char *desc, int fourcc); - intptr_t user_data; -} converterEnumFmtStruct; -#define IPC_CONVERT_CONFIG_ENUMFMTS 510 -/* (requires Winamp 2.92+) -*/ - -typedef struct -{ - char cdletter; - char *playlist_file; - HWND callback_hwnd; - - //filled in by winamp.exe - char *error; -} burnCDStruct; -#define IPC_BURN_CD 511 -/* (requires Winamp 5.0+) -*/ - -typedef struct -{ - convertFileStruct *cfs; - int priority; -} convertSetPriority; -#define IPC_CONVERT_SET_PRIORITY 512 - -typedef struct -{ - unsigned int format; //fourcc value - char *item; // config item, eg "bitrate" - char *data; // buffer to recieve, or buffer that contains the data - int len; // length of the data buffer (only used when getting a config item) - char *configfile; // config file to read from -} convertConfigItem; - -#define IPC_CONVERT_CONFIG_SET_ITEM 513 // returns TRUE if successful -#define IPC_CONVERT_CONFIG_GET_ITEM 514 // returns TRUE if successful - -typedef struct -{ - const char *filename; - char *title; // 2048 bytes - int length; - int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit -} waHookTitleStruct; -// return TRUE if you hook this -#define IPC_HOOK_TITLES 850 - -typedef struct -{ - const wchar_t *filename; - wchar_t *title; // 2048 bytes - int length; - int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit -} waHookTitleStructW; -// return TRUE if you hook this -#define IPC_HOOK_TITLESW 851 - -#define IPC_GETSADATAFUNC 800 -// 0: returns a char *export_sa_get() that returns 150 bytes of data -// 1: returns a export_sa_setreq(int want); - -#define IPC_GETVUDATAFUNC 801 -// 0: returns a int export_vu_get(int channel) that returns 0-255 (or -1 for bad channel) - -#define IPC_ISMAINWNDVISIBLE 900 - - -#define IPC_SETPLEDITCOLORS 920 -typedef struct -{ - int numElems; - int *elems; - HBITMAP bm; // set if you want to override -} waSetPlColorsStruct; - - -// the following IPC use waSpawnMenuParms as parameter -#define IPC_SPAWNEQPRESETMENU 933 -#define IPC_SPAWNFILEMENU 934 //menubar -#define IPC_SPAWNOPTIONSMENU 935 //menubar -#define IPC_SPAWNWINDOWSMENU 936 //menubar -#define IPC_SPAWNHELPMENU 937 //menubar -#define IPC_SPAWNPLAYMENU 938 //menubar -#define IPC_SPAWNPEFILEMENU 939 //menubar -#define IPC_SPAWNPEPLAYLISTMENU 940 //menubar -#define IPC_SPAWNPESORTMENU 941 //menubar -#define IPC_SPAWNPEHELPMENU 942 //menubar -#define IPC_SPAWNMLFILEMENU 943 //menubar -#define IPC_SPAWNMLVIEWMENU 944 //menubar -#define IPC_SPAWNMLHELPMENU 945 //menubar -#define IPC_SPAWNPELISTOFPLAYLISTS 946 - -typedef struct -{ - HWND wnd; - int xpos; // in screen coordinates - int ypos; -} waSpawnMenuParms; - -// waSpawnMenuParms2 is used by the menubar submenus -typedef struct -{ - HWND wnd; - int xpos; // in screen coordinates - int ypos; - int width; - int height; -} waSpawnMenuParms2; - - -// system tray sends this (you might want to simulate it) -#define WM_WA_SYSTRAY WM_USER+1 - -// input plugins send this when they are done playing back -#define WM_WA_MPEG_EOF WM_USER+2 - - - -//// video stuff - -#define IPC_IS_PLAYING_VIDEO 501 // returns >1 if playing, 0 if not, 1 if old version (so who knows):) -#define IPC_GET_IVIDEOOUTPUT 500 // see below for IVideoOutput interface -#define VIDEO_MAKETYPE(A,B,C,D) ((A) | ((B)<<8) | ((C)<<16) | ((D)<<24)) -#define VIDUSER_SET_INFOSTRING 0x1000 -#define VIDUSER_GET_VIDEOHWND 0x1001 -#define VIDUSER_SET_VFLIP 0x1002 -#define VIDUSER_SET_TRACKSELINTERFACE 0x1003 // give your ITrackSelector interface as param2 -#define VIDUSER_OPENVIDEORENDERER 0x1004 -#define VIDUSER_CLOSEVIDEORENDERER 0x1005 -#define VIDUSER_GETPOPUPMENU 0x1006 - -typedef struct -{ - int w; - int h; - int vflip; - double aspectratio; - unsigned int fmt; -} VideoOpenStruct; - -#ifndef NO_IVIDEO_DECLARE -#ifdef __cplusplus - -class VideoOutput; -class SubsItem; - -#ifndef _NSV_DEC_IF_H_ -typedef struct { - unsigned char* baseAddr; - long rowBytes; -} YV12_PLANE; - -typedef struct { - YV12_PLANE y; - YV12_PLANE u; - YV12_PLANE v; -} YV12_PLANES; -#endif - -class IVideoOutput -{ - public: - virtual ~IVideoOutput() { } - virtual int open(int w, int h, int vflip, double aspectratio, unsigned int fmt)=0; - virtual void setcallback(LRESULT (*msgcallback)(void *token, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam), void *token) { (void)token; (void)msgcallback; /* to eliminate warning C4100 */ } - virtual void close()=0; - virtual void draw(void *frame)=0; - virtual void drawSubtitle(SubsItem *item) { } - virtual void showStatusMsg(const char *text) { } - virtual int get_latency() { return 0; } - virtual void notifyBufferState(int bufferstate) { } /* 0-255*/ - - virtual INT_PTR extended(INT_PTR param1, INT_PTR param2, INT_PTR param3) { return 0; } // Dispatchable, eat this! -}; - -class ITrackSelector -{ - public: - virtual int getNumAudioTracks()=0; - virtual void enumAudioTrackName(int n, const char *buf, int size)=0; - virtual int getCurAudioTrack()=0; - virtual int getNumVideoTracks()=0; - virtual void enumVideoTrackName(int n, const char *buf, int size)=0; - virtual int getCurVideoTrack()=0; - - virtual void setAudioTrack(int n)=0; - virtual void setVideoTrack(int n)=0; -}; - -#endif //cplusplus -#endif//NO_IVIDEO_DECLARE - -// these messages are callbacks that you can grab by subclassing the winamp window - -// wParam = -#define IPC_CB_WND_EQ 0 // use one of these for the param -#define IPC_CB_WND_PE 1 -#define IPC_CB_WND_MB 2 -#define IPC_CB_WND_VIDEO 3 -#define IPC_CB_WND_MAIN 4 - -#define IPC_CB_ONSHOWWND 600 -#define IPC_CB_ONHIDEWND 601 - -#define IPC_CB_GETTOOLTIP 602 - -#define IPC_CB_MISC 603 - #define IPC_CB_MISC_TITLE 0 - #define IPC_CB_MISC_VOLUME 1 // volume/pan - #define IPC_CB_MISC_STATUS 2 - #define IPC_CB_MISC_EQ 3 - #define IPC_CB_MISC_INFO 4 - #define IPC_CB_MISC_VIDEOINFO 5 - -#define IPC_CB_CONVERT_STATUS 604 // param value goes from 0 to 100 (percent) -#define IPC_CB_CONVERT_DONE 605 - -#define IPC_ADJUST_FFWINDOWSMENUPOS 606 -/* (requires Winamp 2.9+) -** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFWINDOWSMENUPOS); -** moves where winamp expects the freeform windows in the menubar windows main menu. Useful if you wish to insert a -** menu item above extra freeform windows. -*/ - -#define IPC_ISDOUBLESIZE 608 - -#define IPC_ADJUST_FFOPTIONSMENUPOS 609 -/* (requires Winamp 2.9+) -** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFOPTIONSMENUPOS); -** moves where winamp expects the freeform preferences item in the menubar windows main menu. Useful if you wish to insert a -** menu item above preferences item. -*/ - -#define IPC_GETTIMEDISPLAYMODE 610 // returns 0 if displaying elapsed time or 1 if displaying remaining time - -#define IPC_SETVISWND 611 // param is hwnd, setting this allows you to receive ID_VIS_NEXT/PREVOUS/RANDOM/FS wm_commands -#define ID_VIS_NEXT 40382 -#define ID_VIS_PREV 40383 -#define ID_VIS_RANDOM 40384 -#define ID_VIS_FS 40389 -#define ID_VIS_CFG 40390 -#define ID_VIS_MENU 40391 - -#define IPC_GETVISWND 612 // returns the vis cmd handler hwnd -#define IPC_ISVISRUNNING 613 -#define IPC_CB_VISRANDOM 628 // param is status of random - -#define IPC_SETIDEALVIDEOSIZE 614 // sent by winamp to winamp, trap it if you need it. width=HIWORD(param), height=LOWORD(param) - -#define IPC_GETSTOPONVIDEOCLOSE 615 -#define IPC_SETSTOPONVIDEOCLOSE 616 - -typedef struct { - HWND hwnd; - int uMsg; - WPARAM wParam; - LPARAM lParam; -} transAccelStruct; - -#define IPC_TRANSLATEACCELERATOR 617 - -typedef struct { - int cmd; - int x; - int y; - int align; -} windowCommand; // send this as param to an IPC_PLCMD, IPC_MBCMD, IPC_VIDCMD - -#define IPC_CB_ONTOGGLEAOT 618 - -#define IPC_GETPREFSWND 619 - -#define IPC_SET_PE_WIDTHHEIGHT 620 // data is a pointer to a POINT structure that holds width & height - -#define IPC_GETLANGUAGEPACKINSTANCE 621 - -#define IPC_CB_PEINFOTEXT 622 // data is a string, ie: "04:21/45:02" - -#define IPC_CB_OUTPUTCHANGED 623 // output plugin was changed in config - -#define IPC_GETOUTPUTPLUGIN 625 - -#define IPC_SETDRAWBORDERS 626 -#define IPC_DISABLESKINCURSORS 627 -#define IPC_CB_RESETFONT 629 - -#define IPC_IS_FULLSCREEN 630 // returns 1 if video or vis is in fullscreen mode -#define IPC_SET_VIS_FS_FLAG 631 // a vis should send this message with 1/as param to notify winamp that it has gone to or has come back from fullscreen mode - -#define IPC_SHOW_NOTIFICATION 632 - -#define IPC_GETSKININFO 633 - -#define IPC_GET_MANUALPLADVANCE 634 -/* (requires Winamp 5.03+) -** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_MANUALPLADVANCE); -** -** IPC_GET_MANUALPLADVANCE returns the status of the Manual Playlist Advance (1 if set) -*/ - -#define IPC_SET_MANUALPLADVANCE 635 -/* (requires Winamp 5.03+) -** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_MANUALPLADVANCE); -** -** IPC_SET_MANUALPLADVANCE sets the status of the Manual Playlist Advance option (1 to turn it on) -*/ - -#define IPC_GET_NEXT_PLITEM 636 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_NEXT_PLITEM); -** -** Sent to Winamp's main window when an item has just finished playback or the next button has been pressed and -** requesting the new playlist item number to go to. -** Mainly used by gen_jumpex. Subclass this message in your application to return the new item number. -** -1 for normal winamp operation (default) or the new item number in the playlist to play. -*/ - -#define IPC_GET_PREVIOUS_PLITEM 637 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_PREVIOUS_PLITEM); -** -** Sent to Winamp's main window when the previous button has been pressed and Winamp is requesting the new playlist item number to go to. -** Mainly used by gen_jumpex. Subclass this message in your application to return the new item number. -** -1 for normal winamp operation (default) or the new item number in the playlist to play. -*/ - -#define IPC_IS_WNDSHADE 638 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,wnd,IPC_IS_WNDSHADE); -** -** 'wnd' is window id as defined for IPC_GETWND, or -1 for main window -** Returns 1 if wnd is set to winshade mode, or 0 if it is not -*/ - -#define IPC_SETRATING 639 -/* (requires Winamp 5.04+ with ML) -** SendMessage(hwnd_winamp,WM_WA_IPC,rating,IPC_SETRATING); -** 'rating' is an int value from 0 (no rating) to 5 -*/ - -#define IPC_GETRATING 640 -/* (requires Winamp 5.04+ with ML) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETRATING); -** returns the current item's rating -*/ - -#define IPC_GETNUMAUDIOTRACKS 641 -/* (requires Winamp 5.04+) -** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMAUDIOTRACKS); -** returns the number of audio tracks for the currently playing item -*/ - -#define IPC_GETNUMVIDEOTRACKS 642 -/* (requires Winamp 5.04+) -** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMVIDEOTRACKS); -** returns the number of video tracks for the currently playing item -*/ - -#define IPC_GETAUDIOTRACK 643 -/* (requires Winamp 5.04+) -** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETAUDIOTRACK); -** returns the id of the current audio track for the currently playing item -*/ - -#define IPC_GETVIDEOTRACK 644 -/* (requires Winamp 5.04+) -** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVIDEOTRACK); -** returns the id of the current video track for the currently playing item -*/ - -#define IPC_SETAUDIOTRACK 645 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETAUDIOTRACK); -** switch the currently playing item to a new audio track -*/ - -#define IPC_SETVIDEOTRACK 646 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETVIDEOTRACK); -** switch the currently playing item to a new video track -*/ - -#define IPC_PUSH_DISABLE_EXIT 647 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PUSH_DISABLE_EXIT ); -** lets you disable or re-enable the UI exit functions (close button, -** context menu, alt-f4). -** call IPC_POP_DISABLE_EXIT when you are done doing whatever required -** preventing exit -*/ - -#define IPC_POP_DISABLE_EXIT 648 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_POP_DISABLE_EXIT ); -** see IPC_PUSH_DISABLE_EXIT -*/ - -#define IPC_IS_EXIT_ENABLED 649 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_EXIT_ENABLED); -** returns 0 if exit is disabled, 1 otherwise -*/ - -#define IPC_IS_AOT 650 -/* (requires Winamp 5.04+) -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_AOT); -** returns status of always on top flag. note: this may not match the actual -** TOPMOST window flag while another fullscreen application is focused -*/ - -#define IPC_USES_RECYCLEBIN 651 -/* -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USES_RECYCLEBIN); -** returns 1 if deleted files should be sent to the recycle bin. -** returns 0 if deleted files should be deleted permanently. -** -** You should check for this option if your plugin deletes files -** so that your setting matches the winamp setting -*/ - -#define IPC_FLUSHAUDITS 652 -/* -** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_FLUSHAUDITS); -** -** Will flush any pending audits in the global audits que -** -*/ - -#define IPC_GETPLAYITEM_START 653 -#define IPC_GETPLAYITEM_END 654 - - -#define IPC_GETVIDEORESIZE 655 -#define IPC_SETVIDEORESIZE 656 - -// >>>>>>>>>>> Next is 657 - -#define IPC_PLCMD 1000 - -#define PLCMD_ADD 0 -#define PLCMD_REM 1 -#define PLCMD_SEL 2 -#define PLCMD_MISC 3 -#define PLCMD_LIST 4 - -//#define IPC_MBCMD 1001 - -#define MBCMD_BACK 0 -#define MBCMD_FORWARD 1 -#define MBCMD_STOP 2 -#define MBCMD_RELOAD 3 -#define MBCMD_MISC 4 - -#define IPC_VIDCMD 1002 - -#define VIDCMD_FULLSCREEN 0 -#define VIDCMD_1X 1 -#define VIDCMD_2X 2 -#define VIDCMD_LIB 3 -#define VIDPOPUP_MISC 4 - -//#define IPC_MBURL 1003 //sets the URL -//#define IPC_MBGETCURURL 1004 //copies the current URL into wParam (have a 4096 buffer ready) -//#define IPC_MBGETDESC 1005 //copies the current URL description into wParam (have a 4096 buffer ready) -//#define IPC_MBCHECKLOCFILE 1006 //checks that the link file is up to date (otherwise updates it). wParam=parent HWND -//#define IPC_MBREFRESH 1007 //refreshes the "now playing" view in the library -//#define IPC_MBGETDEFURL 1008 //copies the default URL into wParam (have a 4096 buffer ready) - -#define IPC_STATS_LIBRARY_ITEMCNT 1300 // updates library count status - -// IPC 2000-3000 reserved for freeform messages, see gen_ff/ff_ipc.h -#define IPC_FF_FIRST 2000 -#define IPC_FF_LAST 3000 - - -/* -** General IPC messages in Winamp -** -** All notification messages appear in the lParam of the main window message proceedure. -*/ - - -#define IPC_GETDROPTARGET 3001 -/* (requires Winamp 5.0+) -** IDropTarget* IDrop = (IDropTarget*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETDROPTARGET); -** -** You call this to retrieve a copy of the IDropTarget interface which Winamp created for -** handling external drag and drop operations on to it's Windows. This is only really -** useful if you're providing an alternate interface and want your Windows to provide the -** same drag and drop support as Winamp normally provides the user. Check out MSDN or -** your prefered search facility for more information about the IDropTarget interface and -** what's needed to handle it in your own instance. -*/ - -#define IPC_PLAYLIST_MODIFIED 3002 -/* (requires Winamp 5.0+) -** This is a notification message sent to the main Winamp window whenever the playlist is -** modified in any way e.g. the addition/removal of a playlist entry. -** -** It is not a good idea to do large amounts of processing in this notification since it -** will slow down Winamp as playlist entries are modified (especially when you're adding -** in a large playlist). -** -** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYLIST_MODIFIED){ -** // do what you need to do here -** } -*/ - -#define IPC_PLAYING_FILE 3003 -/* (requires Winamp 5.0+) -** This is a notification message sent to the main Winamp window when playback begins for -** a file. This passes the full filepath in the wParam of the message received. -** -** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYING_FILE){ -** // do what you need to do here, e.g. -** process_file((char*)wParam); -** } -*/ - -#define IPC_PLAYING_FILEW 13003 -/* (requires Winamp 5.0+) -** This is a notification message sent to the main Winamp window when playback begins for -** a file. This passes the full filepath in the wParam of the message received. -** -** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYING_FILEW){ -** // do what you need to do here, e.g. -** process_file((wchar_t*)wParam); -** } -*/ - -#define IPC_FILE_TAG_MAY_HAVE_UPDATED 3004 // sent to main wnd with the file as parm (char *) whenever a file tag might be updated -#define IPC_FILE_TAG_MAY_HAVE_UPDATEDW 3005 // sent to main wnd with the file as parm (wchar_t *) whenever a file tag might be updated -/* (requires Winamp 5.0+) -** This is a notification message sent to the main Winamp window when a file's tag -** (e.g. id3) may have been updated. This appears to be sent when the InfoBox(..) function -** of the associated input plugin returns a 1 (which is the file information dialog/editor -** call normally). -** -** if(uMsg == WM_WA_IPC && lParam == IPC_FILE_TAG_MAY_HAVE_UPDATED){ -** // do what you need to do here, e.g. -** update_info_on_file_update((char*)wParam); -** } -*/ - -#define IPC_ALLOW_PLAYTRACKING 3007 -/* (requires Winamp 5.0+) -** SendMessage(hwnd_winamp,WM_WA_IPC,allow,IPC_ALLOW_PLAYTRACKING); -** Send allow as nonzero to allow play tracking and zero to disable the mode. -*/ - -#define IPC_HOOK_OKTOQUIT 3010 -/* (requires Winamp 5.0+) -** This is a notification message sent to the main Winamp window asking if it's okay to -** close or not. Return zero to prevent Winamp from closing or return anything non-zero -** to allow Winamp to close. -** -** The best implementation of this option is to let the message pass through to the -** original window proceedure since another plugin may want to have a say in the matter -** with regards to Winamp closing. -** -** if(uMsg == WM_WA_IPC && lParam == IPC_HOOK_OKTOQUIT){ -** // do what you need to do here, e.g. -** if(no_shut_down()){ -** return 1; -** } -** } -*/ - -#define IPC_WRITECONFIG 3011 -/* (requires Winamp 5.0+) -** SendMessage(hwnd_winamp,WM_WA_IPC,write_type,IPC_WRITECONFIG); -** -** Send write_type as 2 to write all config settings and the current playlist. -** -** Send write_type as 1 to write the playlist and common settings. -** This won't save the following ini settings:: -** -** defext, titlefmt, proxy, visplugin_name, dspplugin_name, check_ft_startup, -** visplugin_num, pe_fontsize, visplugin_priority, visplugin_autoexec, dspplugin_num, -** sticon, splash, taskbar, dropaotfs, ascb_new, ttips, riol, minst, whichicon, -** whichicon2, addtolist, snap, snaplen, parent, hilite, disvis, rofiob, shownumsinpl, -** keeponscreen, eqdsize, usecursors, fixtitles, priority, shuffle_morph_rate, -** useexttitles, bifont, inet_mode, ospb, embedwnd_freesize, no_visseh -** (the above was valid for 5.1) -** -** Send write_type as 0 to write the common and less common settings and no playlist. -*/ - -#define IPC_UPDATE_URL 3012 // pass the URL (char *) in lparam, will be free()'d on done. - -// pass a string to be the name to register, and returns a value > 65536, which is a unique value you can use -// for custom WM_WA_IPC messages. - -#define IPC_GET_RANDFUNC 3015 // returns a function to get a random number -/* (requires Winamp 5.1+) -** int (*randfunc)(void) = (int(*)(void))SendMessage(plugin.hwndParent,WM_WA_IPC,0,IPC_GET_RANDFUNC); -** if(randfunc && randfunc != 1){ -** randfunc(); -** } -** -** This will return a positive 32-bit number (essentially 31-bit). -** The check for a returned value of 1 is because that's the default return value from -** SendMessage(..) when it is not handled so is good to check for it in this situation. -*/ - -#define IPC_METADATA_CHANGED 3017 -/* (requires Winamp 5.1+) -** int changed=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(char*)field,IPC_METADATA_CHANGED); -** a plugin can SendMessage this to winamp if internal metadata has changes. -** wParam should be a char * of what field changed -** -** Currently used for internal actions (and very few at that) the intent of this api is -** to allow a plugin to call it when metadata has changed in the current playlist entry -** e.g.a new id3v2 tag was found in a stream -** -** The wparam value can either be NULL or a pointer to an ansi string for the metadata -** which has changed. This can be thought of as an advanced version of IPC_UPDTITLE and -** could be used to allow for update of the current title when a specific tag changed. -** -** Not recommended to be used since there is not the complete handling implemented in -** Winamp for it at the moment. -*/ - -#define IPC_SKIN_CHANGED 3018 -/* (requires Winamp 5.1+) -** This is a notification message sent to the main Winamp window by itself whenever -** the skin in use is changed. There is no information sent by the wParam for this. -** -** if(message == WM_WA_IPC && lparam == IPC_SKIN_CHANGED){ -** // do what you need to do to handle skin changes, e.g. call WADlg_init(hwnd_winamp); -** } -*/ - -#define IPC_REGISTER_LOWORD_COMMAND 3019 -/* (requires Winamp 5.1+) -** WORD id = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REGISTER_LOWORD_COMMAND); -** This will assign you a unique id for making your own commands such as for extra menu -** entries. The starting value returned by this message will potentially change as and -** when the main resource file of Winamp is updated with extra data so assumptions cannot -** be made on what will be returned and plugin loading order will affect things as well. - -** 5.33+ -** If you want to reserve more than one id, you can pass the number of ids required in wParam -*/ - -#define IPC_GET_DISPATCH_OBJECT 3020 // gets winamp main IDispatch * (for embedded webpages) -#define IPC_GET_UNIQUE_DISPATCH_ID 3021 // gives you a unique dispatch ID that won't conflict with anything in winamp's IDispatch * - -#define IPC_ADD_DISPATCH_OBJECT 3022 // add your own dispatch object into winamp's. This lets embedded webpages access your functions -// pass a pointer to DispatchInfo (see below). Winamp makes a copy of all this data so you can safely delete it later -typedef struct -{ - wchar_t *name; // filled in by plugin, make sure it's a unicode string!! (i.e. L"myObject" instead of "myObject). - struct IDispatch *dispatch; // filled in by plugin - DWORD id; // filled in by winamp on return -} DispatchInfo; - -#define IPC_GET_PROXY_STRING 3023 -/* (requires Winamp 5.11+) -** char* proxy_string=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_PROXY_STRING); -** This will return the same string as is shown on the General Preferences page. -*/ - -#define IPC_USE_REGISTRY 3024 -/* (requires Winamp 5.11+) -** int reg_enabled=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USE_REGISTRY); -** This will return 0 if you should leave your grubby hands off the registry (i.e. for -** lockdown mode). This is useful if Winamp is run from a USB drive and you can't alter -** system settings, etc. -*/ - -#define IPC_GET_API_SERVICE 3025 -/* (requires Winamp 5.12+) -** api_service* api_service = (api_service)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_API_SERVICE); -** This api will return Winamp's api_service pointer (which is what Winamp3 used, heh). -** If this api is not supported in the Winamp version that is being used at the time then -** the returned value from this api will be 1 which is a good version check. -** -** As of 5.12 there is support for .w5s plugins which reside in %WinampDir%\System and -** are intended for common code that can be shared amongst other plugins e.g. jnetlib.w5s -** which contains jnetlib in one instance instead of being duplicated multiple times in -** all of the plugins which need internet access. -** -** Details on the .w5s specifications will come at some stage (possibly). -*/ - - - -typedef struct { - const wchar_t *filename; - const wchar_t *metadata; - wchar_t *ret; - size_t retlen; -} extendedFileInfoStructW; - -#define IPC_GET_EXTENDED_FILE_INFOW 3026 -/* (requires Winamp 5.13+) -** Pass a pointer to the above struct in wParam -*/ -#define IPC_GET_EXTENDED_FILE_INFOW_HOOKABLE 3027 -#define IPC_SET_EXTENDED_FILE_INFOW 3028 -/* (requires Winamp 5.13+) -** Pass a pointer to the above struct in wParam -*/ - -#define IPC_PLAYLIST_GET_NEXT_SELECTED 3029 -/* (requires 5.2+) -** int pl_item = SendMessage(hwnd_winamp,WM_WA_IPC,start,IPC_PLAYLIST_GET_NEXT_SELECTED); -** -** This works just like the ListView_GetNextItem(..) macro for ListView controls. -** 'start' is the index of the playlist item that you want to begin the search after or -** set this as -1 for the search to begin with the first item of the current playlist. -** -** This will return the index of the selected playlist according to the 'start' value or -** it returns -1 if there is no selection or no more selected items according to 'start'. -** -** Quick example: -** -** int sel = -1; -** // keep incrementing the start of the search so we get all of the selected entries -** while((sel = SendMessage(hwnd_winamp,WM_WA_IPC,sel,IPC_PLAYLIST_GET_NEXT_SELECTED))!=-1){ -** // show the playlist file entry of the selected item(s) if there were any -** MessageBox(hwnd_winamp,(char*)SendMessage(hwnd_winamp,WM_WA_IPC,sel,IPC_GETPLAYLISTFILE),0,0); -** } -*/ - -#define IPC_PLAYLIST_GET_SELECTED_COUNT 3030 -/* (requires 5.2+) -** int selcnt = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PLAYLIST_GET_SELECTED_COUNT); -** This will return the number of selected playlist entries. -*/ - -#define IPC_GET_PLAYING_FILENAME 3031 // returns wchar_t * of the currently playing filename - -#define IPC_OPEN_URL 3032 // send either ANSI or Unicode string (it'll figure it out, but it MUST start with "h"!, so don't send ftp:// or anything funny) - -#define IPC_REGISTER_WINAMP_IPCMESSAGE 65536 -/* (requires Winamp 5.0+) -** DWORD id = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)name,IPC_REGISTER_WINAMP_IPCMESSAGE); -** The value 'id' returned is > 65536 and is incremented on subsequent calls for unique -** 'name' values passed to it. By using the same 'name' in different plugins will allow a -** common runtime api to be provided for the currently running instance of Winamp -** e.g. -** PostMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)my_param,registered_ipc); -** Have a look at wa_hotkeys.h for an example on how this api is used in practice for a -** custom WM_WA_IPC message. -** -** if(uMsg == WM_WA_IPC && lParam == id_from_register_winamp_ipcmessage){ -** // do things -** } -*/ - -#endif//_WA_IPC_H_ diff --git a/vendor/JavaWinampApi/1.1/cpp/wpcom.dev b/vendor/JavaWinampApi/1.1/cpp/wpcom.dev deleted file mode 100644 index 2c226a4..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/wpcom.dev +++ /dev/null @@ -1,69 +0,0 @@ -[Project] -FileName=wpcom.dev -Name=wpcom -UnitCount=2 -Type=3 -Ver=1 -ObjFiles= -Includes="E:\Program Files\Java\jdk1.6.0_11\include";"E:\Program Files\Java\jdk1.6.0_11\include\win32" -Libs= -PrivateResource= -ResourceIncludes= -MakeIncludes= -Compiler=-DBUILDING_DLL=1_@@_ -CppCompiler=-DBUILDING_DLL=1_@@_ -Linker=--no-export-all-symbols --add-stdcall-alias_@@_ -IsCpp=0 -Icon= -ExeOutput=..\..\..\JavaWinampAPI -ObjectOutput= -OverrideOutput=1 -OverrideOutputName=wpcom.dll -HostApplication= -Folders= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerSettings=0000000000000000000000 - -[Unit1] -FileName=WinampController.c -CompileCpp=0 -Folder=wacon -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd=$(CC) -c WinampController.c -o WinampController.o $(CFLAGS) - -[VersionInfo] -Major=0 -Minor=1 -Release=1 -Build=1 -LanguageID=1033 -CharsetID=1252 -CompanyName= -FileVersion= -FileDescription=Developed using the Dev-C++ IDE -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion= -AutoIncBuildNr=0 - -[Unit2] -FileName=WinampController.h -CompileCpp=0 -Folder=wacon -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - diff --git a/vendor/JavaWinampApi/1.1/cpp/wpcom.layout b/vendor/JavaWinampApi/1.1/cpp/wpcom.layout deleted file mode 100644 index fc89c00..0000000 --- a/vendor/JavaWinampApi/1.1/cpp/wpcom.layout +++ /dev/null @@ -1,17 +0,0 @@ -[Editor_0] -CursorCol=32 -CursorRow=359 -TopLine=338 -LeftChar=1 -Open=1 -Top=1 -[Editors] -Focused=0 -Order=1,0 -[Editor_1] -Open=1 -Top=0 -CursorCol=73 -CursorRow=143 -TopLine=127 -LeftChar=1 diff --git a/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/InvalidHandle.java b/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/InvalidHandle.java deleted file mode 100644 index 4785982..0000000 --- a/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/InvalidHandle.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * InvalidHandle.java - * - * Created on 9 de Outubro de 2007, 14:18 - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package com.qotsa.exception; - -/** - * Exception to throw when Winamp Handle Fails. - * - * @author Francisco - */ -public class InvalidHandle extends Exception{ - - private static final String defaultMessage = "Invalid Handle. Please Verify if Winamp is running."; - - /** - * Creates a new instance of InvalidHandle - * @param message Message to print in the stack. - */ - public InvalidHandle(String message) { - - super(message); - - } - - /** - * Creates a new instance of InvalidHandle with the default message - */ - public InvalidHandle() { - - super(defaultMessage); - - } - -} diff --git a/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/InvalidParameter.java b/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/InvalidParameter.java deleted file mode 100644 index 3499308..0000000 --- a/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/InvalidParameter.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * InvalidParameter.java - * - * Created on 11 de Outubro de 2007, 10:53 - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package com.qotsa.exception; - -/** - * Exception to throw when any parameter is invalid. - * - * @author Francisco - */ -public class InvalidParameter extends Exception { - - private static final String defaultMessage = "Invalid Parameter"; - - /** - * Creates a new instance of NegativeValueException - * @param message Message to print in the stack. - */ - public InvalidParameter(String message) { - - super(message); - - } - - /** - * Creates a new instance of NegativeValueException with the default message - */ - public InvalidParameter() { - - super(defaultMessage); - - } - -} diff --git a/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/package.html b/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/package.html deleted file mode 100644 index b2aafb7..0000000 --- a/vendor/JavaWinampApi/1.1/java/com/qotsa/exception/package.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - -Package containing the Exception Class used in the WinampController Class. - - -

Package Specification

- - - - - diff --git a/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/JNIWinamp.java b/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/JNIWinamp.java deleted file mode 100644 index 8da725e..0000000 --- a/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/JNIWinamp.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * JNIWinamp.java - * - * Created on 23 de Abril de 2007, 20:41 - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package com.qotsa.jni.controller; - -import java.io.IOException; - -/** - * - * @author Francisco Guimarães - */ -final class JNIWinamp { - - static { - System.loadLibrary("wpcom"); - } - - /** - * Verify if Winamp is started - * and if not started, starts it - * @return True - if successful run Winamp - * False - if not successful run Winamp - */ - - protected static native boolean run() throws UnsatisfiedLinkError; - - /* - * Exit Winamp - * @return True - if successful exit - * False - if not successful exit - */ - protected static native boolean exit() throws UnsatisfiedLinkError; - - /** - * Play Winamp. - * - */ - protected static native boolean play() throws UnsatisfiedLinkError; - - /** - * Stop Winamp. - * - */ - protected static native boolean stop() throws UnsatisfiedLinkError; - - /** - * Resume Winamp. - * - */ - protected static native boolean resume() throws UnsatisfiedLinkError; - - /** - * Pause Winamp. - * - */ - protected static native boolean pause() throws UnsatisfiedLinkError; - - /** - * Go to Previous Track. - * - */ - protected static native boolean previousTrack() throws UnsatisfiedLinkError; - - /** - * Go to Next Track. - * - */ - protected static native boolean nextTrack() throws UnsatisfiedLinkError; - - /** - * Fowards 5 seconds on the current song. - * - */ - protected static native boolean fwd5Secs() throws UnsatisfiedLinkError; - - /** - * Rewinds 5 seconds on the current song. - * - */ - protected static native boolean rew5Secs() throws UnsatisfiedLinkError; - - /** - * Increase Volume. - * - */ - protected static native boolean increaseVolume() throws UnsatisfiedLinkError; - - /** - * Decrease Volume. - * - */ - protected static native boolean decreaseVolume() throws UnsatisfiedLinkError; - - /** - * Increase Volume. - * @param percent Percent to Increase. - */ - protected static native boolean increaseVolumePercent(int percent) throws UnsatisfiedLinkError; - - /** - * Decrease Volume. - * @param percent Percent to Decrease. - */ - protected static native boolean decreaseVolumePercent(int percent) throws UnsatisfiedLinkError; - - /** - * Adjust Volume - * @param pos Position to Set Volume between 0 and 99. - */ - protected static native boolean setVolume(int pos) throws UnsatisfiedLinkError; - - /** - * Get Volume. - * @return volume. - */ - protected static native int getVolume() throws UnsatisfiedLinkError; - - /** - * Go to a Specified Position in the List. - * @param pos Position. - */ - protected static native boolean setPlaylistPosition(int pos) throws UnsatisfiedLinkError; - - /** - * Clear List. - * - */ - protected static native boolean clearPlayList() throws UnsatisfiedLinkError; - - /** - * Refresh List´s Cache. - * - */ - protected static native boolean refreshPlayListCache() throws UnsatisfiedLinkError; - - /** - * Return the PlayListLength. - * @return List Length. - */ - protected static native int getPlayListLength() throws UnsatisfiedLinkError; - - /** - * Write a Playlist in \\Winamp.m3u. - * @return List Position. - */ - protected static native int writePlayListToFile() throws UnsatisfiedLinkError; - - /** - * Verify if Shuffle is On. - * @return True - On throws UnsatisfiedLinkError; False - Off. - */ - protected static native int isShuffleStatusOn() throws UnsatisfiedLinkError; - - /** - * Verify if Repeat is On. - * @return True - On throws UnsatisfiedLinkError; False - Off. - */ - protected static native int isRepeatStatusOn() throws UnsatisfiedLinkError; - - /** - * Turn on Repeat. - * @param True - Turn on Repeat throws UnsatisfiedLinkError; False - Turn off Repeat. - */ - protected static native boolean setRepeatStatusOn(boolean mode) throws UnsatisfiedLinkError; - - /** - * Turn on Shuffle. - * @param True - Turn on Shuffle throws UnsatisfiedLinkError; False - Turn off Shuffle. - */ - protected static native boolean setShuffleStatusOn(boolean mode) throws UnsatisfiedLinkError; - - /** - * Append a File in the List - * @param filename FileName to Append. - */ - protected static native boolean appendToPlayList(String filename) throws UnsatisfiedLinkError; - - /** - * Get Winamp Status. - * @return STOPPED - Stop - * PLAYING - play - * PAUSED - Paused - */ - protected static native int getStatus() throws UnsatisfiedLinkError; - - /** - * Get Current List Pos. - * @return Current List Position. - */ - protected static native int getListPos() throws UnsatisfiedLinkError; - - /** - * Get Current Track Title - * @return Current Track Title - */ - protected static native String getTitle() throws UnsatisfiedLinkError; - - /** - * Get Track FileName in List´s index. - * @param index Track Index in the Current PlayList - * @return Current Track FileName - */ - protected static native String getFileNameInList(int index) throws UnsatisfiedLinkError; - - /** - * Get Song Time - * @param mode CURRENTTIME - Currently Time in Milliseconds - * TIMELENGHT - Song Time Length in seconds - * @return Song Time in Seconds - */ - protected static native int getTime(int mode) throws UnsatisfiedLinkError; - - /** - * Get File Name Playing In Winamp. - * - * @return Current File Name. - */ - protected static native String getFileNamePlaying() throws UnsatisfiedLinkError; - -} - diff --git a/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/WinampController.java b/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/WinampController.java deleted file mode 100644 index 159fd9c..0000000 --- a/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/WinampController.java +++ /dev/null @@ -1,592 +0,0 @@ -/* - * WinampController.java - * - * Created on 9 de Outubro de 2007, 14:06 - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -/** - * Package containing the Controller Class to communicate with Winamp. - * - * @author Francisco Guimarães - */ -package com.qotsa.jni.controller; - -import com.qotsa.exception.InvalidHandle; -import com.qotsa.exception.InvalidParameter; -import java.io.File; - -/** - * This class is a wrapper to call JNI functions - * to send Message to Winamp Window. - * - * @author Francisco Guimarães - * - * - */ -public class WinampController { - - /** - * Constant used as return in getTime() - * Value = -1 - */ - public static final int ISNOTPLAYING = -1; - - /** - * Constant used as parameter in getTime() method - * Value = 0 - */ - public static final int CURRENTTIME = 0; - - /** - * Constant used as parameter in getTime() method - * Value = 1 - */ - public static final int TIMELENGTH = 1; - - /** - * Constant used as return in getStatus() method - * Value = 0 - */ - public static final int STOPPED = 0; - - /** - * Constant used as return in getStatus() method - * Value = 1 - */ - public static final int PLAYING = 1; - - /** - * Constant used as return in getStatus() method - * Value = 3 - */ - public static final int PAUSED = 3; - - - /** - * Verify if Winamp is started - * and if not started, starts it. - * - * @throws java.lang.Exception When the key HKEY_LOCAL_MACHINE\Software\Clients\Media\Winamp\shell\open\command - * is not found in the register. This key is used to find Winamp Directory installation to execute it. - */ - - public static void run() throws Exception{ - - if (!JNIWinamp.run()) - throw new Exception("Unable to run Winamp. Verify if it is properly installed"); - - } - - /** - * Exit Winamp. - * - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void exit() throws InvalidHandle { - - if (!JNIWinamp.exit()) - throw new InvalidHandle(); - - - } - - /** - * Play current file in Winamp. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void play() throws InvalidHandle { - - if (!JNIWinamp.play()) - throw new InvalidHandle(); - - } - - /** - * Stop current file in Winamp. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void stop() throws InvalidHandle { - - if (!JNIWinamp.stop()) - throw new InvalidHandle(); - - } - - /** - * Resume current file in Winamp. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void resume() throws InvalidHandle { - - if (!JNIWinamp.resume()) - throw new InvalidHandle(); - - } - - /** - * Pause Winamp. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void pause() throws InvalidHandle { - - if (!JNIWinamp.pause()) - throw new InvalidHandle(); - - } - - /** - * - * Go to Previous Track in the play list. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void previousTrack() throws InvalidHandle { - - if (!JNIWinamp.previousTrack()) - throw new InvalidHandle(); - - } - - /** - * Go to Next Track in the play list. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void nextTrack() throws InvalidHandle { - - if (!JNIWinamp.nextTrack()) - throw new InvalidHandle(); - - } - - /** - * Fowards 5 seconds on the current song. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void fwd5Secs() throws InvalidHandle { - - if (!JNIWinamp.fwd5Secs()) - throw new InvalidHandle(); - - } - - /** - * Rewinds 5 seconds on the current song. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void rew5Secs() throws InvalidHandle { - - if (!JNIWinamp.rew5Secs()) - throw new InvalidHandle(); - - } - - /** - * Increase Volume a little bit. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void increaseVolume() throws InvalidHandle { - - if (!JNIWinamp.increaseVolume()) - throw new InvalidHandle(); - - } - - /** - * Decrease Volume a little bit. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void decreaseVolume() throws InvalidHandle { - - if (!JNIWinamp.decreaseVolume()) - throw new InvalidHandle(); - - } - - /** - * Increase Volume. - * - * @param percent Percent to Increase Volume. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter If percent not between 0 and 100 - */ - public static void increaseVolumePercent (int percent) throws InvalidHandle, InvalidParameter { - - if ( (percent < 0) || (percent > 100) ) - throw new InvalidParameter("percent´s value must be between 0 and 100"); - - if (!JNIWinamp.increaseVolumePercent(percent)) - throw new InvalidHandle(); - - } - - /** - * Decrease Volume. - * - * @param percent Percent to Decrease Volume. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter If percent not between 0 and 100 - */ - public static void decreaseVolumePercent(int percent) throws InvalidHandle, InvalidParameter { - - if ( (percent < 0) || (percent > 100) ) - throw new InvalidParameter("percent´s value must be between 0 and 100"); - if (!JNIWinamp.decreaseVolumePercent(percent)) - throw new InvalidHandle(); - - } - - /** - * Adjust Volume. - * Note that the pos must be between 0(0%) and 255 (100%). - * - * @param pos Position to Set Volume. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter If pos not between 0 and 255 - */ - public static void setVolume(int pos) throws InvalidHandle, InvalidParameter { - - if ( (pos < 0) || (pos > 255) ) - throw new InvalidParameter("pos value must be between 0 and 255"); - if (!JNIWinamp.setVolume(pos)) - throw new InvalidHandle(); - - } - - /** - * Get Volume. - * @return The volume which is a number between 0 (0%) and 255(100%) - * @throws com.qotsa.exception.InvalidHandle - */ - public static int getVolume() throws InvalidHandle { - int volume = JNIWinamp.getVolume(); - if (volume == -1) - throw new InvalidHandle(); - return volume; - } - - /** - * Get Volume Percent. - * @return Volume percent. - * @throws com.qotsa.exception.InvalidHandle - */ - public static int getVolumePercent() throws InvalidHandle { - - int volume = getVolume(); - int percent = (volume * 100) / 255; - return percent; - } - - /** - * Restarts Winamp. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws java.lang.Exception When failed to restart Winamp. - */ - public static void restart() throws InvalidHandle, Exception { - - exit(); - run(); - - } - - /** - * Go to a Specified Position in the List. This method doesn´t play. - * Just set list position. If you wanna play call play() after set position. - * Parameter pos is Zero-based index. - * @param pos Position. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter If pos is negative or greater than List Length. - */ - public static void setPlaylistPosition(int pos) throws InvalidHandle, InvalidParameter { - - int listLength = getPlayListLength(); - if ( (pos < 0) || ( (pos + 1) > listLength) ) - throw new InvalidParameter("Position is invalid in the list."); - if (!JNIWinamp.setPlaylistPosition(pos)) - throw new InvalidHandle(); - - } - - /** - * Clear Winamp's internal playlist. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void clearPlayList() throws InvalidHandle { - - if (!JNIWinamp.clearPlayList()) - throw new InvalidHandle(); - - } - - /** - * Flush the playlist cache buffer. - * Call this if you want it to go refetch titles for tracks in the list. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void refreshPlayListCache() throws InvalidHandle{ - - if (!JNIWinamp.refreshPlayListCache()) - throw new InvalidHandle(); - - } - - /** - * Return the PlayListLength. - * - * @return List Length. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static int getPlayListLength() throws InvalidHandle { - - int length = JNIWinamp.getPlayListLength(); - if (length == -1) - throw new InvalidHandle(); - return length; - - } - - /** - * Write a Playlist in winampDirInstallation\\Winamp.m3u. - * This is default Winamp IPC Default. If you wanna change this, - * just rename the file you´ve created. - * - * @return Current List Position. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static int writePlayListToFile() throws InvalidHandle { - - int playListPos = JNIWinamp.writePlayListToFile(); - if (playListPos == -1) - throw new InvalidHandle(); - return playListPos; - - } - - /** - * Verify if Shuffle is On. - * - * @return True - On ; False - Off. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static boolean isShuffleStatusOn() throws InvalidHandle { - - int status = JNIWinamp.isShuffleStatusOn(); - if (status == -1) - throw new InvalidHandle(); - return (status == 1 ? true : false); - - } - - /** - * Verify if Repeat is On. - * - * @return True - On ; False - Off. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static boolean isRepeatStatusOn() throws InvalidHandle { - - int status = JNIWinamp.isRepeatStatusOn(); - if (status == -1) - throw new InvalidHandle(); - return (status == 1 ? true : false); - - } - - /** - * Turn on Repeat. - * - * @param mode True - Turn on Repeat ; False - Turn off Repeat. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void setRepeatStatusOn(boolean mode) throws InvalidHandle { - - if (!JNIWinamp.setRepeatStatusOn(mode)) - throw new InvalidHandle(); - - } - - /** - * Turn on Shuffle. - * - * @param mode True - Turn on Shuffle ; False - Turn off Shuffle. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static void setShuffleStatusOn(boolean mode) throws InvalidHandle { - - if (!JNIWinamp.setShuffleStatusOn(mode)) - throw new InvalidHandle(); - - } - - /** - * Append a File into the List. - * - * @param filename FileName to Append in the list. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter If the filename is an invalid path. - */ - public static void appendToPlayList(String filename) throws InvalidHandle, InvalidParameter { - - File file = new File(filename); - if (!file.exists()) - throw new InvalidParameter("File doesn´t exists."); - if (!JNIWinamp.appendToPlayList(filename)) - throw new InvalidHandle(); - - } - - /** - * Get Winamp Status. - * - * @return STOPPED - Stop - * PLAYING - play - * PAUSED - Paused - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static int getStatus() throws InvalidHandle { - - int status = JNIWinamp.getStatus(); - if (status == -1) - throw new InvalidHandle(); - return status; - - } - - /** - * Get Current List Pos. - * - * @return Current List Position. - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static int getListPos() throws InvalidHandle { - - int pos = JNIWinamp.getListPos(); - if (pos == -1) - throw new InvalidHandle(); - return pos; - - } - - /** - * Get Current Track Title. - * - * @return Current Track Title - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - */ - public static String getTitle() throws InvalidHandle { - - String title = JNIWinamp.getTitle(); - if (title == null) - throw new InvalidHandle(); - return title; - - } - - /** - * Get Current Track FileName. - * Parameter pos is Zero-based index. - * - * @return Current Track FileName - * @param pos Track Position in the Current PlayList - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter If pos is negative or greater than List Length - */ - public static String getFileNameInList(int pos) throws InvalidHandle, InvalidParameter { - - int listLength = getPlayListLength(); - if ( (pos < 0) || (pos > listLength) ) - throw new InvalidParameter("Position is invalid in the list."); - String filename = JNIWinamp.getFileNameInList(pos); - if (filename == null) - throw new InvalidHandle(); - return filename; - - } - - /** - * Get Song Time. - * - * @return Time Song (depends on Param mode) or - * ISNOTPLAYING if there is no info about time because it not starts to play. - * @param mode CURRENTTIME - Currently Time in Milliseconds - * TIMELENGHT - Song Time Length in seconds - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter if parameter is not CURRENTTIME or TIMELENGTH. - */ - public static int getTime(int mode) throws InvalidHandle, InvalidParameter { - - if (mode != CURRENTTIME && mode != TIMELENGTH) - throw new InvalidParameter(); - int time = JNIWinamp.getTime(mode); - if (time == -2) - throw new InvalidHandle(); - return time; - - } - - /** - * Fowards n Tracks in Play List. - * - * @param n Number of Tracks to Foward - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter if n is negative or Zero. - */ - public static void fwdTracks(int n) throws InvalidParameter, InvalidHandle { - - if (n <= 0) - throw new InvalidParameter("Value must be Positive"); - int pos = getListPos(); - int lengthList = getPlayListLength(); - int newPos = pos + n; - if (newPos > lengthList ) { - setPlaylistPosition(lengthList); - play(); - } - else { - setPlaylistPosition(newPos); - play(); - } - - } - - /** - * Rewinds n Tracks in Play List. - * - * @param n Number of Tracks to Rewind - * @throws com.qotsa.exception.InvalidHandle When the Winamp Windows is not handle(in most case, it means that winamp is not running) - * @throws com.qotsa.exception.InvalidParameter if n is negative or Zero. - */ - public static void rewTracks(int n) throws InvalidParameter, InvalidHandle { - - if (n <= 0) - throw new InvalidParameter("Value must be Positive"); - int pos = getListPos(); - int lengthList = getPlayListLength(); - int newPos = pos - n; - if (newPos < 0 ) { - setPlaylistPosition(0); - play(); - } - else { - setPlaylistPosition(newPos); - play(); - } - - } - - /** - * Get File Name Playing In Winamp. - * - * @return Current File Name. - */ - public static String getFileNamePlaying() throws InvalidHandle { - - String fileName = JNIWinamp.getFileNamePlaying(); - if (fileName == null) - throw new InvalidHandle(); - return fileName; - - } - -} diff --git a/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/package.html b/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/package.html deleted file mode 100644 index c78cf04..0000000 --- a/vendor/JavaWinampApi/1.1/java/com/qotsa/jni/controller/package.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - -Package containing the Controller Class to communicate with Winamp. - - -

Package Specification

- - - - - diff --git a/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXComponent.java b/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXComponent.java deleted file mode 100644 index 4d0096b..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXComponent.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.activeX; - -import com.jacob.com.Dispatch; -import com.jacob.com.JacobObject; -import com.jacob.com.Variant; - -/** - * This class provides a higher level, more object like, wrapper for top of the - * Dispatch object. The Dispatch class's method essentially directly map to - * Microsoft C API including the first parameter that is almost always the - * target of the message. ActiveXComponent assumes the target of every message - * is the MS COM object behind the ActiveXComponent. This removes the need to - * pass the Dispatch object into every method. - *

- * It is really up to the developer as to whether they want to use the Dispatch - * interface or the ActiveXComponent interface. - *

- * This class simulates com.ms.activeX.ActiveXComponent only in the sense that - * it is used for creating Dispatch objects - */ -public class ActiveXComponent extends Dispatch { - - /** - * Normally used to create a new connection to a microsoft application. The - * passed in parameter is the name of the program as registered in the - * registry. It can also be the object name. - *

- * This constructor causes a new Windows object of the requested type to be - * created. The windows CoCreate() function gets called to create the - * underlying windows object. - * - *

-	 * new ActiveXComponent("ScriptControl");
-	 * 
- * - * @param programId - */ - public ActiveXComponent(String programId) { - super(programId); - } - - /** - * Creates an active X component that is built on top of the COM pointers - * held in the passed in dispatch. This widens the Dispatch object to pick - * up the ActiveXComponent API - * - * @param dispatchToBeWrapped - */ - public ActiveXComponent(Dispatch dispatchToBeWrapped) { - super(dispatchToBeWrapped); - } - - /** - * only used by the factories - * - */ - private ActiveXComponent() { - super(); - } - - /** - * Probably was a cover for something else in the past. Should be - * deprecated. - * - * @return Now it actually returns this exact same object. - */ - public Dispatch getObject() { - return this; - } - - /** - * Most code should use the standard ActiveXComponent(String) contructor and - * not this factory method. This method exists for applications that need - * special behavior. Experimental in release 1.9.2. - *

- * Factory that returns a Dispatch object wrapped around the result of a - * CoCreate() call. This differs from the standard constructor in that it - * throws no exceptions and returns null on failure. - *

- * This will fail for any prog id with a ":" in it. - * - * @param pRequestedProgramId - * @return Dispatch pointer to the COM object or null if couldn't create - */ - public static ActiveXComponent createNewInstance(String pRequestedProgramId) { - ActiveXComponent mCreatedDispatch = null; - try { - mCreatedDispatch = new ActiveXComponent(); - mCreatedDispatch.coCreateInstance(pRequestedProgramId); - } catch (Exception e) { - mCreatedDispatch = null; - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("Unable to co-create instance of " - + pRequestedProgramId); - } - } - return mCreatedDispatch; - } - - /** - * Most code should use the standard ActiveXComponent(String) constructor - * and not this factory method. This method exists for applications that - * need special behavior. Experimental in release 1.9.2. - *

- * Factory that returns a Dispatch wrapped around the result of a - * getActiveObject() call. This differs from the standard constructor in - * that it throws no exceptions and returns null on failure. - *

- * This will fail for any prog id with a ":" in it - * - * @param pRequestedProgramId - * @return Dispatch pointer to a COM object or null if wasn't already - * running - */ - public static ActiveXComponent connectToActiveInstance( - String pRequestedProgramId) { - ActiveXComponent mCreatedDispatch = null; - try { - mCreatedDispatch = new ActiveXComponent(); - mCreatedDispatch.getActiveInstance(pRequestedProgramId); - } catch (Exception e) { - mCreatedDispatch = null; - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("Unable to attach to running instance of " - + pRequestedProgramId); - } - } - return mCreatedDispatch; - } - - /** - * @see com.jacob.com.Dispatch#finalize() - */ - @Override - protected void finalize() { - super.finalize(); - } - - /* - * ============================================================ - * - * start of instance based calls to the COM layer - * =========================================================== - */ - - /** - * retrieves a property and returns it as a Variant - * - * @param propertyName - * @return variant value of property - */ - public Variant getProperty(String propertyName) { - return Dispatch.get(this, propertyName); - } - - /** - * retrieves a property and returns it as an ActiveX component - * - * @param propertyName - * @return Dispatch representing the object under the property name - */ - public ActiveXComponent getPropertyAsComponent(String propertyName) { - return new ActiveXComponent(Dispatch.get(this, propertyName) - .toDispatch()); - - } - - /** - * retrieves a property and returns it as a Boolean - * - * @param propertyName - * property we are looking up - * @return boolean value of property - */ - public boolean getPropertyAsBoolean(String propertyName) { - return Dispatch.get(this, propertyName).getBoolean(); - } - - /** - * retrieves a property and returns it as a byte - * - * @param propertyName - * property we are looking up - * @return byte value of property - */ - public byte getPropertyAsByte(String propertyName) { - return Dispatch.get(this, propertyName).getByte(); - } - - /** - * retrieves a property and returns it as a String - * - * @param propertyName - * @return String value of property - */ - public String getPropertyAsString(String propertyName) { - return Dispatch.get(this, propertyName).getString(); - - } - - /** - * retrieves a property and returns it as a int - * - * @param propertyName - * @return the property value as an int - */ - public int getPropertyAsInt(String propertyName) { - return Dispatch.get(this, propertyName).getInt(); - } - - /** - * sets a property on this object - * - * @param propertyName - * property name - * @param arg - * variant value to be set - */ - public void setProperty(String propertyName, Variant arg) { - Dispatch.put(this, propertyName, arg); - } - - /** - * sets a property on this object - * - * @param propertyName - * property name - * @param arg - * variant value to be set - */ - public void setProperty(String propertyName, Dispatch arg) { - Dispatch.put(this, propertyName, arg); - } - - /** - * sets a property to be the value of the string - * - * @param propertyName - * @param propertyValue - */ - public void setProperty(String propertyName, String propertyValue) { - this.setProperty(propertyName, new Variant(propertyValue)); - } - - /** - * sets a property as a boolean value - * - * @param propertyName - * @param propValue - * the boolean value we want the prop set to - */ - public void setProperty(String propertyName, boolean propValue) { - this.setProperty(propertyName, new Variant(propValue)); - } - - /** - * sets a property as a boolean value - * - * @param propertyName - * @param propValue - * the boolean value we want the prop set to - */ - public void setProperty(String propertyName, byte propValue) { - this.setProperty(propertyName, new Variant(propValue)); - } - - /** - * sets the property as an int value - * - * @param propertyName - * @param propValue - * the int value we want the prop to be set to. - */ - public void setProperty(String propertyName, int propValue) { - this.setProperty(propertyName, new Variant(propValue)); - } - - /*------------------------------------------------------- - * Listener logging helpers - *------------------------------------------------------- - */ - - /** - * This boolean determines if callback events should be logged - */ - public static boolean shouldLogEvents = false; - - /** - * used by the doc and application listeners to get intelligent logging - * - * @param description - * event description - * @param args - * args passed in (variants) - * - */ - public void logCallbackEvent(String description, Variant[] args) { - String argString = ""; - if (args != null && ActiveXComponent.shouldLogEvents) { - if (args.length > 0) { - argString += " args: "; - } - for (int i = 0; i < args.length; i++) { - short argType = args[i].getvt(); - argString += ",[" + i + "]"; - // break out the byref bits if they are on this - if ((argType & Variant.VariantByref) == Variant.VariantByref) { - // show the type and the fact that its byref - argString += "(" - + (args[i].getvt() & ~Variant.VariantByref) + "/" - + Variant.VariantByref + ")"; - } else { - // show the type - argString += "(" + argType + ")"; - } - argString += "="; - if (argType == Variant.VariantDispatch) { - Dispatch foo = (args[i].getDispatch()); - argString += foo; - } else if ((argType & Variant.VariantBoolean) == Variant.VariantBoolean) { - // do the boolean thing - if ((argType & Variant.VariantByref) == Variant.VariantByref) { - // boolean by ref - argString += args[i].getBooleanRef(); - } else { - // boolean by value - argString += args[i].getBoolean(); - } - } else if ((argType & Variant.VariantString) == Variant.VariantString) { - // do the string thing - if ((argType & Variant.VariantByref) == Variant.VariantByref) { - // string by ref - argString += args[i].getStringRef(); - } else { - // string by value - argString += args[i].getString(); - } - } else { - argString += args[i].toString(); - } - } - System.out.println(description + argString); - } - } - - /* - * ============================================================== - * - * covers for dispatch call methods - * ============================================================= - */ - - /** - * makes a dispatch call for the passed in action and no parameter - * - * @param callAction - * @return ActiveXComponent representing the results of the call - */ - public ActiveXComponent invokeGetComponent(String callAction) { - return new ActiveXComponent(invoke(callAction).toDispatch()); - } - - /** - * makes a dispatch call for the passed in action and single parameter - * - * @param callAction - * @param parameters - * @return ActiveXComponent representing the results of the call - */ - public ActiveXComponent invokeGetComponent(String callAction, - Variant... parameters) { - return new ActiveXComponent(invoke(callAction, parameters).toDispatch()); - } - - /** - * invokes a single parameter call on this dispatch that returns no value - * - * @param actionCommand - * @param parameter - * @return a Variant but that may be null for some calls - */ - public Variant invoke(String actionCommand, String parameter) { - return Dispatch.call(this, actionCommand, parameter); - } - - /** - * makes a dispatch call to the passed in action with a single boolean - * parameter - * - * @param actionCommand - * @param parameter - * @return Variant result - */ - public Variant invoke(String actionCommand, boolean parameter) { - return Dispatch.call(this, actionCommand, new Variant(parameter)); - } - - /** - * makes a dispatch call to the passed in action with a single int parameter - * - * @param actionCommand - * @param parameter - * @return Variant result of the invoke (Dispatch.call) - */ - public Variant invoke(String actionCommand, int parameter) { - return Dispatch.call(this, actionCommand, new Variant(parameter)); - } - - /** - * makes a dispatch call to the passed in action with a string and integer - * parameter (this was put in for some application) - * - * @param actionCommand - * @param parameter1 - * @param parameter2 - * @return Variant result - */ - public Variant invoke(String actionCommand, String parameter1, - int parameter2) { - return Dispatch.call(this, actionCommand, parameter1, new Variant( - parameter2)); - } - - /** - * makes a dispatch call to the passed in action with two integer parameters - * (this was put in for some application) - * - * @param actionCommand - * @param parameter1 - * @param parameter2 - * @return a Variant but that may be null for some calls - */ - public Variant invoke(String actionCommand, int parameter1, int parameter2) { - return Dispatch.call(this, actionCommand, new Variant(parameter1), - new Variant(parameter2)); - } - - /** - * makes a dispatch call for the passed in action and no parameter - * - * @param callAction - * @return a Variant but that may be null for some calls - */ - public Variant invoke(String callAction) { - return Dispatch.call(this, callAction); - } - - /** - * This is really a cover for call(String,Variant[]) that should be - * eliminated call with a variable number of args mainly used for quit. - * - * @param name - * @param args - * @return Variant returned by the invoke (Dispatch.callN) - */ - public Variant invoke(String name, Variant... args) { - return Dispatch.callN(this, name, args); - } - -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXDispatchEvents.java b/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXDispatchEvents.java deleted file mode 100644 index 16bb649..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXDispatchEvents.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.activeX; - -import com.jacob.com.Dispatch; -import com.jacob.com.DispatchEvents; -import com.jacob.com.InvocationProxy; - -/** - * RELEASE 1.12 EXPERIMENTAL. - *

- * Use this exactly like the DispatchEvents class. This class plugs in an - * ActiveXInvocationProxy instead of an InvocationProxy. It is the - * ActiveXInvocationProxy that implements the reflection calls and invoke the - * found java event callbacks. See ActiveXInvocationProxy for details. - * - * - */ -public class ActiveXDispatchEvents extends DispatchEvents { - - /** - * This is the most commonly used constructor. - *

- * Creates the event callback linkage between the the MS program represented - * by the Dispatch object and the Java object that will receive the - * callback. - * - * @param sourceOfEvent - * Dispatch object who's MS app will generate callbacks - * @param eventSink - * Java object that wants to receive the events - */ - public ActiveXDispatchEvents(Dispatch sourceOfEvent, Object eventSink) { - super(sourceOfEvent, eventSink, null); - } - - /** - * None of the samples use this constructor. - *

- * Creates the event callback linkage between the the MS program represented - * by the Dispatch object and the Java object that will receive the - * callback. - * - * @param sourceOfEvent - * Dispatch object who's MS app will generate callbacks - * @param eventSink - * Java object that wants to receive the events - * @param progId - * ??? - */ - public ActiveXDispatchEvents(Dispatch sourceOfEvent, Object eventSink, - String progId) { - super(sourceOfEvent, eventSink, progId, null); - } - - /** - * Creates the event callback linkage between the the MS program represented - * by the Dispatch object and the Java object that will receive the - * callback. - * - *

-	 * >ActiveXDispatchEvents de = 
-	 * 			new ActiveXDispatchEvents(someDispatch,someEventHAndler,
-	 * 				"Excel.Application",
-	 * 				"C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.EXE");
-	 * 
-	 * @param sourceOfEvent Dispatch object who's MS app will generate callbacks
-	 * @param eventSink Java object that wants to receive the events
-	 * @param progId , mandatory if the typelib is specified
-	 * @param typeLib The location of the typelib to use
-	 * 
-	 */
-	public ActiveXDispatchEvents(Dispatch sourceOfEvent, Object eventSink,
-			String progId, String typeLib) {
-		super(sourceOfEvent, eventSink, progId, typeLib);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jacob.com.DispatchEvents#getInvocationProxy(java.lang.Object)
-	 */
-	protected InvocationProxy getInvocationProxy(Object pTargetObject) {
-		InvocationProxy newProxy = new ActiveXInvocationProxy();
-		newProxy.setTarget(pTargetObject);
-		return newProxy;
-	}
-
-}
diff --git a/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXInvocationProxy.java b/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXInvocationProxy.java
deleted file mode 100644
index 94c4f31..0000000
--- a/vendor/jacob/1.15-M4/java/com/jacob/activeX/ActiveXInvocationProxy.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 1999-2004 Sourceforge JACOB Project.
- * All rights reserved. Originator: Dan Adler (http://danadler.com).
- * Get more information about JACOB at http://sourceforge.net/projects/jacob-project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-package com.jacob.activeX;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import com.jacob.com.InvocationProxy;
-import com.jacob.com.NotImplementedException;
-import com.jacob.com.Variant;
-
-/**
- * RELEASE 1.12 EXPERIMENTAL.
- * 

- * This class that lets event handlers receive events with all java objects as - * parameters. The standard Jacob event methods all accept an array of Variant - * objects. When using this class, you can set up your event methods as regular - * java methods with the correct number of parameters of the correct java type. - * This does NOT work for any event that wishes to accept a call back and modify - * the calling parameters to tell windows what to do. An example is when an - * event lets the receiver cancel the action by setting a boolean flag to false. - * The java objects cannot be modified and their values will not be passed back - * into the originating Variants even if they could be modified. - *

- * This class acts as a proxy between the windows event callback mechanism and - * the Java classes that are looking for events. It assumes that all of the Java - * classes that are looking for events implement methods with the same names as - * the windows events and that the implemented methods native java objects of - * the type and order that match the windows documentation. The methods can - * return void or a Variant that will be returned to the calling layer. All - * Event methods that will be recognized by InvocationProxyAllEvents have the - * signature - * - * void eventMethodName(Object,Object...) or - * Object eventMethodName(Object,Object...) - */ -public class ActiveXInvocationProxy extends InvocationProxy { - - /* - * (non-Javadoc) - * - * @see com.jacob.com.InvocationProxy#invoke(java.lang.String, - * com.jacob.com.Variant[]) - */ - @SuppressWarnings("unchecked") - public Variant invoke(String methodName, Variant targetParameters[]) { - Variant mVariantToBeReturned = null; - if (mTargetObject == null) { - // structured programming guidlines say this return should not be up - // here - return null; - } - Class targetClass = mTargetObject.getClass(); - if (methodName == null) { - throw new IllegalArgumentException( - "InvocationProxy: missing method name"); - } - if (targetParameters == null) { - throw new IllegalArgumentException( - "InvocationProxy: missing Variant parameters"); - } - try { - Method targetMethod; - Object parametersAsJavaObjects[] = getParametersAsJavaObjects(targetParameters); - Class parametersAsJavaClasses[] = getParametersAsJavaClasses(parametersAsJavaObjects); - targetMethod = targetClass.getMethod(methodName, - parametersAsJavaClasses); - if (targetMethod != null) { - // protected classes can't be invoked against even if they - // let you grab the method. you could do - // targetMethod.setAccessible(true); - // but that should be stopped by the security manager - Object mReturnedByInvocation = null; - mReturnedByInvocation = targetMethod.invoke(mTargetObject, - parametersAsJavaObjects); - if (mReturnedByInvocation == null) { - mVariantToBeReturned = null; - } else if (!(mReturnedByInvocation instanceof Variant)) { - mVariantToBeReturned = new Variant(mReturnedByInvocation); - } else { - mVariantToBeReturned = (Variant) mReturnedByInvocation; - } - } - } catch (SecurityException e) { - // what causes this exception? - e.printStackTrace(); - } catch (NoSuchMethodException e) { - // this happens whenever the listener doesn't implement all the - // methods - } catch (IllegalArgumentException e) { - // we can throw these inside the catch block so need to re-throw it - Exception oneWeShouldToss = new IllegalArgumentException( - "Unable to map parameters for method " + methodName + ": " - + e.toString()); - oneWeShouldToss.printStackTrace(); - } catch (IllegalAccessException e) { - // can't access the method on the target instance for some reason - e.printStackTrace(); - } catch (InvocationTargetException e) { - // invocation of target method failed - e.printStackTrace(); - } - return mVariantToBeReturned; - - } - - /** - * creates a method signature compatible array of classes from an array of - * parameters - * - * @param parametersAsJavaObjects - * @return - */ - @SuppressWarnings("unchecked") - private Class[] getParametersAsJavaClasses(Object[] parametersAsJavaObjects) { - if (parametersAsJavaObjects == null) { - throw new IllegalArgumentException( - "This only works with an array of parameters"); - } - int numParameters = parametersAsJavaObjects.length; - Class parametersAsJavaClasses[] = new Class[numParameters]; - for (int parameterIndex = 0; parameterIndex < numParameters; parameterIndex++) { - Object oneParameterObject = parametersAsJavaObjects[parameterIndex]; - if (oneParameterObject == null) { - parametersAsJavaClasses[parameterIndex] = null; - } else { - Class oneParameterClass = oneParameterObject.getClass(); - parametersAsJavaClasses[parameterIndex] = oneParameterClass; - } - } - return parametersAsJavaClasses; - } - - /** - * converts an array of Variants to their associated Java types - * - * @param targetParameters - * @return - */ - private Object[] getParametersAsJavaObjects(Variant[] targetParameters) { - if (targetParameters == null) { - throw new IllegalArgumentException( - "This only works with an array of parameters"); - } - int numParameters = targetParameters.length; - Object parametersAsJavaObjects[] = new Object[numParameters]; - for (int parameterIndex = 0; parameterIndex < numParameters; parameterIndex++) { - Variant oneParameterObject = targetParameters[parameterIndex]; - if (oneParameterObject == null) { - parametersAsJavaObjects[parameterIndex] = null; - } else { - try { - parametersAsJavaObjects[parameterIndex] = oneParameterObject - .toJavaObject(); - } catch (NotImplementedException nie) { - throw new IllegalArgumentException( - "Can't convert parameter " + parameterIndex - + " type " + oneParameterObject.getvt() - + " to java object: " + nie.getMessage()); - } - } - } - return parametersAsJavaObjects; - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/ComException.java b/vendor/jacob/1.15-M4/java/com/jacob/com/ComException.java deleted file mode 100644 index 8632577..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/ComException.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * Standard exception thrown by com jni code when there is a problem - */ -public abstract class ComException extends JacobException { - - /** - * COM code initializes this filed with an appropriate return code that was - * returned by the underlying com code - */ - protected int hr; - /** - * No documentation is available at this time. Someone should document this - * field - */ - protected int m_helpContext; - /** - * No documentation is available at this time. Someone should document this - * field - */ - protected String m_helpFile; - /** - * No documentation is available at this time. Someone should document this - * field - */ - protected String m_source; - - /** - * constructor - * - */ - public ComException() { - super(); - } - - /** - * constructor with error code? - * - * @param newHr ?? - */ - public ComException(int newHr) { - super(); - this.hr = newHr; - } - - /** - * @param newHr - * @param description - */ - public ComException(int newHr, String description) { - super(description); - this.hr = newHr; - } - - /** - * @param newHr - * @param source - * @param helpFile - * @param helpContext - */ - public ComException(int newHr, String source, String helpFile, - int helpContext) { - super(); - this.hr = newHr; - m_source = source; - m_helpFile = helpFile; - m_helpContext = helpContext; - } - - /** - * @param newHr - * @param description - * @param source - * @param helpFile - * @param helpContext - */ - public ComException(int newHr, String description, String source, - String helpFile, int helpContext) { - super(description); - this.hr = newHr; - m_source = source; - m_helpFile = helpFile; - m_helpContext = helpContext; - } - - /** - * @param description - */ - public ComException(String description) { - super(description); - } - - /** - * @return int representation of the help context - */ - // Methods - public int getHelpContext() { - return m_helpContext; - } - - /** - * @return String ??? help file - */ - public String getHelpFile() { - return m_helpFile; - } - - /** - * @return int hr result ?? - */ - public int getHResult() { - return hr; - } - - /** - * @return String source ?? - */ - public String getSource() { - return m_source; - } -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/ComFailException.java b/vendor/jacob/1.15-M4/java/com/jacob/com/ComFailException.java deleted file mode 100644 index 20ce1a8..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/ComFailException.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * COM Fail Exception class raised when there is a problem - */ -public class ComFailException extends ComException { - /** - * eclipse generated to get rid of a wanring - */ - private static final long serialVersionUID = -266047261992987700L; - - /** - * Constructor - * - * @param hrNew - */ - public ComFailException(int hrNew) { - super(hrNew); - } - - /** - * Constructor - * - * @param hrNew - * @param message - */ - public ComFailException(int hrNew, String message) { - super(hrNew, message); - } - - /** - * @param hrNew - * @param source - * @param helpFile - * @param helpContext - */ - public ComFailException(int hrNew, String source, String helpFile, - int helpContext) { - super(hrNew, source, helpFile, helpContext); - } - - /** - * Constructor - * - * @param hrNew - * @param description - * @param source - * @param helpFile - * @param helpContext - */ - public ComFailException(int hrNew, String description, String source, - String helpFile, int helpContext) { - super(hrNew, description, source, helpFile, helpContext); - } - - /** - * No argument Constructor - */ - public ComFailException() { - super(); - } - - /** - * @param message - */ - public ComFailException(String message) { - super(message); - } -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/ComThread.java b/vendor/jacob/1.15-M4/java/com/jacob/com/ComThread.java deleted file mode 100644 index aeee598..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/ComThread.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * Represents a COM level thread This is an abstract class because all the - * methods are static and no instances are ever created. - */ -public abstract class ComThread { - private static final int MTA = 0x0; - - private static final int STA = 0x2; - - /** - * Comment for haveSTA - */ - public static boolean haveSTA = false; - - /** - * Comment for mainSTA - */ - public static MainSTA mainSTA = null; - - /** - * Initialize the current java thread to be part of the Multi-threaded COM - * Apartment - */ - public static synchronized void InitMTA() { - InitMTA(false); - } - - /** - * Initialize the current java thread to be an STA - */ - public static synchronized void InitSTA() { - InitSTA(false); - } - - /** - * Initialize the current java thread to be part of the Multi-threaded COM - * Apartment, if createMainSTA is true, create a separate MainSTA thread - * that will house all Apartment Threaded components - * - * @param createMainSTA - */ - public static synchronized void InitMTA(boolean createMainSTA) { - Init(createMainSTA, MTA); - } - - /** - * Initialize the current java thread to be an STA COM Apartment, if - * createMainSTA is true, create a separate MainSTA thread that will house - * all Apartment Threaded components - * - * @param createMainSTA - */ - public static synchronized void InitSTA(boolean createMainSTA) { - Init(createMainSTA, STA); - } - - /** - * - */ - public static synchronized void startMainSTA() { - mainSTA = new MainSTA(); - haveSTA = true; - } - - /** - * - */ - public static synchronized void quitMainSTA() { - if (mainSTA != null) - mainSTA.quit(); - } - - /** - * Initialize the current java thread to be part of the MTA/STA COM - * Apartment - * - * @param createMainSTA - * @param mode - */ - public static synchronized void Init(boolean createMainSTA, int mode) { - if (createMainSTA && !haveSTA) { - // if the current thread is going to be in the MTA and there - // is no STA thread yet, then create a main STA thread - // to avoid COM creating its own - startMainSTA(); - } - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ComThread: before Init: " + mode); - } - doCoInitialize(mode); - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ComThread: after Init: " + mode); - } - ROT.addThread(); - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ComThread: after ROT.addThread: " + mode); - } - } - - /** - * Call CoUninitialize to release this java thread from COM - */ - public static synchronized void Release() { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ComThread: before clearObjects"); - } - ROT.clearObjects(); - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ComThread: before UnInit"); - } - doCoUninitialize(); - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ComThread: after UnInit"); - } - } - - /** - * @deprecated the java model leave the responsibility of clearing up - * objects to the Garbage Collector. Our programming model - * should not require that the user specifically remove object - * from the thread. - * - * This will remove an object from the ROT - * @param o - */ - @Deprecated - public static synchronized void RemoveObject(JacobObject o) { - ROT.removeObject(o); - } - - /** - * @param threadModel - */ - public static native void doCoInitialize(int threadModel); - - /** - * - */ - public static native void doCoUninitialize(); - - /** - * load the Jacob DLL. We do this in case COMThread is called before any - * other reference to one of the JacboObject subclasses is made. - */ - static { - LibraryLoader.loadJacobLibrary(); - } -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/Currency.java b/vendor/jacob/1.15-M4/java/com/jacob/com/Currency.java deleted file mode 100644 index 749506c..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/Currency.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.jacob.com; - -/** - * Most COM bridges use java.lang.Long as their Java data type for COM Currency - * data. This is because COM currency is a 64 bit number where the last 4 digits - * represent the milli-cents. We wanted to support 64 bit Long values for x64 - * platforms so that meant we wanted to map Java.LONG to COM.LONG even though it - * only works for 64 bit platforms. The end result was we needed a new - * representation for Money so we have this. - *

- * In the future, this should convert to and from BigDecimal or Double - */ -public class Currency { - Long embeddedValue = null; - - /** - * constructor that takes a long already in COM representation - * - * @param newValue - */ - public Currency(long newValue) { - embeddedValue = new Long(newValue); - } - - /** - * constructor that takes a String already in COM representation - * - * @param newValue - */ - public Currency(String newValue) { - embeddedValue = new Long(newValue); - } - - /** - * - * @return the currency as a primitive long - */ - public long longValue() { - return embeddedValue.longValue(); - } - - /** - * getter to the inner storage so that cmpareTo can work - * - * @return the embedded long value - */ - protected Long getLongValue() { - return embeddedValue; - } - - /** - * compares the values of two currencies - * - * @param anotherCurrency - * @return the usual compareTo results - */ - public int compareTo(Currency anotherCurrency) { - return embeddedValue.compareTo(anotherCurrency.getLongValue()); - } - - /** - * standard comparison - * - * @param o - * must be Currency or Long - * @return the usual compareTo results - */ - public int compareTo(Object o) { - if (o instanceof Currency) { - return compareTo((Currency) o); - } else if (o instanceof Long) { - return embeddedValue.compareTo((Long) o); - } else - throw new IllegalArgumentException( - "Can only compare to Long and Currency not " - + o.getClass().getName()); - } - - /** - * {@inheritDoc} - */ - public boolean equals(Object o) { - if (o == null) { - return false; - } else if (compareTo(o) == 0) { - return true; - } else { - return false; - } - } -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/DateUtilities.java b/vendor/jacob/1.15-M4/java/com/jacob/com/DateUtilities.java deleted file mode 100644 index 195ba33..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/DateUtilities.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -import java.util.Calendar; -import java.util.Date; - -/** - * java / windows date conversion utilities - * - * @author joe - * - */ -public class DateUtilities { - - /** - * converts a windows time to a Java Date Object - * - * @param comTime - * @return Date object representing the windows time as specified in comTime - */ - static public Date convertWindowsTimeToDate(double comTime) { - return new Date(convertWindowsTimeToMilliseconds(comTime)); - } - - /** - * Convert a COM time from functions Date(), Time(), Now() to a Java time - * (milliseconds). Visual Basic time values are based to 30.12.1899, Java - * time values are based to 1.1.1970 (= 0 milliseconds). The difference is - * added to the Visual Basic value to get the corresponding Java value. The - * Visual Basic double value reads: .<1 - * day percentage fraction>, e.g. "38100.6453" means: 38100 days since - * 30.12.1899 plus (24 hours * 0.6453). Example usage: - * Date javaDate = new Date(toMilliseconds (vbDate));. - * - * @param comTime - * COM time. - * @return Java time. - */ - static public long convertWindowsTimeToMilliseconds(double comTime) { - long result = 0; - - // code from jacobgen: - comTime = comTime - 25569D; - Calendar cal = Calendar.getInstance(); - result = Math.round(86400000L * comTime) - - cal.get(Calendar.ZONE_OFFSET); - cal.setTime(new Date(result)); - result -= cal.get(Calendar.DST_OFFSET); - - return result; - }// convertWindowsTimeToMilliseconds() - - /** - * converts a java date to a windows time object (is this timezone safe?) - * - * @param javaDate - * the java date to be converted to windows time - * @return the double representing the date in a form windows understands - */ - static public double convertDateToWindowsTime(Date javaDate) { - if (javaDate == null) { - throw new IllegalArgumentException( - "cannot convert null to windows time"); - } - return convertMillisecondsToWindowsTime(javaDate.getTime()); - } - - /** - * Convert a Java time to a COM time. - * - * @param milliseconds - * Java time. - * @return COM time. - */ - static public double convertMillisecondsToWindowsTime(long milliseconds) { - double result = 0.0; - - // code from jacobgen: - Calendar cal = Calendar.getInstance(); - cal.setTimeInMillis(milliseconds); - milliseconds += (cal.get(Calendar.ZONE_OFFSET) + cal - .get(Calendar.DST_OFFSET)); // add GMT offset - result = (milliseconds / 86400000D) + 25569D; - - return result; - }// convertMillisecondsToWindowsTime() -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/Dispatch.java b/vendor/jacob/1.15-M4/java/com/jacob/com/Dispatch.java deleted file mode 100644 index 4902c46..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/Dispatch.java +++ /dev/null @@ -1,872 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. All rights reserved. Originator: Dan Adler - * (http://danadler.com). Get more information about JACOB at - * http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or modify it under the terms of the - * GNU Lesser General Public License as published by the Free Software Foundation; either version - * 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with this library; - * if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ -package com.jacob.com; - -/** - * Object represents MS level dispatch object. Each instance of this points at - * some data structure on the MS windows side. - * - * - *

- * You're going to live here a lot - */ -public class Dispatch extends JacobObject { - - /** - * Used to set the locale in a call. The user locale is another option - */ - public static final int LOCALE_SYSTEM_DEFAULT = 2048; - /** used by callN() and callSubN() */ - public static final int Method = 1; - /** used by callN() and callSubN() */ - public static final int Get = 2; - /** used by put() */ - public static final int Put = 4; - /** not used, probably intended for putRef() */ - public static final int PutRef = 8; - /** - * One of legal values for GetDispId. Not used in this layer and probably - * not needed. - */ - public static final int fdexNameCaseSensitive = 1; - - /** - * This is public because Dispatch.cpp knows its name and accesses it - * directly to get the dispatch id. You really can't rename it or make it - * private - */ - public int m_pDispatch; - - /** program Id passed in by ActiveX components in their constructor */ - private String programId = null; - - private static int NOT_ATTACHED = 0; - - /** - * Dummy empty array used one doesn't have to be created on every invocation - */ - private final static Object[] NO_OBJECT_ARGS = new Object[0]; - /** - * Dummy empty array used one doesn't have to be created on every invocation - */ - private final static Variant[] NO_VARIANT_ARGS = new Variant[0]; - /** - * Dummy empty array used one doesn't have to be created on every invocation - */ - private final static int[] NO_INT_ARGS = new int[0]; - - /** - * zero argument constructor that sets the dispatch pointer to 0 This is the - * only way to create a Dispatch without a value in the pointer field. - */ - public Dispatch() { - m_pDispatch = NOT_ATTACHED; - } - - /** - * This constructor calls createInstance with progid. This is the - * constructor used by the ActiveXComponent or by programs that don't like - * the activeX interface but wish to create new connections to windows - * programs. - *

- * This constructor always creates a new windows/program object because it - * is based on the CoCreate() windows function. - *

- * - * @param requestedProgramId - * @throws IllegalArgumentException - * if null is passed in as the program id - *

- */ - public Dispatch(String requestedProgramId) { - programId = requestedProgramId; - if (programId != null && !"".equals(programId)) { - createInstanceNative(requestedProgramId); - } else { - throw new IllegalArgumentException( - "Dispatch(String) does not accept null or an empty string as a parameter"); - } - } - - /** - * native call createInstance only used by the constructor with the same - * parm type. This probably should be private. It is the wrapper for the - * Windows CoCreate() call - *

- * This ends up calling CoCreate down in the JNI layer - *

- * The behavior is different if a ":" character exists in the progId. In - * that case CoGetObject and CreateInstance (someone needs to describe this - * better) - * - * @param progid - */ - private native void createInstanceNative(String progid); - - /** - * native call getActiveInstance only used by the constructor with the same - * parm type. This probably should be private. It is the wrapper for the - * Windows GetActiveObject() call - *

- * This ends up calling GetActiveObject down in the JNI layer - *

- * This does not have the special behavior for program ids with ":" in them - * that createInstance has. - * - * @param progid - */ - private native void getActiveInstanceNative(String progid); - - /** - * Wrapper around the native method - * - * @param pProgramIdentifier - * name of the program you wish to connect to - */ - protected void getActiveInstance(String pProgramIdentifier) { - if (pProgramIdentifier == null || "".equals(pProgramIdentifier)) { - throw new IllegalArgumentException("program id is required"); - } - this.programId = pProgramIdentifier; - getActiveInstanceNative(pProgramIdentifier); - } - - /** - * native call coCreateInstance only used by the constructor with the same - * parm type. This probably should be private. It is the wrapper for the - * Windows CoCreate() call - *

- * This ends up calling CoCreate down in the JNI layer - *

- * This does not have the special behavior for program ids with ":" in them - * that createInstance has. - * - * @param progid - */ - private native void coCreateInstanceNative(String progid); - - /** - * Wrapper around the native method - * - * @param pProgramIdentifier - */ - protected void coCreateInstance(String pProgramIdentifier) { - if (pProgramIdentifier == null || "".equals(pProgramIdentifier)) { - throw new IllegalArgumentException("program id is required"); - } - this.programId = pProgramIdentifier; - coCreateInstanceNative(pProgramIdentifier); - } - - /** - * Return a different interface by IID string. - *

- * Once you have a Dispatch object, you can navigate to the other interfaces - * of a COM object by calling QueryInterafce. The argument is an IID string - * in the format: "{9BF24410-B2E0-11D4-A695-00104BFF3241}". You typically - * get this string from the idl file (it's called uuid in there). Any - * interface you try to use must be derived from IDispatch. T The atl - * example uses this. - *

- * The Dispatch instance resulting from this query is instanciated in the - * JNI code. - * - * @param iid - * @return Dispatch a disptach that matches ?? - */ - public native Dispatch QueryInterface(String iid); - - /** - * Constructor that only gets called from JNI QueryInterface calls JNI code - * that looks up the object for the key passed in. The JNI CODE then creates - * a new dispatch object using this constructor - * - * @param pDisp - */ - protected Dispatch(int pDisp) { - m_pDispatch = pDisp; - } - - /** - * Constructor to be used by subclass that want to swap themselves in for - * the default Dispatch class. Usually you will have a class like - * WordDocument that is a subclass of Dispatch and it will have a - * constructor public WordDocument(Dispatch). That constructor should just - * call this constructor as super(Dispatch) - * - * @param dispatchToBeDisplaced - */ - public Dispatch(Dispatch dispatchToBeDisplaced) { - // TAKE OVER THE IDispatch POINTER - this.m_pDispatch = dispatchToBeDisplaced.m_pDispatch; - // NULL OUT THE INPUT POINTER - dispatchToBeDisplaced.m_pDispatch = NOT_ATTACHED; - } - - /** - * returns the program id if an activeX component created this otherwise it - * returns null. This was added to aid in debugging - * - * @return the program id an activeX component was created against - */ - public String getProgramId() { - return programId; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#finalize() - */ - @Override - protected void finalize() { - safeRelease(); - } - - /* - * (non-Javadoc) - * - * @see com.jacob.com.JacobObject#safeRelease() - */ - @Override - public void safeRelease() { - super.safeRelease(); - if (isAttached()) { - release(); - m_pDispatch = NOT_ATTACHED; - } else { - // looks like a double release - if (isDebugEnabled()) { - debug(this.getClass().getName() + ":" + this.hashCode() - + " double release"); - } - } - } - - /** - * - * @return true if there is an underlying windows dispatch object - */ - protected boolean isAttached() { - if (m_pDispatch == NOT_ATTACHED) { - return false; - } else { - return true; - } - } - - /** - * @param theOneInQuestion - * dispatch being tested - * @throws IllegalStateException - * if this dispatch isn't hooked up - * @throws IllegalArgumentException - * if null the dispatch under test is null - */ - private static void throwIfUnattachedDispatch(Dispatch theOneInQuestion) { - if (theOneInQuestion == null) { - throw new IllegalArgumentException( - "Can't pass in null Dispatch object"); - } else if (theOneInQuestion.isAttached()) { - return; - } else { - throw new IllegalStateException( - "Dispatch not hooked to windows memory"); - } - } - - /** - * now private so only this object can access was: call this to explicitly - * release the com object before gc - * - */ - private native void release(); - - /** - * not implemented yet - * - * @param dispatchTarget - * @param name - * @param val - * @throws com.jacob.com.NotImplementedException - */ - public static void put_Casesensitive(Dispatch dispatchTarget, String name, - Object val) { - throw new NotImplementedException("not implemented yet"); - } - - /* - * ============================================================ start of the - * invokev section - * =========================================================== - */ - // eliminate _Guid arg - /** - * @param dispatchTarget - * @param name - * @param dispID - * @param lcid - * @param wFlags - * @param vArg - * @param uArgErr - */ - public static void invokeSubv(Dispatch dispatchTarget, String name, - int dispID, int lcid, int wFlags, Variant[] vArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - invokev(dispatchTarget, name, dispID, lcid, wFlags, vArg, uArgErr); - } - - /** - * @param dispatchTarget - * @param name - * @param wFlags - * @param vArg - * @param uArgErr - */ - public static void invokeSubv(Dispatch dispatchTarget, String name, - int wFlags, Variant[] vArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - invokev(dispatchTarget, name, 0, Dispatch.LOCALE_SYSTEM_DEFAULT, - wFlags, vArg, uArgErr); - } - - /** - * @param dispatchTarget - * @param dispID - * @param wFlags - * @param vArg - * @param uArgErr - */ - public static void invokeSubv(Dispatch dispatchTarget, int dispID, - int wFlags, Variant[] vArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - invokev(dispatchTarget, null, dispID, Dispatch.LOCALE_SYSTEM_DEFAULT, - wFlags, vArg, uArgErr); - } - - /** - * not implemented yet - * - * @param dispatchTarget - * @param name - * @param values - * @return never returns anything because - * @throws com.jacob.com.NotImplementedException - */ - public static Variant callN_CaseSensitive(Dispatch dispatchTarget, - String name, Object[] values) { - throw new NotImplementedException("not implemented yet"); - } - - /** - * @param dispatchTarget - * @param name - * @param args - * an array of argument objects - */ - public static void callSubN(Dispatch dispatchTarget, String name, - Object... args) { - throwIfUnattachedDispatch(dispatchTarget); - invokeSubv(dispatchTarget, name, Dispatch.Method | Dispatch.Get, - VariantUtilities.objectsToVariants(args), new int[args.length]); - } - - /** - * @param dispatchTarget - * @param dispID - * @param args - * an array of argument objects - */ - public static void callSubN(Dispatch dispatchTarget, int dispID, - Object... args) { - throwIfUnattachedDispatch(dispatchTarget); - invokeSubv(dispatchTarget, dispID, Dispatch.Method | Dispatch.Get, - VariantUtilities.objectsToVariants(args), new int[args.length]); - } - - /* - * ============================================================ start of the - * getIdsOfNames section - * =========================================================== - */ - /** - * @param dispatchTarget - * @param name - * @return int id for the passed in name - */ - public static int getIDOfName(Dispatch dispatchTarget, String name) { - int ids[] = getIDsOfNames(dispatchTarget, - Dispatch.LOCALE_SYSTEM_DEFAULT, new String[] { name }); - return ids[0]; - } - - /** - * @param dispatchTarget - * @param lcid - * @param names - * @return int[] in id array for passed in names - */ - // eliminated _Guid argument - public static native int[] getIDsOfNames(Dispatch dispatchTarget, int lcid, - String[] names); - - /** - * @param dispatchTarget - * @param names - * @return int[] int id array for passed in names - */ - // eliminated _Guid argument - public static int[] getIDsOfNames(Dispatch dispatchTarget, String[] names) { - return getIDsOfNames(dispatchTarget, Dispatch.LOCALE_SYSTEM_DEFAULT, - names); - } - - /* - * ============================================================ start of the - * invokev section - * =========================================================== - */ - /** - * @param dispatchTarget - * @param name - * @param args - * @return Variant returned by call - */ - public static Variant callN(Dispatch dispatchTarget, String name, - Object... args) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, name, Dispatch.Method | Dispatch.Get, - VariantUtilities.objectsToVariants(args), new int[args.length]); - } - - /** - * @param dispatchTarget - * @param dispID - * @param args - * @return Variant returned by call - */ - public static Variant callN(Dispatch dispatchTarget, int dispID, - Object... args) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, dispID, Dispatch.Method | Dispatch.Get, - VariantUtilities.objectsToVariants(args), new int[args.length]); - } - - /** - * @param dispatchTarget - * @param name - * @param dispID - * @param lcid - * @param wFlags - * @param oArg - * @param uArgErr - * @return Variant returned by invoke - */ - public static Variant invoke(Dispatch dispatchTarget, String name, - int dispID, int lcid, int wFlags, Object[] oArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, name, dispID, lcid, wFlags, - VariantUtilities.objectsToVariants(oArg), uArgErr); - } - - /** - * @param dispatchTarget - * @param name - * @param wFlags - * @param oArg - * @param uArgErr - * @return Variant returned by invoke - */ - public static Variant invoke(Dispatch dispatchTarget, String name, - int wFlags, Object[] oArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, name, wFlags, VariantUtilities - .objectsToVariants(oArg), uArgErr); - } - - /** - * @param dispatchTarget - * @param dispID - * @param wFlags - * @param oArg - * @param uArgErr - * @return Variant returned by invoke - */ - public static Variant invoke(Dispatch dispatchTarget, int dispID, - int wFlags, Object[] oArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, dispID, wFlags, VariantUtilities - .objectsToVariants(oArg), uArgErr); - } - - /* - * ============================================================ start of the - * callN section =========================================================== - */ - - /** - * @param dispatchTarget - * @param name - * @return Variant returned by underlying callN - */ - public static Variant call(Dispatch dispatchTarget, String name) { - throwIfUnattachedDispatch(dispatchTarget); - return callN(dispatchTarget, name, NO_VARIANT_ARGS); - } - - /** - * @param dispatchTarget - * @param name - * @param attributes - * @return Variant returned by underlying callN - */ - public static Variant call(Dispatch dispatchTarget, String name, - Object... attributes) { - throwIfUnattachedDispatch(dispatchTarget); - return callN(dispatchTarget, name, attributes); - } - - /** - * @param dispatchTarget - * @param dispid - * @return Variant returned by underlying callN - */ - public static Variant call(Dispatch dispatchTarget, int dispid) { - throwIfUnattachedDispatch(dispatchTarget); - return callN(dispatchTarget, dispid, NO_VARIANT_ARGS); - } - - /** - * @param dispatchTarget - * @param dispid - * @param attributes - * var arg list of attributes that will be passed to the - * underlying function - * @return Variant returned by underlying callN - */ - public static Variant call(Dispatch dispatchTarget, int dispid, - Object... attributes) { - throwIfUnattachedDispatch(dispatchTarget); - return callN(dispatchTarget, dispid, attributes); - } - - /* - * ============================================================ start of the - * invoke section - * =========================================================== - */ - /** - * @param dispatchTarget - * @param name - * @param val - */ - public static void put(Dispatch dispatchTarget, String name, Object val) { - throwIfUnattachedDispatch(dispatchTarget); - invoke(dispatchTarget, name, Dispatch.Put, new Object[] { val }, - new int[1]); - } - - /** - * @param dispatchTarget - * @param dispid - * @param val - */ - public static void put(Dispatch dispatchTarget, int dispid, Object val) { - throwIfUnattachedDispatch(dispatchTarget); - invoke(dispatchTarget, dispid, Dispatch.Put, new Object[] { val }, - new int[1]); - } - - /* - * ============================================================ start of the - * invokev section - * =========================================================== - */ - // removed _Guid argument - /** - * @param dispatchTarget - * @param name - * @param dispID - * @param lcid - * @param wFlags - * @param vArg - * @param uArgErr - * @return Variant returned by underlying invokev - */ - public static native Variant invokev(Dispatch dispatchTarget, String name, - int dispID, int lcid, int wFlags, Variant[] vArg, int[] uArgErr); - - /** - * @param dispatchTarget - * @param name - * @param wFlags - * @param vArg - * @param uArgErr - * @return Variant returned by underlying invokev - */ - public static Variant invokev(Dispatch dispatchTarget, String name, - int wFlags, Variant[] vArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, name, 0, Dispatch.LOCALE_SYSTEM_DEFAULT, - wFlags, vArg, uArgErr); - } - - /** - * @param dispatchTarget - * @param name - * @param wFlags - * @param vArg - * @param uArgErr - * @param wFlagsEx - * @return Variant returned by underlying invokev - */ - public static Variant invokev(Dispatch dispatchTarget, String name, - int wFlags, Variant[] vArg, int[] uArgErr, int wFlagsEx) { - throwIfUnattachedDispatch(dispatchTarget); - // do not implement IDispatchEx for now - return invokev(dispatchTarget, name, 0, Dispatch.LOCALE_SYSTEM_DEFAULT, - wFlags, vArg, uArgErr); - } - - /** - * @param dispatchTarget - * @param dispID - * @param wFlags - * @param vArg - * @param uArgErr - * @return Variant returned by underlying invokev - */ - public static Variant invokev(Dispatch dispatchTarget, int dispID, - int wFlags, Variant[] vArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, null, dispID, - Dispatch.LOCALE_SYSTEM_DEFAULT, wFlags, vArg, uArgErr); - } - - /* - * ============================================================ start of the - * invokeSubv section - * =========================================================== - */ - - // removed _Guid argument - /** - * @param dispatchTarget - * @param name - * @param dispid - * @param lcid - * @param wFlags - * @param oArg - * @param uArgErr - */ - public static void invokeSub(Dispatch dispatchTarget, String name, - int dispid, int lcid, int wFlags, Object[] oArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - invokeSubv(dispatchTarget, name, dispid, lcid, wFlags, VariantUtilities - .objectsToVariants(oArg), uArgErr); - } - - /* - * ============================================================ start of the - * invokeSub section - * =========================================================== - */ - /** - * @param dispatchTarget - * @param name - * @param wFlags - * @param oArg - * @param uArgErr - */ - public static void invokeSub(Dispatch dispatchTarget, String name, - int wFlags, Object[] oArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - invokeSub(dispatchTarget, name, 0, Dispatch.LOCALE_SYSTEM_DEFAULT, - wFlags, oArg, uArgErr); - } - - /** - * @param dispatchTarget - * @param dispid - * @param wFlags - * @param oArg - * @param uArgErr - */ - public static void invokeSub(Dispatch dispatchTarget, int dispid, - int wFlags, Object[] oArg, int[] uArgErr) { - throwIfUnattachedDispatch(dispatchTarget); - invokeSub(dispatchTarget, null, dispid, Dispatch.LOCALE_SYSTEM_DEFAULT, - wFlags, oArg, uArgErr); - } - - /* - * ============================================================ start of the - * callSubN section - * =========================================================== - */ - /** - * makes call to native callSubN - * - * @param dispatchTarget - * @param name - */ - public static void callSub(Dispatch dispatchTarget, String name) { - throwIfUnattachedDispatch(dispatchTarget); - callSubN(dispatchTarget, name, NO_OBJECT_ARGS); - } - - /** - * makes call to native callSubN - * - * @param dispatchTarget - * @param name - * @param attributes - * var args list of attributes to be passed to underlying - * functions - */ - public static void callSub(Dispatch dispatchTarget, String name, - Object... attributes) { - throwIfUnattachedDispatch(dispatchTarget); - callSubN(dispatchTarget, name, attributes); - } - - /** - * makes call to native callSubN - * - * @param dispatchTarget - * @param dispid - */ - public static void callSub(Dispatch dispatchTarget, int dispid) { - throwIfUnattachedDispatch(dispatchTarget); - callSubN(dispatchTarget, dispid, NO_OBJECT_ARGS); - } - - /** - * makes call to native callSubN - * - * @param dispatchTarget - * @param dispid - * @param attributes - * var args list of attributes to be passed to underlying - * function - */ - public static void callSub(Dispatch dispatchTarget, int dispid, - Object... attributes) { - throwIfUnattachedDispatch(dispatchTarget); - callSubN(dispatchTarget, dispid, attributes); - } - - /* - * ============================================================ start of the - * invokev section - * =========================================================== - */ - /** - * Cover for call to underlying invokev() - * - * @param dispatchTarget - * @param name - * @return Variant returned by the request for retrieval of parameter - */ - public static Variant get(Dispatch dispatchTarget, String name) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, name, Dispatch.Get, NO_VARIANT_ARGS, - NO_INT_ARGS); - } - - /** - * Cover for call to underlying invokev() - * - * @param dispatchTarget - * @param dispid - * @return Variant returned by the request for retrieval of parameter - */ - public static Variant get(Dispatch dispatchTarget, int dispid) { - throwIfUnattachedDispatch(dispatchTarget); - return invokev(dispatchTarget, dispid, Dispatch.Get, NO_VARIANT_ARGS, - NO_INT_ARGS); - } - - /* - * ============================================================ start of the - * invoke section - * =========================================================== - */ - /** - * cover for underlying call to invoke - * - * @param dispatchTarget - * @param name - * @param val - */ - public static void putRef(Dispatch dispatchTarget, String name, Object val) { - throwIfUnattachedDispatch(dispatchTarget); - invoke(dispatchTarget, name, Dispatch.PutRef, new Object[] { val }, - new int[1]); - } - - /** - * cover for underlying call to invoke - * - * @param dispatchTarget - * @param dispid - * @param val - */ - public static void putRef(Dispatch dispatchTarget, int dispid, Object val) { - throwIfUnattachedDispatch(dispatchTarget); - invoke(dispatchTarget, dispid, Dispatch.PutRef, new Object[] { val }, - new int[1]); - } - - /** - * not implemented yet - * - * @param dispatchTarget - * @param name - * @return Variant never returned - * @throws com.jacob.com.NotImplementedException - */ - public static Variant get_CaseSensitive(Dispatch dispatchTarget, String name) { - throw new NotImplementedException("not implemented yet"); - } - - /** - * Cover for native method - * - * @param disp - * @param dispid - * @param lcid - * @return 0 if the dispatch is still active and 1 if it has exited - */ - public static native int hasExited(Dispatch disp, int dispid, int lcid); - - /** - * The method is used to poll until it returns 1, indicating that the COM - * server in gone. - *

- * Sourceforge feature request 2927058 - * - * @param dispatchTarget - * @return 0 if the dispatch is still active and 1 if it has exited - */ - public static int hasExited(Dispatch dispatchTarget) { - throwIfUnattachedDispatch(dispatchTarget); - return hasExited(dispatchTarget, 0, LOCALE_SYSTEM_DEFAULT); - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchEvents.java b/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchEvents.java deleted file mode 100644 index a9ca0a1..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchEvents.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * This class creates the scaffolding for event callbacks. Every instance of tis - * acts as a wrapper around some java object that wants callbacks from the - * microsoft side. It represents the connection between Java and COM for - * callbacks. - *

- * The callback mechanism will take any event that it receives and try and find - * a java method with the same name that accepts the Variant... as a parameter. - * It will then wrap the call back data in the Variant array and call the java - * method of the object that this DispatchEvents object was initialized with. - *

- * Instances of this class are created with "sink object" that will receive the - * event messages. The sink object is wrapped in an Invocation handler that - * actually receives the messages and then forwards them on to the "sink - * object". The constructors recognize when an instance of InvocationProxy is - * passed in and do not create a new InvocationProxy as a wrapper. They instead - * use the passed in InvocationProxy. - * - */ -public class DispatchEvents extends JacobObject { - - /** - * pointer to an MS data struct. The COM layer knows the name of this - * variable and puts the windows memory pointer here. - */ - int m_pConnPtProxy = 0; - - /** - * the wrapper for the event sink. This object is the one that will be sent - * a message when an event occurs in the MS layer. Normally, the - * InvocationProxy will forward the messages to a wrapped object that it - * contains. - */ - InvocationProxy mInvocationProxy = null; - - /** - * This is the most commonly used constructor. - *

- * Creates the event callback linkage between the the MS program represented - * by the Dispatch object and the Java object that will receive the - * callback. - *

- * Can be used on any object that implements IProvideClassInfo. - * - * @param sourceOfEvent - * Dispatch object who's MS app will generate callbacks - * @param eventSink - * Java object that wants to receive the events - */ - public DispatchEvents(Dispatch sourceOfEvent, Object eventSink) { - this(sourceOfEvent, eventSink, null); - } - - /** - * None of the samples use this constructor. - *

- * Creates the event callback linkage between the the MS program represented - * by the Dispatch object and the Java object that will receive the - * callback. - *

- * Used when the program doesn't implement IProvideClassInfo. It provides a - * way to find the TypeLib in the registry based on the programId. The - * TypeLib is looked up in the registry on the path - * HKEY_LOCAL_MACHINE/SOFTWARE/Classes/CLSID/(CLID drived from - * progid)/ProgID/Typelib - * - * @param sourceOfEvent - * Dispatch object who's MS app will generate callbacks - * @param eventSink - * Java object that wants to receive the events - * @param progId - * program id in the registry that has a TypeLib subkey. The - * progrId is mapped to a CLSID that is they used to look up the - * key to the Typelib - */ - public DispatchEvents(Dispatch sourceOfEvent, Object eventSink, - String progId) { - this(sourceOfEvent, eventSink, progId, null); - } - - /** - * Creates the event callback linkage between the the MS program represented - * by the Dispatch object and the Java object that will receive the - * callback. - *

- * This method was added because Excel doesn't implement IProvideClassInfo - * and the registry entry for Excel.Application doesn't include a typelib - * key. - * - *

-	 * DispatchEvents de = new DispatchEvents(someDispatch, someEventHAndler,
-	 * 		"Excel.Application",
-	 * 		"C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.EXE");
-	 * 
- * - * @param sourceOfEvent - * Dispatch object who's MS app will generate callbacks - * @param eventSink - * Java object that wants to receive the events - * @param progId , - * mandatory if the typelib is specified - * @param typeLib - * The location of the typelib to use - */ - public DispatchEvents(Dispatch sourceOfEvent, Object eventSink, - String progId, String typeLib) { - if (JacobObject.isDebugEnabled()) { - System.out.println("DispatchEvents: Registering " + eventSink - + "for events "); - } - if (eventSink instanceof InvocationProxy) { - mInvocationProxy = (InvocationProxy) eventSink; - } else { - mInvocationProxy = getInvocationProxy(eventSink); - } - if (mInvocationProxy != null) { - init3(sourceOfEvent, mInvocationProxy, progId, typeLib); - } else { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("Cannot register null event sink for events"); - } - throw new IllegalArgumentException( - "Cannot register null event sink for events"); - } - } - - /** - * Returns an instance of the proxy configured with pTargetObject as its - * target - * - * @param pTargetObject - * @return InvocationProxy an instance of the proxy this DispatchEvents will - * send to the COM layer - */ - protected InvocationProxy getInvocationProxy(Object pTargetObject) { - InvocationProxy newProxy = new InvocationProxyAllVariants(); - newProxy.setTarget(pTargetObject); - return newProxy; - } - - /** - * hooks up a connection point proxy by progId event methods on the sink - * object will be called by name with a signature of (Variant[] args) - * - * You must specify the location of the typeLib. - * - * @param src - * dispatch that is the source of the messages - * @param sink - * the object that will receive the messages - * @param progId - * optional program id. most folks don't need this either - * @param typeLib - * optional parameter for those programs that don't register - * their type libs (like Excel) - */ - private native void init3(Dispatch src, Object sink, String progId, - String typeLib); - - /** - * now private so only this object can asccess was: call this to explicitly - * release the com object before gc - * - */ - private native void release(); - - /* - * (non-Javadoc) - * - * @see java.lang.Object#finalize() - */ - protected void finalize() { - safeRelease(); - } - - /* - * (non-Javadoc) - * - * @see com.jacob.com.JacobObject#safeRelease() - */ - public void safeRelease() { - if (mInvocationProxy != null) { - mInvocationProxy.setTarget(null); - } - mInvocationProxy = null; - super.safeRelease(); - if (m_pConnPtProxy != 0) { - release(); - m_pConnPtProxy = 0; - } else { - // looks like a double release - if (isDebugEnabled()) { - debug("DispatchEvents:" + this.hashCode() + " double release"); - } - } - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchIdentifier.java b/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchIdentifier.java deleted file mode 100644 index cebd9f8..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchIdentifier.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * - */ -package com.jacob.com; - -/** - * A bunch of DispatchIds that were pulled out of the Dispatch class for version - * 1.14. - */ -public class DispatchIdentifier { - - private DispatchIdentifier() { - // This is utility class so there is no constructor. - } - - public static final int DISPID_UNKNOWN = -1; - public static final int DISPID_VALUE = 0; - public static final int DISPID_PROPERTYPUT = -3; - public static final int DISPID_NEWENUM = -4; - public static final int DISPID_EVALUATE = -5; - public static final int DISPID_CONSTRUCTOR = -6; - public static final int DISPID_DESTRUCTOR = -7; - public static final int DISPID_COLLECT = -8; - public static final int DISPID_AUTOSIZE = -500; - public static final int DISPID_BACKCOLOR = -501; - public static final int DISPID_BACKSTYLE = -502; - public static final int DISPID_BORDERCOLOR = -503; - public static final int DISPID_BORDERSTYLE = -504; - public static final int DISPID_BORDERWIDTH = -505; - public static final int DISPID_DRAWMODE = -507; - public static final int DISPID_DRAWSTYLE = -508; - public static final int DISPID_DRAWWIDTH = -509; - public static final int DISPID_FILLCOLOR = -510; - public static final int DISPID_FILLSTYLE = -511; - public static final int DISPID_FONT = -512; - public static final int DISPID_FORECOLOR = -513; - public static final int DISPID_ENABLED = -514; - public static final int DISPID_HWND = -515; - public static final int DISPID_TABSTOP = -516; - public static final int DISPID_TEXT = -517; - public static final int DISPID_CAPTION = -518; - public static final int DISPID_BORDERVISIBLE = -519; - public static final int DISPID_APPEARANCE = -520; - public static final int DISPID_MOUSEPOINTER = -521; - public static final int DISPID_MOUSEICON = -522; - public static final int DISPID_PICTURE = -523; - public static final int DISPID_VALID = -524; - public static final int DISPID_READYSTATE = -525; - public static final int DISPID_REFRESH = -550; - public static final int DISPID_DOCLICK = -551; - public static final int DISPID_ABOUTBOX = -552; - public static final int DISPID_CLICK = -600; - public static final int DISPID_DBLCLICK = -601; - public static final int DISPID_KEYDOWN = -602; - public static final int DISPID_KEYPRESS = -603; - public static final int DISPID_KEYUP = -604; - public static final int DISPID_MOUSEDOWN = -605; - public static final int DISPID_MOUSEMOVE = -606; - public static final int DISPID_MOUSEUP = -607; - public static final int DISPID_ERROREVENT = -608; - public static final int DISPID_READYSTATECHANGE = -609; - public static final int DISPID_AMBIENT_BACKCOLOR = -701; - public static final int DISPID_AMBIENT_DISPLAYNAME = -702; - public static final int DISPID_AMBIENT_FONT = -703; - public static final int DISPID_AMBIENT_FORECOLOR = -704; - public static final int DISPID_AMBIENT_LOCALEID = -705; - public static final int DISPID_AMBIENT_MESSAGEREFLECT = -706; - public static final int DISPID_AMBIENT_SCALEUNITS = -707; - public static final int DISPID_AMBIENT_TEXTALIGN = -708; - public static final int DISPID_AMBIENT_USERMODE = -709; - public static final int DISPID_AMBIENT_UIDEAD = -710; - public static final int DISPID_AMBIENT_SHOWGRABHANDLES = -711; - public static final int DISPID_AMBIENT_SHOWHATCHING = -712; - public static final int DISPID_AMBIENT_DISPLAYASDEFAULT = -713; - public static final int DISPID_AMBIENT_SUPPORTSMNEMONICS = -714; - public static final int DISPID_AMBIENT_AUTOCLIP = -715; - public static final int DISPID_AMBIENT_APPEARANCE = -716; - public static final int DISPID_AMBIENT_CODEPAGE = -725; - public static final int DISPID_AMBIENT_PALETTE = -726; - public static final int DISPID_AMBIENT_CHARSET = -727; - public static final int DISPID_AMBIENT_TRANSFERPRIORITY = -728; -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchProxy.java b/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchProxy.java deleted file mode 100644 index c8f08cf..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/DispatchProxy.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * If you need to pass a COM Dispatch object between STA threads, you have to - * marshall the interface. This class is used as follows: the STA that creates - * the Dispatch object must construct an instance of this class. Another thread - * can then call toDispatch() on that instance and get a Dispatch pointer which - * has been marshalled. WARNING: You can only call toDispatch() once! If you - * need to call it multiple times (or from multiple threads) you need to - * construct a separate DispatchProxy instance for each such case! - */ -public class DispatchProxy extends JacobObject { - /** - * Comment for m_pStream - */ - public int m_pStream; - - /** - * Marshals the passed in dispatch into the stream - * - * @param localDispatch - */ - public DispatchProxy(Dispatch localDispatch) { - MarshalIntoStream(localDispatch); - } - - /** - * - * @return Dispatch the dispatch retrieved from the stream - */ - public Dispatch toDispatch() { - return MarshalFromStream(); - } - - private native void MarshalIntoStream(Dispatch d); - - private native Dispatch MarshalFromStream(); - - /** - * now private so only this object can access was: call this to explicitly - * release the com object before gc - * - */ - private native void release(); - - /* - * (non-Javadoc) - * - * @see java.lang.Object#finalize() - */ - public void finalize() { - safeRelease(); - } - - /* - * (non-Javadoc) - * - * @see com.jacob.com.JacobObject#safeRelease() - */ - public void safeRelease() { - super.safeRelease(); - if (m_pStream != 0) { - release(); - m_pStream = 0; - } else { - // looks like a double release - if (isDebugEnabled()) { - debug(this.getClass().getName() + ":" + this.hashCode() - + " double release"); - } - } - } -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/EnumVariant.java b/vendor/jacob/1.15-M4/java/com/jacob/com/EnumVariant.java deleted file mode 100644 index 8ff298f..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/EnumVariant.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * An implementation of IEnumVariant based on code submitted by Thomas Hallgren - * (mailto:Thomas.Hallgren@eoncompany.com) - */ -public class EnumVariant extends JacobObject implements - java.util.Enumeration { - private int m_pIEnumVARIANT; - - private final Variant[] m_recBuf = new Variant[1]; - - // this only gets called from JNI - // - protected EnumVariant(int pIEnumVARIANT) { - m_pIEnumVARIANT = pIEnumVARIANT; - } - - /** - * @param disp - */ - public EnumVariant(Dispatch disp) { - int[] hres = new int[1]; - Variant evv = Dispatch.invokev(disp, DispatchIdentifier.DISPID_NEWENUM, - Dispatch.Get, new Variant[0], hres); - if (evv.getvt() != Variant.VariantObject) - // - // The DISPID_NEWENUM did not result in a valid object - // - throw new ComFailException("Can't obtain EnumVARIANT"); - - EnumVariant tmp = evv.toEnumVariant(); - m_pIEnumVARIANT = tmp.m_pIEnumVARIANT; - tmp.m_pIEnumVARIANT = 0; - } - - /** - * Implements java.util.Enumeration - * - * @return boolean true if there are more elements in this enumeration - */ - public boolean hasMoreElements() { - { - if (m_recBuf[0] == null) { - if (this.Next(m_recBuf) <= 0) - return false; - } - return true; - } - } - - /** - * Implements java.util.Enumeration - * - * @return next element in the enumeration - */ - public Variant nextElement() { - Variant last = m_recBuf[0]; - if (last == null) { - if (this.Next(m_recBuf) <= 0) - throw new java.util.NoSuchElementException(); - last = m_recBuf[0]; - } - m_recBuf[0] = null; - return last; - } - - /** - * Get next element in collection or null if at end - * - * @return Variant that is next in the collection - * @deprecated use nextElement() instead - */ - @Deprecated - public Variant Next() { - if (hasMoreElements()) - return nextElement(); - return null; - } - - /** - * This should be private and wrapped to protect JNI layer. - * - * @param receiverArray - * @return Returns the next variant object pointer as an int from windows - * layer - */ - public native int Next(Variant[] receiverArray); - - /** - * This should be private and wrapped to protect JNI layer. - * - * @param count - * number to skip - */ - public native void Skip(int count); - - /** - * This should be private and wrapped to protect JNI layer - */ - public native void Reset(); - - /** - * now private so only this object can access was: call this to explicitly - * release the com object before gc - * - */ - private native void release(); - - /* - * (non-Javadoc) - * - * @see java.lang.Object#finalize() - */ - protected void finalize() { - safeRelease(); - } - - /* - * (non-Javadoc) - * - * @see com.jacob.com.JacobObject#safeRelease() - */ - public void safeRelease() { - super.safeRelease(); - if (m_pIEnumVARIANT != 0) { - this.release(); - m_pIEnumVARIANT = 0; - } else { - // looks like a double release - if (isDebugEnabled()) { - debug(this.getClass().getName() + ":" + this.hashCode() - + " double release"); - } - } - } -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/InvocationProxy.java b/vendor/jacob/1.15-M4/java/com/jacob/com/InvocationProxy.java deleted file mode 100644 index 7687d84..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/InvocationProxy.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * @version $Id$ - * @author joe - * - * DispatchEvents wraps this class around any event handlers before making the - * JNI call that sets up the link with EventProxy. This means that - * EventProxy.cpp just calls invoke(String,Variant[]) against the instance of - * this class. Then this class does reflection against the event listener to - * call the actual event methods. The event methods can return void or return a - * Variant. Any value returned will be passed back to the calling windows module - * by the Jacob JNI layer. - *

- * - * The void returning signature is the standard legacy signature. The Variant - * returning signature was added in 1.10 to support event handlers returning - * values. - * - */ -public abstract class InvocationProxy { - - /** - * the object we will try and forward to. - */ - protected Object mTargetObject = null; - - /** - * dummy constructor for subclasses that don't actually wrap anything and - * just want to override the invoke() method - */ - protected InvocationProxy() { - super(); - } - - /** - * The method actually invoked by EventProxy.cpp. The method name is - * calculated by the underlying JNI code from the MS windows Callback - * function name. The method is assumed to take an array of Variant objects. - * The method may return a Variant or be a void. Those are the only two - * options that will not blow up. - *

- * Subclasses that override this should make sure mTargetObject is not null - * before processing. - * - * @param methodName - * name of method in mTargetObject we will invoke - * @param targetParameters - * Variant[] that is the single parameter to the method - * @return an object that will be returned to the com event caller - */ - public abstract Variant invoke(String methodName, - Variant targetParameters[]); - - /** - * used by EventProxy.cpp to create variant objects in the right thread - * - * @return Variant object that will be used by the COM layer - */ - public Variant getVariant() { - return new VariantViaEvent(); - } - - /** - * Sets the target for this InvocationProxy. - * - * @param pTargetObject - * @throws IllegalArgumentException - * if target is not publicly accessible - */ - public void setTarget(Object pTargetObject) { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("InvocationProxy: setting target " - + pTargetObject); - } - if (pTargetObject != null) { - // JNI code apparently bypasses this check and could operate against - // protected classes. This seems like a security issue... - // maybe it was because JNI code isn't in a package? - if (!java.lang.reflect.Modifier.isPublic(pTargetObject.getClass() - .getModifiers())) { - throw new IllegalArgumentException( - "InvocationProxy only public classes can receive event notifications"); - } - } - mTargetObject = pTargetObject; - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/InvocationProxyAllVariants.java b/vendor/jacob/1.15-M4/java/com/jacob/com/InvocationProxyAllVariants.java deleted file mode 100644 index 3a5d846..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/InvocationProxyAllVariants.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -/** - * This class acts as a proxy between the windows event callback mechanism and - * the Java classes that are looking for events. It assumes that all of the Java - * classes that are looking for events implement methods with the same names as - * the windows events and that the implemented methods accept an array of - * variant objects. The methods can return void or a Variant that will be - * returned to the calling layer. All Event methods that will be recognized by - * InvocationProxyAllEvents have the signature - * - * void eventMethodName(Variant[]) or - * Variant eventMethodName(Variant[]) - */ -public class InvocationProxyAllVariants extends InvocationProxy { - - /* - * (non-Javadoc) - * - * @see com.jacob.com.InvocationProxy#invoke(java.lang.String, - * com.jacob.com.Variant[]) - */ - @SuppressWarnings("unchecked") - public Variant invoke(String methodName, Variant targetParameters[]) { - Variant mVariantToBeReturned = null; - if (mTargetObject == null) { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("InvocationProxy: received notification (" - + methodName + ") with no target set"); - } - // structured programming guidlines say this return should not be up - // here - return null; - } - Class targetClass = mTargetObject.getClass(); - if (methodName == null) { - throw new IllegalArgumentException( - "InvocationProxy: missing method name"); - } - if (targetParameters == null) { - throw new IllegalArgumentException( - "InvocationProxy: missing Variant parameters"); - } - try { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("InvocationProxy: trying to invoke " - + methodName + " on " + mTargetObject); - } - Method targetMethod; - targetMethod = targetClass.getMethod(methodName, - new Class[] { Variant[].class }); - if (targetMethod != null) { - // protected classes can't be invoked against even if they - // let you grab the method. you could do - // targetMethod.setAccessible(true); - // but that should be stopped by the security manager - Object mReturnedByInvocation = null; - mReturnedByInvocation = targetMethod.invoke(mTargetObject, - new Object[] { targetParameters }); - if (mReturnedByInvocation == null) { - mVariantToBeReturned = null; - } else if (!(mReturnedByInvocation instanceof Variant)) { - // could try and convert to Variant here. - throw new IllegalArgumentException( - "InvocationProxy: invokation of target method returned " - + "non-null non-variant object: " - + mReturnedByInvocation); - } else { - mVariantToBeReturned = (Variant) mReturnedByInvocation; - } - } - } catch (SecurityException e) { - // what causes this exception? - e.printStackTrace(); - } catch (NoSuchMethodException e) { - // this happens whenever the listener doesn't implement all the - // methods - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("InvocationProxy: listener (" + mTargetObject - + ") doesn't implement " + methodName); - } - } catch (IllegalArgumentException e) { - e.printStackTrace(); - // we can throw these inside the catch block so need to re-throw it - throw e; - } catch (IllegalAccessException e) { - // can't access the method on the target instance for some reason - if (JacobObject.isDebugEnabled()) { - JacobObject - .debug("InvocationProxy: probably tried to access public method on non public class" - + methodName); - } - e.printStackTrace(); - } catch (InvocationTargetException e) { - // invocation of target method failed - e.printStackTrace(); - } - return mVariantToBeReturned; - - } -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/JacobException.java b/vendor/jacob/1.15-M4/java/com/jacob/com/JacobException.java deleted file mode 100644 index 6e2e926..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/JacobException.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * The parent class of all Jacob exceptions. They all used to be based off of - * RuntimeException or ComException but it was decided to base them all off of - * one owned by this project. - */ -public class JacobException extends RuntimeException { - - /** - * - */ - private static final long serialVersionUID = -1637125318746002715L; - - /** - * Default constructor. Calls super with a "No Message Provided" string - */ - public JacobException() { - super("No Message Provided"); - } - - /** - * standard constructor - * - * @param message - */ - public JacobException(String message) { - super(message); - } -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/JacobObject.java b/vendor/jacob/1.15-M4/java/com/jacob/com/JacobObject.java deleted file mode 100644 index acd346c..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/JacobObject.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * The superclass of all Jacob objects. It is used to create a standard API - * framework and to facilitate memory management for Java and COM memory - * elements. - *

- * All instances of this class and subclasses are automatically managed by the - * ROT. This means the ROT cannot be a subclass of JacobObject. - *

- * All COM object created by JACOB extend this class so that we can - * automatically release them when the thread is detached from COM - if we leave - * it to the finalizer it will call the release from another thread, which may - * result in a segmentation violation. - */ -public class JacobObject { - - /** - * Standard constructor that adds this JacobObject to the memory management - * pool. - */ - public JacobObject() { - ROT.addObject(this); - } - - /** - * Finalizers call this method. This method should release any COM data - * structures in a way that it can be called multiple times. This can happen - * if someone manually calls this and then a finalizer calls it. - */ - public void safeRelease() { - // currently does nothing - subclasses may do something - if (isDebugEnabled()) { - // this used to do a toString() but that is bad for SafeArray - debug("SafeRelease: " + this.getClass().getName()); - } - } - - /** - * When things go wrong, it is useful to be able to debug the ROT. - */ - private static final boolean DEBUG = - // true; - "true".equalsIgnoreCase(System.getProperty("com.jacob.debug")); - - protected static boolean isDebugEnabled() { - return DEBUG; - } - - /** - * Loads JacobVersion.Properties and returns the value of version in it - * - * @deprecated use JacobReleaseInfo.getBuildDate() instead. - * @return String value of version in JacobVersion.Properties or "" if none - */ - @Deprecated - public static String getBuildDate() { - return JacobReleaseInfo.getBuildDate(); - } - - /** - * Loads JacobVersion.Properties and returns the value of version in it - * - * @deprecated use JacobReleaseInfo.getBuildVersion() instead. - * @return String value of version in JacobVersion.Properties or "" if none - */ - @Deprecated - public static String getBuildVersion() { - return JacobReleaseInfo.getBuildVersion(); - } - - /** - * Very basic debugging function. - * - * @param istrMessage - */ - protected static void debug(String istrMessage) { - if (isDebugEnabled()) { - System.out.println(Thread.currentThread().getName() + ": " - + istrMessage); - } - } - - /** - * force the jacob DLL to be loaded whenever this class is referenced - */ - static { - LibraryLoader.loadJacobLibrary(); - } - -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/JacobReleaseInfo.java b/vendor/jacob/1.15-M4/java/com/jacob/com/JacobReleaseInfo.java deleted file mode 100644 index a41b239..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/JacobReleaseInfo.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.jacob.com; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -/** - * An interface to the version properties file. This code was removed from - * JacobObject because it doesn't belong there. - * - */ -public class JacobReleaseInfo { - - /** - * holds the build version as retrieved from the version properties file - * that exists in the JAR. This can be retrieved by calling the static - * method getBuildVersion() - * - * @see #getBuildVersion() - */ - private static String buildVersion = ""; - /** - * holds the build date as retrieved from the version properties file that - * exists in the JAR This can be retrieved by calling the static method - * getBuildDate() - * - * @see #getBuildDate() - */ - private static String buildDate = ""; - /** the name of the jacob version properties file */ - private static final String PROPERTY_FILE_NAME = "META-INF/JacobVersion.properties"; - - /** - * Loads version information from PROPERTY_FILE_NAME that was built as part - * of this release. - * - * @throws IllegalStateException - * when it can't find the version properties file - */ - private static void loadVersionProperties() { - Properties versionProps = new Properties(); - // can't use system class loader cause won't work in JavaWebStart - InputStream stream = JacobReleaseInfo.class.getClassLoader() - .getResourceAsStream(PROPERTY_FILE_NAME); - // This should never happen. This is an attempt to make something work - // for WebSphere. They may be using some kind of Servlet loader that - // needs an absolute path based search - if (stream == null) { - stream = JacobReleaseInfo.class.getClassLoader() - .getResourceAsStream("/" + PROPERTY_FILE_NAME); - } - // A report came in that WebSphere had trouble finding the file - // so lets trap it. Plus, it's a good idea anyway. - if (stream == null) { - throw new IllegalStateException( - "Can't find " - + PROPERTY_FILE_NAME - + " using JacobReleaseInfo.class.getClassLoader().getResourceAsStream()"); - } else { - try { - versionProps.load(stream); - stream.close(); - buildVersion = (String) versionProps.get("version"); - buildDate = (String) versionProps.get("build.date"); - } catch (IOException ioe) { - ioe.printStackTrace(); - System.err.println("Warning! Couldn't load props " + ioe); - } - } - } - - /** - * loads PROPERT_FILE_NAME and returns the value of version in it - * - * @return String value of version in PROPERT_FILE_NAME or "" if none - */ - public static String getBuildDate() { - if (buildDate.equals("")) { - loadVersionProperties(); - } - return buildDate; - } - - /** - * loads PROPERT_FILE_NAME and returns the value of version in it - * - * @return String value of version in PROPERT_FILE_NAME or "" if none - */ - public static String getBuildVersion() { - if (buildVersion.equals("")) { - loadVersionProperties(); - } - return buildVersion; - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/LibraryLoader.java b/vendor/jacob/1.15-M4/java/com/jacob/com/LibraryLoader.java deleted file mode 100644 index 4fd2740..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/LibraryLoader.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1999-2007 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -import java.util.Enumeration; -import java.util.HashSet; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; -import java.util.Set; - -/** - * Utility class to centralize the way in which the jacob JNI library is loaded. - *

- * - * This supports defining the path or library name using system properties or a - * custom resource file. If desired, jacob can auto-detect the correct version - * of the DLL for 32 or 64 bit windows, as long as you have named them - * differently. - * - *

    - *
  1. If system property {@link #JACOB_DLL_PATH} is defined, the file located - * there will be loaded as the jacob dll using System.load().
  2. - * - *
  3. If system property {@link #JACOB_DLL_NAME} is defined, the file located - * there will be loaded as the jacob dll.
  4. - *
  5. If system property {@link #JACOB_DLL_NAME_X86} and - * {@link #JACOB_DLL_NAME_X64} are defined, the file located there will be - * loaded as the jacob dll, depending on the version of Windows.
  6. - * - *
  7. If {@link #JACOB_DLL_NAME} is defined in the - * {@code com.jacob.com.JacobLibraryLoader} resource file, the specified dll - * will be loaded from the {@code java.library.path}.
  8. - *
  9. If {@link #JACOB_DLL_NAME_X86} and {@link #JACOB_DLL_NAME_X64} are - * defined in the {@code com.jacob.com.JacobLibraryLoader} resource file, the - * specified dll will be loaded from the {@code java.library.path}, depending - * on the version of Windows.
  10. - * - *
  11. If none of the above are true, the default is to load the library named - * "jacob-<version>-<arch>" (or - * "jacob-<version>-<arch&rt;.dll") from the {@code java.library.path}. - *
  12. - *
- * - * The standard behavior for most applications is that {@code LoadLibrary()} - * will be called to load the dll. {@code LoadLibary()} searches directories - * specified in the variable {@code java.library.path}. This is why most test - * cases specify -Djava.library.path in their command line arguments. - *

- * JACOB_DLL_PATH submitted sourceforge ticket 1493647 Added 1.11
- * JACOB_DLL_NAME, JACOB_DLL_NAME_32, JACOB_DLL_NAME_64 submitted sourceforge - * ticket 1845039 Added 1.14M7 - * - * @author Scott Dickerson (sjd78) - * @author Jason Smith - */ -public final class LibraryLoader { - /** - * Name of system property (currently jacob.dll.path) that may - * contain an absolute path to the JNI library. - */ - public static final String JACOB_DLL_PATH = "jacob.dll.path"; - - /** - * Name of system property (currently jacob.dll.name) that may - * contain an alternate name for the JNI library (default is 'jacob'). - */ - public static final String JACOB_DLL_NAME = "jacob.dll.name"; - - /** - * Name of system property (currently jacob.dll.name) that may - * contain an alternate name for the JNI library (default is 'jacob'), 32 - * bit windows. - */ - public static final String JACOB_DLL_NAME_X86 = "jacob.dll.name.x86"; - - /** - * Name of system property (currently jacob.dll.name) that may - * contain an alternate name for the JNI library (default is 'jacob'), 64 - * bit windows. - */ - public static final String JACOB_DLL_NAME_X64 = "jacob.dll.name.x64"; - - /** - * Appended to "jacob" when building DLL name This string must EXACTLY match - * the string in the build.xml file - */ - public static final String DLL_NAME_MODIFIER_32_BIT = "x86"; - /** - * Appended to "jacob" when building DLL name This string must EXACTLY match - * the string in the build.xml file - */ - public static final String DLL_NAME_MODIFIER_64_BIT = "x64"; - - /** - * Load the jacob dll either from an absolute path or by a library name, - * both of which may be defined in various ways. - * - * @throws UnsatisfiedLinkError - * if the library does not exist. - */ - public static void loadJacobLibrary() { - // In some cases, a library that uses Jacob won't be able to set system - // properties - // prior to Jacob being loaded. The resource bundle provides an - // alternate way to - // override DLL name or path that will be loaded with Jacob regardless - // of other - // initialization order. - ResourceBundle resources = null; - Set keys = new HashSet(); - try { - resources = ResourceBundle.getBundle(LibraryLoader.class.getName(), - Locale.getDefault(), LibraryLoader.class.getClassLoader()); - for (Enumeration i = resources.getKeys(); i - .hasMoreElements();) { - String key = i.nextElement(); - keys.add(key); - } - } catch (MissingResourceException e) { - // Do nothing. Expected. - } - - // First, check for a defined PATH. System property overrides resource - // bundle. - String path = System.getProperty(JACOB_DLL_PATH); - if (path == null && resources != null && keys.contains(JACOB_DLL_PATH)) { - path = (String) resources.getObject(JACOB_DLL_PATH); - } - - if (path != null) { - JacobObject.debug("Loading library " + path - + " using System.loadLibrary "); - System.load(path); - } else { - // Path was not defined, so use the OS mechanism for loading - // libraries. - // Check for a defined NAME. System property overrides resource - // bundle. - String name = null; - - if (System.getProperty(JACOB_DLL_NAME) != null) { - name = System.getProperty(JACOB_DLL_NAME); - } else if (System.getProperty(JACOB_DLL_NAME_X86) != null - && shouldLoad32Bit()) { - name = System.getProperty(JACOB_DLL_NAME_X86); - } else if (System.getProperty(JACOB_DLL_NAME_X64) != null - && !shouldLoad32Bit()) { - name = System.getProperty(JACOB_DLL_NAME_X64); - } else if (resources != null && keys.contains(JACOB_DLL_NAME)) { - name = resources.getString(JACOB_DLL_NAME); - } else if (resources != null && keys.contains(JACOB_DLL_NAME_X86) - && shouldLoad32Bit()) { - name = resources.getString(JACOB_DLL_NAME_X86); - } else if (resources != null && keys.contains(JACOB_DLL_NAME_X64) - && !shouldLoad32Bit()) { - name = resources.getString(JACOB_DLL_NAME_X64); - } else { - // No alternate NAME or PATH was defined, so use the default. - // We will almost always end up here. - name = getPreferredDLLName(); - } - - JacobObject.debug("Loading library " + name - + " using System.loadLibrary "); - // System.out.println("Loading " + name); - System.loadLibrary(name); - } - } - - /** - * Developer note: This method MUST be synchronized with the DLL names - * created as part of the build process in build.xml - *

- * The DLL name is "jacob\.release" - * - * @return the preferred name of the DLL adjusted for this platform and - * version without the ".dll" extension - */ - public static String getPreferredDLLName() { - if (shouldLoad32Bit()) { - return "jacob" + "-" + JacobReleaseInfo.getBuildVersion() + "-" - + DLL_NAME_MODIFIER_32_BIT; - } else { - return "jacob" + "-" + JacobReleaseInfo.getBuildVersion() + "-" - + DLL_NAME_MODIFIER_64_BIT; - } - } - - /** - * Detects whether this is a 32-bit JVM. - * - * @return {@code true} if this is a 32-bit JVM. - */ - protected static boolean shouldLoad32Bit() { - // This guesses whether we are running 32 or 64 bit Java. - // This works for Sun and IBM JVMs version 5.0 or later. - // May need to be adjusted for non-Sun JVMs. - - String bits = System.getProperty("sun.arch.data.model", "?"); - if (bits.equals("32")) - return true; - else if (bits.equals("64")) - return false; - - // this works for jRocket - String arch = System.getProperty("java.vm.name", "?"); - if (arch.toLowerCase().indexOf("64-bit") >= 0) - return false; - - return true; - } -} // LibraryLoader diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/MainSTA.java b/vendor/jacob/1.15-M4/java/com/jacob/com/MainSTA.java deleted file mode 100644 index a87e3c4..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/MainSTA.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * We provide our own main sta thread to avoid COM tagging a random thread as - * the main STA - this is the thread in which all Apartment threaded components - * will be created if the client chooses an MTA threading model for the java - * side of the app. - */ -public class MainSTA extends STA { -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/NotImplementedException.java b/vendor/jacob/1.15-M4/java/com/jacob/com/NotImplementedException.java deleted file mode 100644 index c5773b5..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/NotImplementedException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * Thrown by java APIs that are not implemented either because they were never - * implemented or because they are being deprecated This is a subclass of - * ComException so callers can still just catch ComException. - */ -public class NotImplementedException extends JacobException { - - /** - * - */ - private static final long serialVersionUID = -9169900832852356445L; - - /** - * @param description - */ - public NotImplementedException(String description) { - super(description); - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/ROT.java b/vendor/jacob/1.15-M4/java/com/jacob/com/ROT.java deleted file mode 100644 index 7b50fd3..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/ROT.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.WeakHashMap; - -/** - * The Running Object Table (ROT) maps each thread to a collection of all the - * JacobObjects that were created in that thread. It always operates on the - * current thread so all the methods are static and they implicitly get the - * current thread. - *

- * The clearObjects method is used to release all the COM objects created by - * Jacob in the current thread prior to uninitializing COM for that thread. - *

- * Prior to 1.9, manual garbage collection was the only option in Jacob, but - * from 1.9 onward, setting the com.jacob.autogc system property allows the - * objects referenced by the ROT to be automatically GCed. Automatic GC may be - * preferable in systems with heavy event callbacks. - *

- * Is [ 1116101 ] jacob-msg 0284 relevant??? - */ -public abstract class ROT { - /** - * Manual garbage collection was the only option pre 1.9 Can staticly cache - * the results because only one value and we don't let it change during a - * run - */ - protected static final boolean USE_AUTOMATIC_GARBAGE_COLLECTION = "true" - .equalsIgnoreCase(System.getProperty("com.jacob.autogc")); - - /** - * If the code is ran from an applet that is called from javascript the Java - * Plugin does not give full permissions to the code and thus System - * properties cannot be accessed. They can be accessed at class - * initialization time. - * - * The default behavior is to include all classes in the ROT, setting a - * boolean here to indicate this prevents a call to System.getProperty as - * part of the general call flow. - */ - protected static final Boolean INCLUDE_ALL_CLASSES_IN_ROT = Boolean - .valueOf(System.getProperty("com.jacob.includeAllClassesInROT", - "true")); - - /** - * Suffix added to class name to make up property name that determines if - * this object should be stored in the ROT. This 1.13 "feature" makes it - * possible to cause VariantViaEvent objects to not be added to the ROT in - * event callbacks. - *

- * We don't have a static for the actual property because there is a - * different property for each class that may make use of this feature. - */ - protected static String PUT_IN_ROT_SUFFIX = ".PutInROT"; - - /** - * A hash table where each element is another HashMap that represents a - * thread. Each thread HashMap contains the com objects created in that - * thread - */ - private static HashMap> rot = new HashMap>(); - - /** - * adds a new thread storage area to rot - * - * @return Map corresponding to the thread that this call was made in - */ - protected synchronized static Map addThread() { - // should use the id here instead of the name because the name can be - // changed - String t_name = Thread.currentThread().getName(); - if (rot.containsKey(t_name)) { - // nothing to do - } else { - Map tab = null; - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ROT: Automatic GC flag == " - + USE_AUTOMATIC_GARBAGE_COLLECTION); - } - if (!USE_AUTOMATIC_GARBAGE_COLLECTION) { - tab = new HashMap(); - } else { - tab = new WeakHashMap(); - } - rot.put(t_name, tab); - } - return getThreadObjects(false); - } - - /** - * Returns the pool for this thread if it exists. can create a new one if - * you wish by passing in TRUE - * - * @param createIfDoesNotExist - * @return Map the collection that holds the objects created in the current - * thread - */ - protected synchronized static Map getThreadObjects( - boolean createIfDoesNotExist) { - String t_name = Thread.currentThread().getName(); - if (!rot.containsKey(t_name) && createIfDoesNotExist) { - addThread(); - } - return rot.get(t_name); - } - - /** - * Iterates across all of the entries in the Hashmap in the rot that - * corresponds to this thread. This calls safeRelease() on each entry and - * then clears the map when done and removes it from the rot. All traces of - * this thread's objects will disappear. This is called by COMThread in the - * tear down and provides a synchronous way of releasing memory - */ - protected static void clearObjects() { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ROT: " + rot.keySet().size() - + " thread tables exist"); - } - - Map tab = getThreadObjects(false); - if (tab != null) { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ROT: " + tab.keySet().size() - + " objects to clear in this thread's ROT "); - } - // walk the values - Iterator it = tab.keySet().iterator(); - while (it.hasNext()) { - JacobObject o = it.next(); - if (o != null - // can't use this cause creates a Variant if calling SafeAray - // and we get an exception modifying the collection while - // iterating - // && o.toString() != null - ) { - if (JacobObject.isDebugEnabled()) { - if (o instanceof SafeArray) { - // SafeArray create more objects when calling - // toString() - // which causes a concurrent modification exception - // in HashMap - JacobObject.debug("ROT: removing " - + o.getClass().getName()); - } else { - // Variant toString() is probably always bad in here - JacobObject.debug("ROT: removing " + o.hashCode() - + "->" + o.getClass().getName()); - } - } - o.safeRelease(); - } - } - // empty the collection - tab.clear(); - // remove the collection from rot - ROT.removeThread(); - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ROT: thread table cleared and removed"); - } - } else { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ROT: nothing to clear!"); - } - } - } - - /** - * Removes the map from the rot that is associated with the current thread. - */ - private synchronized static void removeThread() { - // should this see if it exists first? - rot.remove(Thread.currentThread().getName()); - } - - /** - * @deprecated the java model leave the responsibility of clearing up - * objects to the Garbage Collector. Our programming model - * should not require that the user specifically remove object - * from the thread.
- * This will remove an object from the ROT
- * This does not need to be synchronized because only the rot - * modification related methods need to synchronized. Each - * individual map is only modified in a single thread. - * @param o - */ - @Deprecated - protected static void removeObject(JacobObject o) { - Map tab = ROT.getThreadObjects(false); - if (tab != null) { - tab.remove(o); - } - o.safeRelease(); - } - - /** - * Adds an object to the HashMap for the current thread.
- *

- * This method does not need to be threaded because the only concurrent - * modification risk is on the hash map that contains all of the thread - * related hash maps. The individual thread related maps are only used on a - * per thread basis so there isn't a locking issue. - *

- * In addition, this method cannot be threaded because it calls - * ComThread.InitMTA. The ComThread object has some methods that call ROT so - * we could end up deadlocked. This method should be safe without the - * synchronization because the ROT works on per thread basis and the methods - * that add threads and remove thread related entries are all synchronized - * - * - * @param o - */ - protected static void addObject(JacobObject o) { - String shouldIncludeClassInROT = "true"; - // only call System.getProperty if we are not including all classes in - // the ROT. This lets us run with standard Jacob behavior in Applets - // without the security exception raised by System.getProperty in the - // flow - if (!ROT.INCLUDE_ALL_CLASSES_IN_ROT) { - shouldIncludeClassInROT = System.getProperty(o.getClass().getName() - + PUT_IN_ROT_SUFFIX, "true"); - } - if (shouldIncludeClassInROT.equalsIgnoreCase("false")) { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("JacobObject: New instance of " - + o.getClass().getName() + " not added to ROT"); - } - } else { - // first see if we have a table for this thread - Map tab = getThreadObjects(false); - if (tab == null) { - // this thread has not been initialized as a COM thread - // so make it part of MTA for backwards compatibility - ComThread.InitMTA(false); - // don't really need the "true" because the InitMTA will have - // called back to the ROT to create a table for this thread - tab = getThreadObjects(true); - } - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("ROT: adding " + o + "->" - + o.getClass().getName() - + " table size prior to addition:" + tab.size()); - } - // add the object to the table that is specific to this thread - if (tab != null) { - tab.put(o, null); - } - } - } - - /** - * ROT can't be a subclass of JacobObject because of the way ROT pools are - * managed so we force a DLL load here by referencing JacobObject - */ - static { - LibraryLoader.loadJacobLibrary(); - } - -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/STA.java b/vendor/jacob/1.15-M4/java/com/jacob/com/STA.java deleted file mode 100644 index 837e2d3..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/STA.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * A class that implements a Single Threaded Apartment. Users will subclass this - * and override OnInit() and OnQuit() where they will create and destroy a COM - * component that wants to run in an STA other than the main STA. - */ -public class STA extends Thread { - /** - * referenced by STA.cpp - */ - public int threadID; - - /** - * constructor for STA - */ - public STA() { - start(); // start the thread - } - - /* - * (non-Javadoc) - * - * @see java.lang.Thread#run() - */ - public void run() { - // init COM - ComThread.InitSTA(); - if (OnInit()) { - // this call blocks in the win32 message loop - // until quitMessagePump is called - doMessagePump(); - } - OnQuit(); - // uninit COM - ComThread.Release(); - } - - /** - * Override this method to create and initialize any COM component that you - * want to run in this thread. If anything fails, return false to terminate - * the thread. - * - * @return always returns true - */ - public boolean OnInit() { - return true; - } - - /** - * Override this method to destroy any resource before the thread exits and - * COM in uninitialized - */ - public void OnQuit() { - // there is nothing to see here - } - - /** - * calls quitMessagePump - */ - public void quit() { - quitMessagePump(); - } - - /** - * run a message pump for the main STA - */ - public native void doMessagePump(); - - /** - * quit message pump for the main STA - */ - public native void quitMessagePump(); - - /** - * STA isn't a subclass of JacobObject so a reference to it doesn't load the - * DLL without this - */ - static { - LibraryLoader.loadJacobLibrary(); - } -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/SafeArray.java b/vendor/jacob/1.15-M4/java/com/jacob/com/SafeArray.java deleted file mode 100644 index f250d81..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/SafeArray.java +++ /dev/null @@ -1,1172 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * This creates an array wrapper around Variant objects(?). This supports 1, 2 - * and n-dimensional arrays. It exists in this form because n-dimensional arrays - * were a later addition. - */ -public class SafeArray extends JacobObject { - /** The super secret int that is actually the pointer to windows memory */ - int m_pV = 0; - - /** - * Constructor. Why does this exist? Yeah, someone will post on sourceforge - * about this comment. - * - */ - public SafeArray() { - } - - /** - * Constructor. - * - * @param vt - * type of array - */ - public SafeArray(int vt) { - init(vt, new int[] { 0 }, new int[] { -1 }); - } - - /** - * Constructor for a single dimensional array whose lower bounds is 0 and - * whose upper bound is specified as a parameter - * - * @param vt - * type of the array - * @param celems - * length of the array - */ - public SafeArray(int vt, int celems) { - init(vt, new int[] { 0 }, new int[] { celems }); - } - - /** - * Creates a two dimensional SafeArray whose base indexes are 0. - * - * @param vt - * Type of the array - * @param celems1 - * length of the array in first dimension - * @param celems2 - * length of the array in second dimension - */ - public SafeArray(int vt, int celems1, int celems2) { - init(vt, new int[] { 0, 0 }, new int[] { celems1, celems2 }); - } - - /** - * Constructor with support for N-dimensional array support - *

- * You create an N-D SafeArray by: SafeArray sa = new - * SafeArray(Variant.VariantVariant, new int[] {0,0,0,0}, new int[] - * {4,4,4,4}); Where the 1st array is lower bounds and 2nd has the lengths - * of each dimension * - * - * @param vt - * @param lbounds - * @param celems - */ - public SafeArray(int vt, int lbounds[], int celems[]) { - init(vt, lbounds, celems); - } - - /** - * convert a string to a VT_UI1 array - * - * @param s - * source string - */ - public SafeArray(String s) { - char[] ca = s.toCharArray(); - init(Variant.VariantByte, new int[] { 0 }, new int[] { ca.length }); - fromCharArray(ca); - } - - /** - * convert a VT_UI1 array to string - * - * @return variant byte as a string - */ - public String asString() { - if (getvt() != Variant.VariantByte) { - return null; - } - char ja[] = toCharArray(); - return new String(ja); - } - - public native Object clone(); - - /** - * now private so only this object can access. Was: call this to explicitly - * release the com object before gc - * - */ - private native void destroy(); - - /** - * {@inheritDoc} - */ - protected void finalize() { - safeRelease(); - } - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromBooleanArray(boolean ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromByteArray(byte ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromCharArray(char ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromDoubleArray(double ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromFloatArray(float ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromIntArray(int ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromLongArray(long ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromShortArray(short ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromStringArray(String ja[]); - - /** - * populate the safe array from the passed in array of data - * - * @param ja - */ - public native void fromVariantArray(Variant ja[]); - - /** - * boolean access - * - * @param sa_idx - * @return boolean representation - */ - public native boolean getBoolean(int sa_idx); - - /** - * get boolean value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native boolean getBoolean(int indices[]); - - /** - * boolean access - * - * @param sa_idx1 - * @param sa_idx2 - * @return boolean representation - */ - public native boolean getBoolean(int sa_idx1, int sa_idx2); - - /** - * boolean access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getBooleans(int sa_idx, int nelems, boolean ja[], - int ja_start); - - /** - * byte access - * - * @param sa_idx - * @return byte representaton - */ - public native byte getByte(int sa_idx); - - /** - * get byte value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native byte getByte(int indices[]); - - /** - * byte access - * - * @param sa_idx1 - * @param sa_idx2 - * @return byte representation - */ - public native byte getByte(int sa_idx1, int sa_idx2); - - /** - * Fills byte array from contents of this array - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getBytes(int sa_idx, int nelems, byte ja[], int ja_start); - - /** - * char access - * - * @param sa_idx - * @return single character rpeesentation - */ - public native char getChar(int sa_idx); - - /** - * get char value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native char getChar(int indices[]); - - /** - * char access - * - * @param sa_idx1 - * @param sa_idx2 - * @return single character representation - */ - public native char getChar(int sa_idx1, int sa_idx2); - - /** - * char access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getChars(int sa_idx, int nelems, char ja[], int ja_start); - - /** - * double access - * - * @param sa_idx - * @return double stored in array - */ - public native double getDouble(int sa_idx); - - /** - * get double value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native double getDouble(int indices[]); - - /** - * double access - * - * @param sa_idx1 - * @param sa_idx2 - * @return double stored in array - */ - public native double getDouble(int sa_idx1, int sa_idx2); - - /** - * double access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getDoubles(int sa_idx, int nelems, double ja[], - int ja_start); - - /** - * @return the size of each element? - */ - public native int getElemSize(); - - /** - * @return The ??features of the array? - */ - public native int getFeatures(); - - /** - * float access - * - * @param sa_idx - * @return float held in array at location - */ - public native float getFloat(int sa_idx); - - /** - * get float value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native float getFloat(int indices[]); - - /** - * float access - * - * @param sa_idx1 - * @param sa_idx2 - * @return float held in array at location - */ - public native float getFloat(int sa_idx1, int sa_idx2); - - /** - * float access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getFloats(int sa_idx, int nelems, float ja[], - int ja_start); - - /** - * get int from an single dimensional array - * - * @param sa_idx - * array index - * @return int stored in array - */ - public native int getInt(int sa_idx); - - /** - * get int value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native int getInt(int indices[]); - - /** - * get int from 2 dimensional array - * - * @param sa_idx1 - * array index first dimension - * @param sa_idx2 - * array index of second dimension - * @return int stored in array - */ - public native int getInt(int sa_idx1, int sa_idx2); - - /** - * retrieves a group of ints from a single dimensional array - * - * @param sa_idx - * the index in the array to start the get - * @param nelems - * number of elements to retrieve - * @param ja - * the structure to be filled with the ints - * @param ja_start - * the start point in the java int array to start filling - */ - public native void getInts(int sa_idx, int nelems, int ja[], int ja_start); - - /** - * get int from an single dimensional array - * - * @param sa_idx - * array index - * @return long stored in array - */ - public native long getLong(int sa_idx); - - /** - * get long value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native long getLong(int indices[]); - - /** - * get long from 2 dimensional array - * - * @param sa_idx1 - * array index first dimension - * @param sa_idx2 - * array index of second dimension - * @return long stored in array - */ - public native long getLong(int sa_idx1, int sa_idx2); - - /** - * retrieves a group of longs from a single dimensional array - * - * @param sa_idx - * the index in the array to start the get - * @param nelems - * number of elements to retrieve - * @param ja - * the structure to be filled with the longs - * @param ja_start - * the start point in the java longs array to start filling - */ - public native void getLongs(int sa_idx, int nelems, long ja[], int ja_start); - - /** - * @return The lower bounds of the array? - */ - public native int getLBound(); - - /** - * @param dim - * the dimension we are checking in a multidimensional array - * @return The lower bounds of the array? - */ - public native int getLBound(int dim); - - /** - * @return The number of dimensions in this array - */ - public native int getNumDim(); - - /** - * not implemented. - * - * @return 0 - */ - public int getNumLocks() { - return 0; - } - - /** - * short access - * - * @param sa_idx - * @return short stored in array - */ - public native short getShort(int sa_idx); - - /** - * get short value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native short getShort(int indices[]); - - /** - * short access - * - * @param sa_idx1 - * @param sa_idx2 - * @return short stored in array - */ - public native short getShort(int sa_idx1, int sa_idx2); - - /** - * short access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getShorts(int sa_idx, int nelems, short ja[], - int ja_start); - - /** - * string access - * - * @param sa_idx - * @return String stored in array - * - */ - public native String getString(int sa_idx); - - /** - * get String value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native String getString(int indices[]); - - /** - * string access - * - * @param sa_idx1 - * @param sa_idx2 - * @return String stored in array - */ - public native String getString(int sa_idx1, int sa_idx2); - - /** - * string access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getStrings(int sa_idx, int nelems, String ja[], - int ja_start); - - /** - * @return The upper bounds of the array? - */ - public native int getUBound(); - - /** - * @param dim - * the dimension we are checking in a multidimensional array - * @return The upper bounds of the array? - */ - public native int getUBound(int dim); - - /** - * variant access - * - * @param sa_idx - * @return Variant held in location in the array? - */ - public native Variant getVariant(int sa_idx); - - /** - * get Variant value from N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @return the value at the specified location - */ - public native Variant getVariant(int indices[]); - - /** - * variant access - * - * @param sa_idx1 - * @param sa_idx2 - * @return Variant held in a location in the array? - */ - public native Variant getVariant(int sa_idx1, int sa_idx2); - - /** - * variant access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void getVariants(int sa_idx, int nelems, Variant ja[], - int ja_start); - - /** - * @return the Variant type - */ - public native int getvt(); - - protected native void init(int vt, int lbounds[], int celems[]); - - /** - * Does anyone want to document this? - * - * @param sa - */ - public native void reinit(SafeArray sa); - - /** - * Does anyone want to document this? - * - * @param vt - * the variant type? - */ - public native void reinterpretType(int vt); - - /** - * {@inheritDoc} - */ - public void safeRelease() { - super.safeRelease(); - if (m_pV != 0) { - destroy(); - m_pV = 0; - } else { - // looks like a double release - if (isDebugEnabled()) { - debug(this.getClass().getName() + ":" + this.hashCode() - + " double release"); - } - } - } - - /** - * boolean access - * - * @param sa_idx - * @param c - */ - public native void setBoolean(int sa_idx, boolean c); - - /** - * set boolean value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setBoolean(int indices[], boolean c); - - /** - * boolean access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setBoolean(int sa_idx1, int sa_idx2, boolean c); - - /** - * boolean access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setBooleans(int sa_idx, int nelems, boolean ja[], - int ja_start); - - /** - * byte access - * - * @param sa_idx - * @param c - */ - public native void setByte(int sa_idx, byte c); - - /** - * set byte value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setByte(int indices[], byte c); - - /** - * byte access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setByte(int sa_idx1, int sa_idx2, byte c); - - /** - * fills array with passed in bytes - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setBytes(int sa_idx, int nelems, byte ja[], int ja_start); - - /** - * char access - * - * @param sa_idx - * @param c - */ - public native void setChar(int sa_idx, char c); - - /** - * set char value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setChar(int indices[], char c); - - /** - * char access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setChar(int sa_idx1, int sa_idx2, char c); - - /** - * char access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setChars(int sa_idx, int nelems, char ja[], int ja_start); - - /** - * double access - * - * @param sa_idx - * @param c - */ - public native void setDouble(int sa_idx, double c); - - /** - * set double value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setDouble(int indices[], double c); - - /** - * double access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setDouble(int sa_idx1, int sa_idx2, double c); - - /** - * double access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setDoubles(int sa_idx, int nelems, double ja[], - int ja_start); - - /** - * float access - * - * @param sa_idx - * @param c - */ - public native void setFloat(int sa_idx, float c); - - /** - * set float value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setFloat(int indices[], float c); - - /** - * float access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setFloat(int sa_idx1, int sa_idx2, float c); - - /** - * float access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setFloats(int sa_idx, int nelems, float ja[], - int ja_start); - - /** - * sets the int value of an element in a single dimensional array - * - * @param sa_idx - * index into the array - * @param c - * the value to be set - */ - public native void setInt(int sa_idx, int c); - - /** - * set int value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setInt(int indices[], int c); - - /** - * sets the int value of a 2 dimensional array - * - * @param sa_idx1 - * index on the first dimension - * @param sa_idx2 - * index on the second dimension - * @param c - * the value to be set - */ - public native void setInt(int sa_idx1, int sa_idx2, int c); - - /** - * sets a group of ints into a single dimensional array - * - * @param sa_idx - * the index of the start of the array to put into - * @param nelems - * number of elements to be copied - * @param ja - * the new int values to be put into the array - * @param ja_start - * the start index in the array that we are copying into - * SafeArray - */ - public native void setInts(int sa_idx, int nelems, int ja[], int ja_start); - - /** - * sets the long value of an element in a single dimensional array - * - * @param sa_idx - * index into the array - * @param c - * the value to be set - */ - public native void setLong(int sa_idx, long c); - - /** - * set long value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setLong(int indices[], long c); - - /** - * sets the long value of a 2 dimensional array - * - * @param sa_idx1 - * index on the first dimension - * @param sa_idx2 - * index on the second dimension - * @param c - * the value to be set - */ - public native void setLong(int sa_idx1, int sa_idx2, long c); - - /** - * sets a group of longs into a single dimensional array - * - * @param sa_idx - * the index of the start of the array to put into - * @param nelems - * number of elements to be copied - * @param ja - * the new long values to be put into the array - * @param ja_start - * the start index in the array that we are copying into - * SafeArray - */ - public native void setLongs(int sa_idx, int nelems, long ja[], int ja_start); - - /** - * short access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setShort(int sa_idx1, int sa_idx2, short c); - - /** - * short access - * - * @param sa_idx - * @param c - */ - public native void setShort(int sa_idx, short c); - - /** - * set short value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setShort(int indices[], short c); - - /** - * short access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setShorts(int sa_idx, int nelems, short ja[], - int ja_start); - - /** - * puts a string into an element in a two dimensional array. - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setString(int sa_idx1, int sa_idx2, String c); - - /* - * ================================================================ The - * beginning of N-dimensional array support - * ================================================================ - */ - - /** - * puts a string into an element in a single dimensional safe array - * - * @param sa_idx - * @param c - */ - public native void setString(int sa_idx, String c); - - /** - * set Stringvalue in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param c - */ - public native void setString(int indices[], String c); - - /** - * string access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setStrings(int sa_idx, int nelems, String ja[], - int ja_start); - - /** - * variant access - * - * @param sa_idx1 - * @param sa_idx2 - * @param c - */ - public native void setVariant(int sa_idx1, int sa_idx2, Variant c); - - /** - * variant access - * - * @param sa_idx - * @param c - */ - public native void setVariant(int sa_idx, Variant c); - - /** - * set Variant value in N-dimensional array - * - * @param indices - - * length must equal Dimension of SafeArray - * @param v - */ - public native void setVariant(int indices[], Variant v); - - /** - * variant access - * - * @param sa_idx - * @param nelems - * @param ja - * @param ja_start - */ - public native void setVariants(int sa_idx, int nelems, Variant ja[], - int ja_start); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return boolean[] array of booleans contained in this collection - */ - public native boolean[] toBooleanArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return byte[] byte array contained in this collection - */ - public native byte[] toByteArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return char[] character array contained in this collection - */ - public native char[] toCharArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return double[] double array contained in this collection - */ - public native double[] toDoubleArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return float[] array of float contained in this collection - */ - public native float[] toFloatArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return int[] int array contained in this collection - */ - public native int[] toIntArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return long[] long array contained in this collection - */ - public native long[] toLongArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return short[] short array contained in this collection - */ - public native short[] toShortArray(); - - /** - * Standard toString() Warning, this creates new Variant objects! - * - * @return String contents of variant - */ - public String toString() { - String s = ""; - int ndim = getNumDim(); - if (ndim == 1) { - int ldim = getLBound(); - int udim = getUBound(); - for (int i = ldim; i <= udim; i++) { - Variant v = getVariant(i); - - if (((v.getvt() & Variant.VariantTypeMask) | Variant.VariantArray) == v - .getvt()) { - return s + "[" + v.toSafeArray().toString() + "]"; - } else { - s += " " + v.toString(); - } - } - } else if (ndim == 2) { - int ldim1 = getLBound(1); - int udim1 = getUBound(1); - - int ldim2 = getLBound(2); - int udim2 = getUBound(2); - - for (int i = ldim1; i <= udim1; i++) { - for (int j = ldim2; j <= udim2; j++) { - Variant v = getVariant(i, j); - s += " " + v.toString(); - } - s += "\n"; - } - } - return s; - } - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return String[] String array contained in this collection - */ - public native String[] toStringArray(); - - /** - * Retrieves the data from the array cast to a Java data type - * - * @return Variant[] array of variants contained in this collection - */ - public native Variant[] toVariantArray(); - -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/Variant.java b/vendor/jacob/1.15-M4/java/com/jacob/com/Variant.java deleted file mode 100644 index 91ae210..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/Variant.java +++ /dev/null @@ -1,2235 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.Date; - -/** - * The multi-format data type used for all call backs and most communications - * between Java and COM. It provides a single class that can handle all data - * types. - *

- * Just loading this class creates 3 variants that get added to the ROT - *

- * PROPVARIANT introduces new types so eventually Variant will need to be - * upgraded to support PropVariant types. - * http://blogs.msdn.com/benkaras/archive/2006/09/13/749962.aspx - *

- * This object no longer implements Serializable because serialization is broken - * (and has been since 2000/xp). The underlying marshalling/unmarshalling code - * is broken in the JNI layer. - */ -public class Variant extends JacobObject { - - /** - * Use this constant for optional parameters - */ - public final static com.jacob.com.Variant DEFAULT; - - /** - * Same than {@link #DEFAULT} - */ - public final static com.jacob.com.Variant VT_MISSING; - - /** - * Use for true/false variant parameters - */ - public final static com.jacob.com.Variant VT_TRUE = new com.jacob.com.Variant( - true); - - /** - * Use for true/false variant parameters - */ - public final static com.jacob.com.Variant VT_FALSE = new com.jacob.com.Variant( - false); - - /** variant's type is empty : equivalent to VB Nothing and VT_EMPTY */ - public static final short VariantEmpty = 0; - - /** variant's type is null : equivalent to VB Null and VT_NULL */ - public static final short VariantNull = 1; - - /** variant's type is short VT_I2 */ - public static final short VariantShort = 2; - - /** variant's type is int VT_I4, a Long in VC */ - public static final short VariantInt = 3; - - /** variant's type is float VT_R4 */ - public static final short VariantFloat = 4; - - /** variant's type is double VT_R8 */ - public static final short VariantDouble = 5; - - /** variant's type is currency VT_CY */ - public static final short VariantCurrency = 6; - - /** variant's type is date VT_DATE */ - public static final short VariantDate = 7; - - /** variant's type is string also known as VT_BSTR */ - public static final short VariantString = 8; - - /** variant's type is dispatch VT_DISPATCH */ - public static final short VariantDispatch = 9; - - /** variant's type is error VT_ERROR */ - public static final short VariantError = 10; - - /** variant's type is boolean VT_BOOL */ - public static final short VariantBoolean = 11; - - /** variant's type is variant it encapsulate another variant VT_VARIANT */ - public static final short VariantVariant = 12; - - /** variant's type is object VT_UNKNOWN */ - public static final short VariantObject = 13; - - /** variant's type is object VT_DECIMAL */ - public static final short VariantDecimal = 14; - - // VT_I1 = 16 - - /** variant's type is byte VT_UI1 */ - public static final short VariantByte = 17; - - // VT_UI2 = 18 - // VT_UI4 = 19 - - /** - * variant's type is 64 bit long integer VT_I8 - not yet implemented in - * Jacob because we have to decide what to do with Currency and because its - * only supported on XP and later. No win2k, NT or 2003 server. - */ - public static final short VariantLongInt = 20; - - // VT_UI8 = 21 - // VT_INT = 22 - // VT_UNIT = 23 - // VT_VOID = 24 - // VT_HRESULT = 25 - - /** - * This value is for reference only and is not to be used by any callers - */ - public static final short VariantPointer = 26; - - // VT_SAFEARRAY = 27 - // VT_CARRARY = 28 - // VT_USERDEFINED = 29 - - /** what is this? VT_TYPEMASK && VT_BSTR_BLOB 0xfff */ - public static final short VariantTypeMask = 4095; - - /** variant's type is array VT_ARRAY 0x2000 */ - public static final short VariantArray = 8192; - - /** variant's type is a reference (to IDispatch?) VT_BYREF 0x4000 */ - public static final short VariantByref = 16384; - - /* - * Do the run time definition of DEFAULT and MISSING. Have to use static - * block because of the way the initialization is done via two calls instead - * of just a constructor for this type. - */ - static { - com.jacob.com.Variant vtMissing = new com.jacob.com.Variant(); - vtMissing.putVariantNoParam(); - DEFAULT = vtMissing; - VT_MISSING = vtMissing; - } - - /** - * Pointer to MS struct. - */ - int m_pVariant = 0; - - /** - * public constructor, initializes and sets type to VariantEmpty - */ - public Variant() { - this(null, false); - } - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(boolean in) { - this(new Boolean(in)); - } - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(byte in) { - this(new Byte(in)); - } - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(double in) { - this(new Double(in)); - } - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(float in) { - this(new Float(in)); - } - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(int in) { - this(new Integer(in)); - }; - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(long in) { - this(new Long(in)); - } - - /** - * Convenience constructor that calls the main one with a byRef value of - * false - * - * @param in - * object to be made into variant - */ - public Variant(Object in) { - this(in, false); - } - - /** - * Constructor that accepts the data object and information about whether - * this is by reference or not. It calls the JavaVariantConverter to - * actually push the data into the newly created Variant. - * - * @param pValueObject - * The value object that will pushed down into windows memory. A - * null object sets this to "empty" - * @param fByRef - */ - public Variant(Object pValueObject, boolean fByRef) { - init(); - VariantUtilities.populateVariant(this, pValueObject, fByRef); - } - - /** - * Constructor that accepts a primitive rather than an object - * - * @param in - */ - public Variant(short in) { - this(new Short(in)); - } - - /** - * Cover for native method so we can cover it. - *

- * This cannot convert an object to a byRef. It can convert from byref to - * not byref - * - * @param in - * type to convert this variant too - * @return Variant returns this same object so folks can change when - * replacing calls toXXX() with changeType().getXXX() - */ - public Variant changeType(short in) { - changeVariantType(in); - return this; - } - - /** - * Converts variant to the passed in type by converting the underlying - * windows variant structure. private so folks use public java method - * - * @param in - * the desired resulting type - */ - private native void changeVariantType(short in); - - /** - * this returns null - * - * @return ?? comment says null? - */ - @Override - public native Object clone(); - - /** - * @deprecated No longer used - * @return null ! - */ - @Deprecated - public native Variant cloneIndirect(); - - /* - * (non-Javadoc) - * - * @see java.lang.Object#finalize() - */ - @Override - protected void finalize() { - safeRelease(); - } - - /** - * - * @return returns the value as a boolean, throws an exception if its not. - * @throws IllegalStateException - * if variant is not of the requested type - */ - public boolean getBoolean() { - if (this.getvt() == VariantBoolean) { - return getVariantBoolean(); - } else { - throw new IllegalStateException( - "getBoolean() only legal on Variants of type VariantBoolean, not " - + this.getvt()); - } - } - - /** - * public cover for native method - * - * @return the boolean from a booleanRef - * @throws IllegalStateException - * if variant is not of the requested type - */ - public boolean getBooleanRef() { - if ((this.getvt() & VariantTypeMask) == VariantBoolean - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantBooleanRef(); - } else { - throw new IllegalStateException( - "getBooleanRef() only legal on byRef Variants of type VariantBoolean, not " - + this.getvt()); - } - } - - /** - * - * @return returns the value as a boolean, throws an exception if its not. - * @throws IllegalStateException - * if variant is not of the requested type - */ - public byte getByte() { - if (this.getvt() == VariantByte) { - return getVariantByte(); - } else { - throw new IllegalStateException( - "getByte() only legal on Variants of type VariantByte, not " - + this.getvt()); - } - } - - /** - * public cover for native method - * - * @return the byte from a booleanRef - * @throws IllegalStateException - * if variant is not of the requested type - */ - public byte getByteRef() { - if ((this.getvt() & VariantTypeMask) == VariantByte - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantByteRef(); - } else { - throw new IllegalStateException( - "getByteRef() only legal on byRef Variants of type VariantByte, not " - + this.getvt()); - } - } - - /** - * MS Currency objects are 64 bit fixed point numbers with 15 digits to the - * left and 4 to the right of the decimal place. - * - * @return returns the currency value as a long, throws exception if not a - * currency type.. - * @throws IllegalStateException - * if variant is not of the requested type - */ - public Currency getCurrency() { - if (this.getvt() == VariantCurrency) { - return new Currency(getVariantCurrency()); - } else { - throw new IllegalStateException( - "getCurrency() only legal on Variants of type VariantCurrency, not " - + this.getvt()); - } - } - - /** - * MS Currency objects are 64 bit fixed point numbers with 15 digits to the - * left and 4 to the right of the decimal place. - * - * @return returns the currency value as a long, throws exception if not a - * currency type - * @throws IllegalStateException - * if variant is not of the requested type - */ - public Currency getCurrencyRef() { - if ((this.getvt() & VariantTypeMask) == VariantCurrency - && (this.getvt() & VariantByref) == VariantByref) { - return new Currency(getVariantCurrencyRef()); - } else { - throw new IllegalStateException( - "getCurrencyRef() only legal on byRef Variants of type VariantCurrency, not " - + this.getvt()); - } - } - - /** - * @return double return the date (as a double) value held in this variant - * (fails on other types?) - * @throws IllegalStateException - * if variant is not of the requested type - */ - public double getDate() { - if (this.getvt() == VariantDate) { - return getVariantDate(); - } else { - throw new IllegalStateException( - "getDate() only legal on Variants of type VariantDate, not " - + this.getvt()); - } - } - - /** - * - * @return returns the date value as a double, throws exception if not a - * date type - * @throws IllegalStateException - * if variant is not of the requested type - */ - public double getDateRef() { - if ((this.getvt() & VariantTypeMask) == VariantDate - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantDateRef(); - } else { - throw new IllegalStateException( - "getDateRef() only legal on byRef Variants of type VariantDate, not " - + this.getvt()); - } - } - - /** - * return the BigDecimal value held in this variant (fails on other types) - * - * @return BigDecimal - * @throws IllegalStateException - * if variant is not of the requested type - */ - public BigDecimal getDecimal() { - if (this.getvt() == VariantDecimal) { - return (BigDecimal) (getVariantDec()); - } else { - throw new IllegalStateException( - "getDecimal() only legal on Variants of type VariantDecimal, not " - + this.getvt()); - } - } - - /** - * return the BigDecimal value held in this variant (fails on other types) - * - * @return BigDecimal - * @throws IllegalStateException - * if variant is not of the requested type - */ - public BigDecimal getDecimalRef() { - if ((this.getvt() & VariantTypeMask) == VariantDecimal - && (this.getvt() & VariantByref) == VariantByref) { - return (BigDecimal) (getVariantDecRef()); - } else { - throw new IllegalStateException( - "getDecimalRef() only legal on byRef Variants of type VariantDecimal, not " - + this.getvt()); - } - } - - /** - * cover for {@link #toDispatch()} This method now matches other getXXX() - * methods. It throws an IllegalStateException if the object is not of type - * VariantDispatch - * - * @return this object as a dispatch - * @throws IllegalStateException - * if wrong variant type - */ - public Dispatch getDispatch() { - if (this.getvt() == VariantDispatch) { - return toDispatch(); - } else { - throw new IllegalStateException( - "getDispatch() only legal on Variants of type VariantDispatch, not " - + this.getvt()); - } - } - - /** - * Dispatch and dispatchRef are treated the same This is just a cover for - * toDispatch() with a flag check - * - * @return the results of toDispatch() - * @throws IllegalStateException - * if variant is not of the requested type - */ - public Dispatch getDispatchRef() { - if ((this.getvt() & VariantTypeMask) == VariantDispatch - && (this.getvt() & VariantByref) == VariantByref) { - return toDispatch(); - } else { - throw new IllegalStateException( - "getDispatchRef() only legal on byRef Variants of type VariantDispatch, not " - + this.getvt()); - } - } - - /** - * @return double return the double value held in this variant (fails on - * other types?) - * @throws IllegalStateException - * if variant is not of the requested type - */ - public double getDouble() { - if (this.getvt() == VariantDouble) { - return getVariantDouble(); - } else { - throw new IllegalStateException( - "getDouble() only legal on Variants of type VariantDouble, not " - + this.getvt()); - } - } - - /** - * - * @return returns the double value, throws exception if not a Double type - * @throws IllegalStateException - * if variant is not of the requested type - */ - public double getDoubleRef() { - if ((this.getvt() & VariantTypeMask) == VariantDouble - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantDoubleRef(); - } else { - throw new IllegalStateException( - "getDoubleRef() only legal on byRef Variants of type VariantDouble, not " - + this.getvt()); - } - } - - /** - * Pointless method that was put here so that putEmpty() has a get method. - * This would have returned null if the value was VT_EMPTY or if it wasn't - * so it would have always returned the same value. - * - * @deprecated method never did anything - */ - @Deprecated - public void getEmpty() { - } - - /** - * @return double return the error value held in this variant (fails on - * other types?) - * @throws IllegalStateException - * if variant is not of the requested type - */ - public int getError() { - if (this.getvt() == VariantError) { - return getVariantError(); - } else { - throw new IllegalStateException( - "getError() only legal on Variants of type VariantError, not " - + this.getvt()); - } - } - - /** - * - * @return returns the error value as an int, throws exception if not a - * Error type - * @throws IllegalStateException - * if variant is not of the requested type - */ - public int getErrorRef() { - if ((this.getvt() & VariantTypeMask) == VariantError - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantErrorRef(); - } else { - throw new IllegalStateException( - "getErrorRef() only legal on byRef Variants of type VariantError, not " - + this.getvt()); - } - } - - /** - * @return returns the value as a float if the type is of type float - * @throws IllegalStateException - * if variant is not of the requested type - */ - public float getFloat() { - if (this.getvt() == VariantFloat) { - return getVariantFloat(); - } else { - throw new IllegalStateException( - "getFloat() only legal on Variants of type VariantFloat, not " - + this.getvt()); - } - } - - /** - * - * @return returns the float value, throws exception if not a Float type - * @throws IllegalStateException - * if variant is not of the requested type - */ - public float getFloatRef() { - if ((this.getvt() & VariantTypeMask) == VariantFloat - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantFloatRef(); - } else { - throw new IllegalStateException( - "getFloatRef() only legal on byRef Variants of type VariantFloat, not " - + this.getvt()); - } - } - - /** - * return the int value held in this variant if it is an int or a short. - * Throws for other types. - * - * @return int contents of the windows memory - * @throws IllegalStateException - * if variant is not of the requested type - */ - public int getInt() { - if (this.getvt() == VariantInt) { - return getVariantInt(); - } else if (this.getvt() == VariantShort) { - return getVariantShort(); - } else { - throw new IllegalStateException( - "getInt() only legal on Variants of type VariantInt, not " - + this.getvt()); - } - } - - /** - * get the content of this variant as an int - * - * @return int - * @throws IllegalStateException - * if variant is not of the requested type - */ - public int getIntRef() { - if ((this.getvt() & VariantTypeMask) == VariantInt - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantIntRef(); - } else { - throw new IllegalStateException( - "getIntRef() only legal on byRef Variants of type VariantInt, not " - + this.getvt()); - } - } - - /** - * returns the windows time contained in this Variant to a Java Date. should - * return null if this is not a date Variant SF 959382 - * - * @return java.util.Date returns the date if this is a VariantDate != 0, - * null if it is a VariantDate == 0 and throws an - * IllegalStateException if this isn't a date. - * @throws IllegalStateException - * if variant is not of the requested type - */ - public Date getJavaDate() { - Date returnDate = null; - if (getvt() == VariantDate) { - double windowsDate = getDate(); - if (windowsDate != 0) { - returnDate = DateUtilities.convertWindowsTimeToDate(getDate()); - } - } else { - throw new IllegalStateException( - "getJavaDate() only legal on Variants of type VariantDate, not " - + this.getvt()); - } - return returnDate; - } - - /** - * returns the windows time contained in this Variant to a Java Date should - * return null if this is not a date reference Variant SF 959382 - * - * @return java.util.Date - */ - public Date getJavaDateRef() { - double windowsDate = getDateRef(); - if (windowsDate == 0) { - return null; - } else { - return DateUtilities.convertWindowsTimeToDate(windowsDate); - } - } - - /** - * 64 bit Longs only available on x64. 64 bit long support added 1.14 - * - * @return returns the value as a long, throws exception if not a Long - * type.. - * @throws IllegalStateException - * if variant is not of the requested type - */ - public long getLong() { - if (this.getvt() == VariantLongInt) { - return getVariantLong(); - } else { - throw new IllegalStateException( - "getLong() only legal on Variants of type VariantLongInt, not " - + this.getvt()); - } - } - - /** - * 64 bit Longs only available on x64. 64 bit long support added 1.14 - * - * @return returns the value as a long, throws exception if not a long type - * @throws IllegalStateException - * if variant is not of the requested type - */ - public long getLongRef() { - if ((this.getvt() & VariantTypeMask) == VariantLongInt - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantLongRef(); - } else { - throw new IllegalStateException( - "getLongRef() only legal on byRef Variants of type VariantLongInt, not " - + this.getvt()); - } - } - - /** - * This method would have returned null if the type was VT_NULL. But because - * we return null if the data is not of the right type, this method should - * have always returned null - * - * @deprecated method never did anything - */ - @Deprecated - public void getNull() { - } - - /** - * return the int value held in this variant (fails on other types?) - * - * @return int - * @throws IllegalStateException - * if variant is not of the requested type - */ - public short getShort() { - if (this.getvt() == VariantShort) { - return getVariantShort(); - } else { - throw new IllegalStateException( - "getShort() only legal on Variants of type VariantShort, not " - + this.getvt()); - } - } - - /** - * get the content of this variant as an int - * - * @return int - * @throws IllegalStateException - * if variant is not of the requested type - */ - public short getShortRef() { - if ((this.getvt() & VariantTypeMask) == VariantShort - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantShortRef(); - } else { - throw new IllegalStateException( - "getShortRef() only legal on byRef Variants of type VariantShort, not " - + this.getvt()); - } - } - - /** - * - * @return string contents of the variant. - * @throws IllegalStateException - * if this variant is not of type String - */ - public String getString() { - if (getvt() == Variant.VariantString) { - return getVariantString(); - } else { - throw new IllegalStateException( - "getString() only legal on Variants of type VariantString, not " - + this.getvt()); - } - } - - /** - * gets the content of the variant as a string ref - * - * @return String retrieved from the COM area. - * @throws IllegalStateException - * if variant is not of the requested type - */ - public String getStringRef() { - if ((this.getvt() & VariantTypeMask) == VariantString - && (this.getvt() & VariantByref) == VariantByref) { - return getVariantStringRef(); - } else { - throw new IllegalStateException( - "getStringRef() only legal on byRef Variants of type VariantString, not " - + this.getvt()); - } - } - - /** - * Used to get the value from a windows type of VT_VARIANT or a jacob - * Variant type of VariantVariant. Added 1.12 pre 6 - VT_VARIANT support is - * at an alpha level - * - * @return Object a java Object that represents the content of the enclosed - * Variant - */ - public Object getVariant() { - if ((this.getvt() & VariantTypeMask) == VariantVariant - && (this.getvt() & VariantByref) == VariantByref) { - if (JacobObject.isDebugEnabled()) { - JacobObject.debug("About to call getVariantVariant()"); - } - Variant enclosedVariant = new Variant(); - int enclosedVariantMemory = getVariantVariant(); - enclosedVariant.m_pVariant = enclosedVariantMemory; - Object enclosedVariantAsJava = enclosedVariant.toJavaObject(); - // zero out the reference to the underlying windows memory so that - // it is still only owned in one place by one java object - // (this object of type VariantVariant) - // enclosedVariant.putEmpty(); // don't know if this would have had - // side effects - if (JacobObject.isDebugEnabled()) { - JacobObject - .debug("Zeroing out enclosed Variant's ref to windows memory"); - } - enclosedVariant.m_pVariant = 0; - return enclosedVariantAsJava; - } else { - throw new IllegalStateException( - "getVariant() only legal on Variants of type VariantVariant, not " - + this.getvt()); - } - } - - /** - * @deprecated superseded by SafeArray - * @return never returns anything - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public Variant[] getVariantArray() { - throw new NotImplementedException("Not implemented"); - } - - /** - * @return the Variant Array that represents the data in the Variant - * @deprecated superseded by SafeArray - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public Variant[] getVariantArrayRef() { - throw new NotImplementedException("Not implemented"); - } - - /** - * - * @return the value in this Variant as a boolean, null if not a boolean - */ - private native boolean getVariantBoolean(); - - private native boolean getVariantBooleanRef(); - - /** - * @return the value in this Variant as a byte, null if not a byte - */ - private native byte getVariantByte(); - - /** - * @return the value in this Variant as a byte, null if not a byte - */ - private native byte getVariantByteRef(); - - /** - * @return the value in this Variant as a long, null if not a long - */ - private native long getVariantCurrency(); - - /** - * @return the value in this Variant as a long, null if not a long - */ - private native long getVariantCurrencyRef(); - - /** - * @return double return the date (as a double) value held in this variant - * (fails on other types?) - */ - private native double getVariantDate(); - - /** - * get the content of this variant as a double representing a date - * - * @return double - */ - private native double getVariantDateRef(); - - /** - * @return the value in this Variant as a decimal, null if not a decimal - */ - private native Object getVariantDec(); - - /** - * @return the value in this Variant (byref) as a decimal, null if not a - * decimal - */ - private native Object getVariantDecRef(); - - /** - * @return double get the content of this variant as a double - */ - private native double getVariantDouble(); - - /** - * @return double get the content of this variant as a double - */ - private native double getVariantDoubleRef(); - - private native int getVariantError(); - - private native int getVariantErrorRef(); - - /** - * @return returns the value as a float if the type is of type float - */ - private native float getVariantFloat(); - - /** - * @return returns the value as a float if the type is of type float - */ - private native float getVariantFloatRef(); - - /** - * @return the int value held in this variant (fails on other types?) - */ - private native int getVariantInt(); - - /** - * @return the int value held in this variant (fails on other types?) - */ - private native int getVariantIntRef(); - - /** - * @return the value in this Variant as a long, null if not a long - */ - private native long getVariantLong(); - - /** - * @return the value in this Variant as a long, null if not a long - */ - private native long getVariantLongRef(); - - /** - * get the content of this variant as a short - * - * @return short - */ - private native short getVariantShort(); - - /** - * @return short the content of this variant as a short - */ - private native short getVariantShortRef(); - - /** - * Native method that actually extracts a string value from the variant - * - * @return - */ - private native String getVariantString(); - - /** - * @return String the content of this variant as a string - */ - private native String getVariantStringRef(); - - /** - * Returns the variant type via a native method call - * - * @return short one of the VT_xx types - */ - private native short getVariantType(); - - /** - * Returns the variant type via a native method call. Added 1.12 pre 6 - - * VT_VARIANT support is at an alpha level - * - * @return Variant one of the VT_Variant types - */ - private native int getVariantVariant(); - - /** - * Reports the type of the underlying Variant object - * - * @return returns the variant type as a short, one of the Variantxxx values - * defined as statics in this class. returns VariantNull if not - * initialized - * @throws IllegalStateException - * if there is no underlying windows data structure - */ - public short getvt() { - if (m_pVariant != 0) { - return getVariantType(); - } else { - throw new IllegalStateException("uninitialized Variant"); - } - } - - /** - * initializes the COM Variant and puts its reference in this instance - */ - protected native void init(); - - /** - * - * @return returns true if the variant is considered null - * @throws IllegalStateException - * if there is no underlying windows memory - */ - public boolean isNull() { - getvt(); - return isVariantConsideredNull(); - } - - /** - * is the variant null or empty or error or null dispatch - * - * @return true if it is null or false if not - */ - private native boolean isVariantConsideredNull(); - - /** - * sets the type to VT_ERROR and the error message to DISP_E_PARAMNOTFOIUND - * - * @deprecated replaced by putNoParam() - */ - @Deprecated - public void noParam() { - putNoParam(); - } - - /** - * returns true if the passed in Variant is a constant that should not be - * freed - * - * @param pVariant - * @return boolean that is true if Variant is a type of constant, VT_FALSE, - * VT_TRUE, VT_MISSING, DEFAULT - */ - protected boolean objectIsAConstant(Variant pVariant) { - if (pVariant == VT_FALSE || pVariant == VT_TRUE - || pVariant == VT_MISSING || pVariant == DEFAULT) { - return true; - } else { - return false; - } - - } - - /** - * puts a boolean into the variant and sets it's type - * - * @param in - * the new value - */ - public void putBoolean(boolean in) { - // verify we aren't released yet - getvt(); - putVariantBoolean(in); - } - - /** - * pushes a boolean into the variant by ref and sets the type of the variant - * to boolean - * - * @param in - */ - public void putBooleanRef(boolean in) { - // verify we aren't released yet - getvt(); - putVariantBooleanRef(in); - } - - /** - * pushes a byte into the varaint and sets the type - * - * @param in - */ - public void putByte(byte in) { - // verify we aren't released yet - getvt(); - putVariantByte(in); - }; - - /** - * @deprecated superseded by SafeArray - * @param in - * doesn't matter because this method does nothing - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public void putByteArray(Object in) { - throw new NotImplementedException("Not implemented"); - } - - /** - * pushes a byte into the variant by ref and sets the type - * - * @param in - */ - public void putByteRef(byte in) { - // verify we aren't released yet - getvt(); - putVariantByteRef(in); - } - - /** - * @param in - * the object that would be wrapped by the Variant if this method - * was implemented - * @deprecated superseded by SafeArray - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public void putCharArray(Object in) { - throw new NotImplementedException("Not implemented"); - } - - /** - * Puts a value in as a currency and sets the variant type. MS Currency - * objects are 64 bit fixed point numbers with 15 digits to the left and 4 - * to the right of the decimal place. - * - * @param in - * the long that will be put into the 64 bit currency object. - */ - public void putCurrency(Currency in) { - // verify we aren't released yet - getvt(); - putVariantCurrency(in.longValue()); - } - - /** - * Pushes a long into the variant as currency and sets the type. MS Currency - * objects are 64 bit fixed point numbers with 15 digits to the left and 4 - * to the right of the decimal place. - * - * @param in - * the long that will be put into the 64 bit currency object - */ - public void putCurrencyRef(Currency in) { - // verify we aren't released yet - getvt(); - putVariantCurrencyRef(in.longValue()); - } - - /** - * converts a java date to a windows time and calls putDate(double) SF - * 959382 - * - * @param inDate - * a Java date to be converted - * @throws IllegalArgumentException - * if inDate = null - */ - public void putDate(Date inDate) { - if (inDate == null) { - throw new IllegalArgumentException( - "Cannot put null in as windows date"); - // do nothing - } else { - putDate(DateUtilities.convertDateToWindowsTime(inDate)); - } - } - - /** - * puts a windows date double into the variant and sets the type - * - * @param in - */ - public void putDate(double in) { - // verify we aren't released yet - getvt(); - putVariantDate(in); - } - - /** - * converts a java date to a windows time and calls putDateRef(double) SF - * 959382 - * - * @param inDate - * a Java date to be converted - * @throws IllegalArgumentException - * if inDate = null - */ - public void putDateRef(Date inDate) { - if (inDate == null) { - throw new IllegalArgumentException( - "Cannot put null in as windows date"); - // do nothing - } else { - putDateRef(DateUtilities.convertDateToWindowsTime(inDate)); - } - } - - /** - * set the content of this variant to a date (VT_DATE|VT_BYREF) - * - * @param in - */ - public void putDateRef(double in) { - // verify we aren't released - getvt(); - putVariantDateRef(in); - } - - /** - * This actual does all the validating and massaging of the BigDecimalValues - * when converting them to MS Decimal types - * - * @param in - * number to be made into VT_DECIMAL - * @param byRef - * store by reference or not - * @param roundingBehavior - * one of the BigDecimal ROUND_xxx methods. Any method other than - * ROUND_UNECESSARY means that the value will be rounded to fit - */ - private void putDecimal(BigDecimal in, boolean byRef) { - // verify we aren't released - getvt(); - // first validate the min and max - VariantUtilities.validateDecimalMinMax(in); - BigInteger allWordBigInt; - allWordBigInt = in.unscaledValue(); - // Assume any required rounding has been done. - VariantUtilities.validateDecimalScaleAndBits(in); - // finally we can do what we actually came here to do - int sign = in.signum(); - // VT_DECIMAL always has positive value with just the sign - // flipped - if (in.signum() < 0) { - in = in.negate(); - } - // ugh, reusing allWordBigInt but now should always be positive - // and any round is applied - allWordBigInt = in.unscaledValue(); - byte scale = (byte) in.scale(); - int lowWord = allWordBigInt.intValue(); - BigInteger middleWordBigInt = allWordBigInt.shiftRight(32); - int middleWord = middleWordBigInt.intValue(); - BigInteger highWordBigInt = allWordBigInt.shiftRight(64); - int highWord = highWordBigInt.intValue(); - if (byRef) { - putVariantDecRef(sign, scale, lowWord, middleWord, highWord); - } else { - putVariantDec(sign, scale, lowWord, middleWord, highWord); - } - } - - /** - * EXPERIMENTAL 1.14 feature to support rounded decimals. - *

- * Set the value of this variant and set the type. This may throw exceptions - * more often than the caller expects because most callers don't manage the - * scale of their BigDecimal objects. - *

- * This default set method throws exceptions if precision or size is out of - * bounds - *

- * There are 12 bytes available for the integer number. - *

- * There is 1 byte for the scale. - * - * @param in - * the BigDecimal that will be converted to VT_DECIMAL - * @throws IllegalArgumentException - * if the scale is > 28, the maximum for VT_DECIMAL or if there - * are more than 12 bytes worth the digits - */ - public void putDecimal(BigDecimal in) { - putDecimal(in, false); - } - - /** - * Set the value of this variant and set the type. This may throw exceptions - * more often than the caller expects because most callers don't manage the - * scale of their BigDecimal objects. - *

- * This default set method throws exceptions if precision or size is out of - * bounds - *

- * There are 12 bytes available for the integer number. - *

- * There is 1 byte for the scale. - * - * @param in - * the BigDecimal that will be converted to VT_DECIMAL - * @throws IllegalArgumentException - * if the scale is > 28, the maximum for VT_DECIMAL or if there - * are more than 12 bytes worth the digits - */ - public void putDecimalRef(BigDecimal in) { - putDecimal(in, true); - } - - /** - * This acts a cover for putVariant Dispatch. - * - * @param in - * the Dispatch we're putting down in the COM variant space. - */ - public void putDispatch(Dispatch in) { - putVariantDispatch(in); - } - - /** - * Dispatch and dispatchRef are treated the same This is a cover for - * putVariantDispatch(). putDispatch and putDispatchRef are treated the same - * because no one has written the COM code for putDispatchRef. - * - * @param in - * the Dispatch we're putting down in the COM variant space. - */ - public void putDispatchRef(Dispatch in) { - putVariantDispatch(in); - } - - /** - * wraps this Variant around the passed in double. - * - * @param in - */ - public void putDouble(double in) { - // verify we aren't released yet - getvt(); - putVariantDouble(in); - } - - /** - * set the content of this variant to a double (VT_R8|VT_BYREF) - * - * @param in - */ - public void putDoubleRef(double in) { - // verify we aren't released - getvt(); - putVariantDoubleRef(in); - } - - /** - * sets the type to VariantEmpty - * - */ - public void putEmpty() { - // verify we aren't released yet - getvt(); - putVariantEmpty(); - } - - /** - * puts an error code (I think) into the variant and sets the type - * - * @param in - */ - public void putError(int in) { - // verify we aren't released yet - getvt(); - putVariantError(in); - } - - /** - * pushes an error code into the variant by ref and sets the type - * - * @param in - */ - public void putErrorRef(int in) { - // verify we aren't released yet - getvt(); - putVariantErrorRef(in); - } - - /** - * fills the Variant with a float and sets the type to float - * - * @param in - */ - public void putFloat(float in) { - // verify we haven't been released yet - getvt(); - putVariantFloat(in); - } - - /** - * pushes a float into the variant and sets the type - * - * @param in - */ - public void putFloatRef(float in) { - // verify we aren't released yet - getvt(); - putVariantFloatRef(in); - } - - /** - * set the value of this variant and set the type - * - * @param in - */ - public void putInt(int in) { - // verify we aren't released yet - getvt(); - putVariantInt(in); - } - - /** - * set the content of this variant to an int (VT_I4|VT_BYREF) - * - * @param in - */ - public void putIntRef(int in) { - // verify we aren't released - getvt(); - putVariantIntRef(in); - } - - /** - * Puts a 64 bit Java Long into a 64 bit Variant Long. Only works on x64 - * systems otherwise throws an error. 64 bit long support added 1.14 - * - * @param in - * the long that will be put into the 64 bit Long object. - */ - public void putLong(long in) { - // verify we aren't released yet - getvt(); - putVariantLong(in); - } - - /** - * Puts a 64 bit Java Long into a 64 bit Variant Long. Only works on x64 - * systems otherwise throws an error. 64 bit long support added 1.14 - * - * @param in - * the long that will be put into the 64 bit Long object. - */ - public void putLongRef(long in) { - // verify we aren't released yet - getvt(); - putVariantLongRef(in); - } - - /** - * sets the type to VT_ERROR and the error message to DISP_E_PARAMNOTFOIUND - */ - public void putNoParam() { - // verify we aren't released yet - getvt(); - putVariantNoParam(); - } - - /** - * Sets the type to VariantDispatch and sets the value to null Equivalent to - * VB's nothing - */ - public void putNothing() { - // verify we aren't released yet - getvt(); - putVariantNothing(); - } - - /** - * Set this Variant's type to VT_NULL (the VB equivalent of NULL) - */ - public void putNull() { - // verify we aren't released yet - getvt(); - putVariantNull(); - } - - /** - * Puts an object into the Variant -- converts to Dispatch. Acts as a cover - * for putVariantDispatch(); This primarily exists to support jacobgen. This - * should be deprecated. - * - * @param in - * the object we are putting into the Variant, assumes a - * @see Variant#putDispatch(Dispatch) - * @deprecated should use putDispatch() - */ - @Deprecated - public void putObject(Object in) { - // this should verify in instanceof Dispatch - putVariantDispatch(in); - } - - /** - * Just a cover for putObject(). We shouldn't accept any old random object. - * This has been left in to support jacobgen. This should be deprecated. - * - * @param in - * @deprecated - */ - @Deprecated - public void putObjectRef(Object in) { - putObject(in); - } - - /** - * have no idea... - * - * @param in - */ - public void putSafeArray(SafeArray in) { - // verify we haven't been released yet - getvt(); - putVariantSafeArray(in); - } - - /** - * have no idea... - * - * @param in - */ - public void putSafeArrayRef(SafeArray in) { - // verify we haven't been released yet - getvt(); - putVariantSafeArrayRef(in); - } - - /** - * set the content of this variant to a short (VT_I2) - * - * @param in - */ - public void putShort(short in) { - // verify we aren't released - getvt(); - putVariantShort(in); - } - - /** - * set the content of this variant to a short (VT_I2|VT_BYREF) - * - * @param in - */ - public void putShortRef(short in) { - // verify we aren't released - getvt(); - putVariantShortRef(in); - } - - /** - * put a string into the variant and set its type - * - * @param in - */ - public void putString(String in) { - // verify we aren't released yet - getvt(); - putVariantString(in); - } - - /** - * set the content of this variant to a string (VT_BSTR|VT_BYREF) - * - * @param in - */ - public void putStringRef(String in) { - // verify we aren't released - getvt(); - putVariantStringRef(in); - } - - /** - * Puts a variant into this variant making it type VT_VARIANT. Added 1.12 - * pre 6 - * - * @param objectToBeWrapped - * A object that is to be referenced by this variant. If - * objectToBeWrapped is already of type Variant, then it is used. - * If objectToBeWrapped is not Variant then - * new Variant(objectToBeWrapped) is called and the - * result is passed into the com layer - * @throws IllegalArgumentException - * if inVariant = null or if inVariant is a Varint - */ - public void putVariant(Object objectToBeWrapped) { - if (objectToBeWrapped == null) { - throw new IllegalArgumentException( - "Cannot put null in as a variant"); - } else if (objectToBeWrapped instanceof Variant) { - throw new IllegalArgumentException( - "Cannot putVariant() only accepts non jacob objects."); - } else { - Variant inVariant = new Variant(objectToBeWrapped); - putVariantVariant(inVariant); - // This could be done in Variant.cpp - if (JacobObject.isDebugEnabled()) { - JacobObject - .debug("Zeroing out enclosed Variant's ref to windows memory"); - } - inVariant.m_pVariant = 0; - } - } - - /** - * @deprecated superseded by SafeArray - * @param in - * doesn't matter because this method does nothing - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public void putVariantArray(Variant[] in) { - throw new NotImplementedException("Not implemented"); - } - - /** - * @param in - * the thing that would be come an array if this method was - * implemented - * @deprecated superseded by SafeArray - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public void putVariantArrayRef(Variant[] in) { - throw new NotImplementedException("Not implemented"); - } - - /** - * puts a boolean into the variant and sets it's type - * - * @param in - * the new value - */ - private native void putVariantBoolean(boolean in); - - /** - * puts a boolean into the variant and sets it's type - * - * @param in - * the new value - */ - private native void putVariantBooleanRef(boolean in); - - /** - * puts a byte into the variant and sets it's type - * - * @param in - * the new value - */ - private native void putVariantByte(byte in); - - /** - * puts a byte into the variant and sets it's type - * - * @param in - * the new value - */ - private native void putVariantByteRef(byte in); - - /** - * puts a Currency into the variant and sets it's type - * - * @param in - * the new value - */ - private native void putVariantCurrency(long in); - - /** - * puts a Currency into the variant and sets it's type - * - * @param in - * the new value - */ - private native void putVariantCurrencyRef(long in); - - /** - * set the value of this variant - * - * @param in - */ - private native void putVariantDate(double in); - - /** - * set the content of this variant to a date (VT_DATE|VT_BYREF) - * - * @param in - */ - private native void putVariantDateRef(double in); - - /** - * private JNI method called by putDecimal - * - * @param signum - * sign - * @param scale - * BigDecimal's scale - * @param lo - * low 32 bits - * @param mid - * middle 32 bits - * @param hi - * high 32 bits - */ - private native void putVariantDec(int signum, byte scale, int lo, int mid, - int hi); - - /** - * private JNI method called by putDecimalRef - * - * @param signum - * sign - * @param scale - * BigDecimal's scale - * @param lo - * low 32 bits - * @param mid - * middle 32 bits - * @param hi - * high 32 bits - */ - private native void putVariantDecRef(int signum, byte scale, int lo, - int mid, int hi); - - /** - * the JNI implementation for putDispatch() so that we can screen the - * incoming dispatches in putDispatch() before this is invoked - * - * @param in - * should be a dispatch object - */ - private native void putVariantDispatch(Object in); - - private native void putVariantDouble(double in); - - /** - * set the content of this variant to a double (VT_R8|VT_BYREF) - * - * @param in - */ - private native void putVariantDoubleRef(double in); - - /** - * Sets the type to VariantEmpty. No values needed - */ - private native void putVariantEmpty(); - - private native void putVariantError(int in); - - private native void putVariantErrorRef(int in); - - /** - * fills the Variant with a float and sets the type to float - * - * @param in - */ - private native void putVariantFloat(float in); - - private native void putVariantFloatRef(float in); - - /** - * set the value of this variant and set the type - * - * @param in - */ - private native void putVariantInt(int in); - - /** - * set the content of this variant to an int (VT_I4|VT_BYREF) - * - * @param in - */ - private native void putVariantIntRef(int in); - - private native void putVariantLong(long in); - - private native void putVariantLongRef(long in); - - /** - * sets the type to VT_ERROR and the error message to DISP_E_PARAMNOTFOIUND - */ - private native void putVariantNoParam(); - - /** - * Sets the type to VariantDispatch and sets the value to null Equivalent to - * VB's nothing - */ - private native void putVariantNothing(); - - /** - * Set this Variant's type to VT_NULL (the VB equivalent of NULL) - */ - private native void putVariantNull(); - - private native void putVariantSafeArray(SafeArray in); - - private native void putVariantSafeArrayRef(SafeArray in); - - /** - * set the content of this variant to a short (VT_I2) - * - * @param in - */ - private native void putVariantShort(short in); - - /** - * set the content of this variant to a short (VT_I2|VT_BYREF) - * - * @param in - */ - private native void putVariantShortRef(short in); - - private native void putVariantString(String in); - - /** - * set the content of this variant to a string (VT_BSTR|VT_BYREF) - * - * @param in - */ - private native void putVariantStringRef(String in); - - /** - * All VariantVariant type variants are BYREF. - * - * Set the content of this variant to a string (VT_VARIANT|VT_BYREF). - * - * Added 1.12 pre 6 - VT_VARIANT support is at an alpha level - * - * @param in - * variant to be wrapped - * - */ - private native void putVariantVariant(Variant in); - - /** - * now private so only this object can access was: call this to explicitly - * release the com object before gc - * - */ - private native void release(); - - /** - * This will release the "C" memory for the Variant unless this Variant is - * one of the constants in which case we don't want to release the memory. - *

- * - * @see com.jacob.com.JacobObject#safeRelease() - */ - @Override - public void safeRelease() { - // The well known constants should not be released. - // Unfortunately this doesn't fix any other classes that are - // keeping constants around in their static ivars. - // those will still be busted. - // - // The only inconsistency here is that we leak - // when this class is unloaded because we won't - // free the memory even if the constants are being - // finalized. this is not a big deal at all. - // another way around this would be to create the constants - // in their own thread so that they would never be released - if (!objectIsAConstant(this)) { - super.safeRelease(); - if (m_pVariant != 0) { - release(); - m_pVariant = 0; - } else { - // looks like a double release - // this should almost always happen due to gc - // after someone has called ComThread.Release - if (isDebugEnabled()) { - debug("Variant: " + this.hashCode() + " double release"); - // Throwable x = new Throwable(); - // x.printStackTrace(); - } - } - } else { - if (isDebugEnabled()) { - debug("Variant: " + this.hashCode() - + " don't want to release a constant"); - } - } - } - - /** - * this is supposed to cause the underlying variant object struct to be - * rebuilt from a previously serialized byte array. - * - * @param ba - */ - protected native void SerializationReadFromBytes(byte[] ba); - - /** - * this is supposed to create a byte array that represents the underlying - * variant object structure - */ - protected native byte[] SerializationWriteToBytes(); - - /** - * @deprecated should be replaced by changeType() followed by getBoolean() - * @return the value of this variant as boolean (after possible conversion) - */ - @Deprecated - public boolean toBoolean() { - changeType(Variant.VariantBoolean); - return getBoolean(); - } - - /** - * attempts to return the content of this variant as a double (after - * possible conversion) - * - * @deprecated should be replaced by changeType() followed by getByte() - * @return byte - */ - @Deprecated - public byte toByte() { - changeType(Variant.VariantByte); - return getByte(); - } - - /** - * @deprecated superseded by SafeArray - * @return nothing because this method is not implemented - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public Object toByteArray() { - throw new NotImplementedException("Not implemented"); - } - - /** - * @deprecated superseded by SafeArray - * @return never returns anything - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public Object toCharArray() { - throw new NotImplementedException("Not implemented"); - } - - /** - * @deprecated should be replaced by changeType() followed by getCurrency - * @return the content of this variant as a long representing a monetary - * amount - */ - @Deprecated - public Currency toCurrency() { - changeType(Variant.VariantCurrency); - return getCurrency(); - } - - /** - * @deprecated should use changeType() followed by getDate() - * @return the value of this variant as a date (after possible conversion) - */ - @Deprecated - public double toDate() { - changeType(VariantDate); - return getDate(); - } - - /** - * @return the content of this variant as a Dispatch object (after possible - * conversion) - */ - public Dispatch toDispatch() { - // now make the native call - return toVariantDispatch(); - } - - /** - * @deprecated should call changeType() then getDouble() - * @return the content of this variant as a double (after possible - * conversion) - */ - @Deprecated - public double toDouble() { - changeType(Variant.VariantDouble); - return getDouble(); - } - - /** @return the value of this variant as an enumeration (java style) */ - public native EnumVariant toEnumVariant(); - - /** - * converts to an error type and returns the error - * - * @deprecated should use changeType() followed by getError() - * @return the error as an int (after conversion) - */ - @Deprecated - public int toError() { - changeType(Variant.VariantError); - return getError(); - } - - /** - * attempts to return the contents of this variant as a float (after - * possible conversion) - * - * @deprecated should use changeType() and getFloat() instead - * @return float - */ - @Deprecated - public float toFloat() { - changeType(Variant.VariantFloat); - return getFloat(); - } - - /** - * @deprecated should use changeType() followed by getInt() - * @return the value of this variant as an int (after possible conversion) - */ - @Deprecated - public int toInt() { - changeType(VariantInt); - return getInt(); - } - - /** - * Returns the windows time contained in this Variant as a Java Date - * converts to a date like many of the other toXXX() methods SF 959382. - *

- * This method added 12/2005 for possible use by jacobgen instead of its - * conversion code - *

- * This does not convert the data - * - * @deprecated callers should use getDate() - * @return java.util.Date version of this variant if it is a date, otherwise - * null - * - */ - @Deprecated - public Date toJavaDate() { - changeType(Variant.VariantDate); - return getJavaDate(); - } - - /** - * Convert a JACOB Variant value to a Java object (type conversions). - * provided in Sourceforge feature request 959381. See - * JavaVariantConverter..convertVariantTJavaObject(Variant) for more - * information. - * - * @return Corresponding Java object of the type matching the Variant type. - * @throws IllegalStateException - * if no underlying windows data structure - * @throws NotImplementedException - * if unsupported conversion is requested - * @throws JacobException - * if the calculated result was a JacobObject usually as a - * result of error - */ - public Object toJavaObject() throws JacobException { - return VariantUtilities.variantToObject(this); - } - - /** - * Acts a a cover for toDispatch. This primarily exists to support jacobgen. - * - * @deprecated this is a cover for toDispatch(); - * @return Object returned by toDispatch() - * @see Variant#toDispatch() instead - */ - @Deprecated - public Object toObject() { - return toDispatch(); - } - - /** - * By default toSafeArray makes a deep copy due to the fact that this - * Variant owns the embedded SafeArray and will destroy it when it gc's - * calls toSafeArray(true). - * - * @return the object converted to a SafeArray - */ - public SafeArray toSafeArray() { - // verify we haven't been released yet - getvt(); - return toSafeArray(true); - } - - /** - * This lets folk turn into a safe array without a deep copy. Should this - * API be public? - * - * @param deepCopy - * @return SafeArray constructed - */ - public SafeArray toSafeArray(boolean deepCopy) { - // verify we haven't been released yet - getvt(); - return toVariantSafeArray(deepCopy); - } - - /** - * I don't know what this is. Is it some legacy (pre 1.8) thing? - * - * @deprecated - * @return this object as a dispatch object by calling toDispatch() - */ - @Deprecated - public Object toScriptObject() { - return toDispatch(); - } - - /** - * attempts to return the contents of this Variant as a short (after - * possible conversion) - * - * @deprecated callers should use changeType() followed by getShort() - * @return short - */ - @Deprecated - public short toShort() { - this.changeType(Variant.VariantShort); - return getShort(); - } - - /** - * This method now correctly implements java toString() semantics Attempts - * to return the content of this variant as a string - *

    - *
  • "not initialized" if not initialized - *
  • "null" if VariantEmpty, - *
  • "null" if VariantError - *
  • "null" if VariantNull - *
  • the value if we know how to describe one of that type - *
  • three question marks if can't convert - * - * @return String value conversion, - * @throws IllegalStateException - * if there is no underlying windows data structure - */ - @Override - public String toString() { - try { - // see if we are in a legal state - getvt(); - } catch (IllegalStateException ise) { - return ""; - } - if (getvt() == VariantEmpty || getvt() == VariantError - || getvt() == VariantNull) { - return "null"; - } - if (getvt() == VariantString) { - return getString(); - } - try { - Object foo = toJavaObject(); - // rely on java objects to do the right thing - return foo.toString(); - } catch (NotImplementedException nie) { - // some types do not generate a good description yet - return "Description not available for type: " + getvt(); - } - } - - /** - * Exists to support jacobgen. This would be deprecated if it weren't for - * jacobgen - * - * @deprecated superseded by "this" - * @return this same object - */ - @Deprecated - public Variant toVariant() { - return this; - } - - /** - * @deprecated superseded by SafeArray - * @return nothing because this method is not implemented - * @throws com.jacob.com.NotImplementedException - */ - @Deprecated - public Variant[] toVariantArray() { - throw new NotImplementedException("Not implemented"); - } - - /** - * native method used by toDispatch() - * - * @return - */ - private native Dispatch toVariantDispatch(); - - private native SafeArray toVariantSafeArray(boolean deepCopy); - - /* - * ===================================================================== - * - * - * ===================================================================== - */ - - /** - * Clear the content of this variant - */ - public native void VariantClear(); - -} \ No newline at end of file diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/VariantUtilities.java b/vendor/jacob/1.15-M4/java/com/jacob/com/VariantUtilities.java deleted file mode 100644 index 1ac652a..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/VariantUtilities.java +++ /dev/null @@ -1,502 +0,0 @@ -/** - * - */ -package com.jacob.com; - -import java.lang.reflect.Array; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.math.MathContext; -import java.util.Date; - -/** - * A utility class used to convert between Java objects and Variants - */ -public final class VariantUtilities { - private VariantUtilities() { - // utility class with only static methods don't need constructors - } - - /** - * Populates a variant object from a java object. This method attempts to - * figure out the appropriate Variant type - * - * @param targetVariant - * @param pValueObject - * @param fByRef - */ - protected static void populateVariant(Variant targetVariant, - Object pValueObject, boolean fByRef) { - if (pValueObject == null) { - targetVariant.putEmpty(); - } else if (pValueObject instanceof Integer) { - if (fByRef) { - targetVariant.putIntRef(((Integer) pValueObject).intValue()); - } else { - targetVariant.putInt(((Integer) pValueObject).intValue()); - } - } else if (pValueObject instanceof Short) { - if (fByRef) { - targetVariant.putShortRef(((Short) pValueObject).shortValue()); - } else { - targetVariant.putShort(((Short) pValueObject).shortValue()); - } - } else if (pValueObject instanceof String) { - if (fByRef) { - targetVariant.putStringRef((String) pValueObject); - } else { - targetVariant.putString((String) pValueObject); - } - } else if (pValueObject instanceof Boolean) { - if (fByRef) { - targetVariant.putBooleanRef(((Boolean) pValueObject) - .booleanValue()); - } else { - targetVariant.putBoolean(((Boolean) pValueObject) - .booleanValue()); - } - } else if (pValueObject instanceof Double) { - if (fByRef) { - targetVariant.putDoubleRef(((Double) pValueObject) - .doubleValue()); - } else { - targetVariant.putDouble(((Double) pValueObject).doubleValue()); - } - } else if (pValueObject instanceof Float) { - if (fByRef) { - targetVariant.putFloatRef(((Float) pValueObject).floatValue()); - } else { - targetVariant.putFloat(((Float) pValueObject).floatValue()); - } - } else if (pValueObject instanceof BigDecimal) { - if (fByRef) { - targetVariant.putDecimalRef(((BigDecimal) pValueObject)); - } else { - targetVariant.putDecimal(((BigDecimal) pValueObject)); - } - } else if (pValueObject instanceof Byte) { - if (fByRef) { - targetVariant.putByteRef(((Byte) pValueObject).byteValue()); - } else { - targetVariant.putByte(((Byte) pValueObject).byteValue()); - } - } else if (pValueObject instanceof Date) { - if (fByRef) { - targetVariant.putDateRef((Date) pValueObject); - } else { - targetVariant.putDate((Date) pValueObject); - } - } else if (pValueObject instanceof Long) { - if (fByRef) { - targetVariant.putLongRef(((Long) pValueObject).longValue()); - } else { - targetVariant.putLong(((Long) pValueObject).longValue()); - } - } else if (pValueObject instanceof Currency) { - if (fByRef) { - targetVariant.putCurrencyRef(((Currency) pValueObject)); - } else { - targetVariant.putCurrency(((Currency) pValueObject)); - } - } else if (pValueObject instanceof SafeArray) { - if (fByRef) { - targetVariant.putSafeArrayRef((SafeArray) pValueObject); - } else { - targetVariant.putSafeArray((SafeArray) pValueObject); - } - } else if (pValueObject instanceof Dispatch) { - if (fByRef) { - targetVariant.putDispatchRef((Dispatch) pValueObject); - } else { - targetVariant.putDispatch((Dispatch) pValueObject); - } - } else if (pValueObject instanceof Variant) { - // newly added 1.12-pre6 to support VT_VARIANT - targetVariant.putVariant(pValueObject); - } else { - // sourceforge patch 2171967 - // used to rely on coercion but sometimes crashed VM - throw new NotImplementedException( - "populateVariant() not implemented for " - + pValueObject.getClass()); - } - } - - /** - * Map arguments based on msdn documentation. This method relies on the - * variant constructor except for arrays. - * - * @param objectToBeMadeIntoVariant - * @return Variant that represents the object - */ - protected static Variant objectToVariant(Object objectToBeMadeIntoVariant) { - if (objectToBeMadeIntoVariant == null) { - return new Variant(); - } else if (objectToBeMadeIntoVariant instanceof Variant) { - // if a variant was passed in then be a slacker and just return it - return (Variant) objectToBeMadeIntoVariant; - } else if (objectToBeMadeIntoVariant.getClass().isArray()) { - // automatically convert arrays using reflection - // handle it differently based on the type of array - // added primitive support sourceforge 2762275 - SafeArray sa = null; - int len1 = Array.getLength(objectToBeMadeIntoVariant); - Class componentType = objectToBeMadeIntoVariant.getClass() - .getComponentType(); - - if (componentType.isArray()) { // array of arrays - int max = 0; - for (int i = 0; i < len1; i++) { - Object e1 = Array.get(objectToBeMadeIntoVariant, i); - int len2 = Array.getLength(e1); - if (max < len2) { - max = len2; - } - } - sa = new SafeArray(Variant.VariantVariant, len1, max); - for (int i = 0; i < len1; i++) { - Object e1 = Array.get(objectToBeMadeIntoVariant, i); - for (int j = 0; j < Array.getLength(e1); j++) { - sa.setVariant(i, j, objectToVariant(Array.get(e1, j))); - } - } - } else if (byte.class.equals(componentType)) { - byte[] arr = (byte[]) objectToBeMadeIntoVariant; - sa = new SafeArray(Variant.VariantByte, len1); - for (int i = 0; i < len1; i++) { - sa.setByte(i, arr[i]); - } - } else if (int.class.equals(componentType)) { - int[] arr = (int[]) objectToBeMadeIntoVariant; - sa = new SafeArray(Variant.VariantInt, len1); - for (int i = 0; i < len1; i++) { - sa.setInt(i, arr[i]); - } - } else if (double.class.equals(componentType)) { - double[] arr = (double[]) objectToBeMadeIntoVariant; - sa = new SafeArray(Variant.VariantDouble, len1); - for (int i = 0; i < len1; i++) { - sa.setDouble(i, arr[i]); - } - } else if (long.class.equals(componentType)) { - long[] arr = (long[]) objectToBeMadeIntoVariant; - sa = new SafeArray(Variant.VariantLongInt, len1); - for (int i = 0; i < len1; i++) { - sa.setLong(i, arr[i]); - } - } else { - // array of object - sa = new SafeArray(Variant.VariantVariant, len1); - for (int i = 0; i < len1; i++) { - sa.setVariant(i, objectToVariant(Array.get( - objectToBeMadeIntoVariant, i))); - } - } - Variant returnVariant = new Variant(); - populateVariant(returnVariant, sa, false); - return returnVariant; - } else { - // rely on populateVariant to throw an exception if its an - // invalid type - Variant returnVariant = new Variant(); - populateVariant(returnVariant, objectToBeMadeIntoVariant, false); - return returnVariant; - } - } - - /** - * converts an array of objects into an array of Variants by repeatedly - * calling obj2Variant(Object) - * - * @param arrayOfObjectsToBeConverted - * @return Variant[] - */ - protected static Variant[] objectsToVariants( - Object[] arrayOfObjectsToBeConverted) { - if (arrayOfObjectsToBeConverted instanceof Variant[]) { - // just return the passed in array if it is a Variant array - return (Variant[]) arrayOfObjectsToBeConverted; - } else { - Variant vArg[] = new Variant[arrayOfObjectsToBeConverted.length]; - for (int i = 0; i < arrayOfObjectsToBeConverted.length; i++) { - vArg[i] = objectToVariant(arrayOfObjectsToBeConverted[i]); - } - return vArg; - } - } - - /** - * Convert a JACOB Variant value to a Java object (type conversions). - * provided in Sourceforge feature request 959381. A fix was done to handle - * byRef bug report 1607878. - *

    - * Unlike other toXXX() methods, it does not do a type conversion except for - * special data types (it shouldn't do any!) - *

    - * Converts Variant.VariantArray types to SafeArrays - * - * @return Corresponding Java object of the type matching the Variant type. - * @throws IllegalStateException - * if no underlying windows data structure - * @throws NotImplementedException - * if unsupported conversion is requested - * @throws JacobException - * if the calculated result was a JacobObject usually as a - * result of error - */ - protected static Object variantToObject(Variant sourceData) { - Object result = null; - - short type = sourceData.getvt(); // variant type - - if ((type & Variant.VariantArray) == Variant.VariantArray) { // array - // returned? - SafeArray array = null; - type = (short) (type - Variant.VariantArray); - // From SF Bug 1840487 - // This did call toSafeArray(false) but that meant - // this was the only variantToObject() that didn't have its own - // copy of the data so you would end up with weird run time - // errors after some GC. So now we just get stupid about it and - // always make a copy just like toSafeArray() does. - array = sourceData.toSafeArray(); - result = array; - } else { // non-array object returned - switch (type) { - case Variant.VariantEmpty: // 0 - case Variant.VariantNull: // 1 - break; - case Variant.VariantShort: // 2 - result = new Short(sourceData.getShort()); - break; - case Variant.VariantShort | Variant.VariantByref: // 2 - result = new Short(sourceData.getShortRef()); - break; - case Variant.VariantInt: // 3 - result = new Integer(sourceData.getInt()); - break; - case Variant.VariantInt | Variant.VariantByref: // 3 - result = new Integer(sourceData.getIntRef()); - break; - case Variant.VariantFloat: // 4 - result = new Float(sourceData.getFloat()); - break; - case Variant.VariantFloat | Variant.VariantByref: // 4 - result = new Float(sourceData.getFloatRef()); - break; - case Variant.VariantDouble: // 5 - result = new Double(sourceData.getDouble()); - break; - case Variant.VariantDouble | Variant.VariantByref: // 5 - result = new Double(sourceData.getDoubleRef()); - break; - case Variant.VariantCurrency: // 6 - result = sourceData.getCurrency(); - break; - case Variant.VariantCurrency | Variant.VariantByref: // 6 - result = sourceData.getCurrencyRef(); - break; - case Variant.VariantDate: // 7 - result = sourceData.getJavaDate(); - break; - case Variant.VariantDate | Variant.VariantByref: // 7 - result = sourceData.getJavaDateRef(); - break; - case Variant.VariantString: // 8 - result = sourceData.getString(); - break; - case Variant.VariantString | Variant.VariantByref: // 8 - result = sourceData.getStringRef(); - break; - case Variant.VariantDispatch: // 9 - result = sourceData.getDispatch(); - break; - case Variant.VariantDispatch | Variant.VariantByref: // 9 - result = sourceData.getDispatchRef(); // Can dispatches even - // be byRef? - break; - case Variant.VariantError: // 10 - result = new NotImplementedException( - "toJavaObject() Not implemented for VariantError"); - break; - case Variant.VariantBoolean: // 11 - result = new Boolean(sourceData.getBoolean()); - break; - case Variant.VariantBoolean | Variant.VariantByref: // 11 - result = new Boolean(sourceData.getBooleanRef()); - break; - case Variant.VariantVariant: // 12 they are always by ref - result = new NotImplementedException( - "toJavaObject() Not implemented for VariantVariant without ByRef"); - break; - case Variant.VariantVariant | Variant.VariantByref: // 12 - result = sourceData.getVariant(); - break; - case Variant.VariantObject: // 13 - result = new NotImplementedException( - "toJavaObject() Not implemented for VariantObject"); - break; - case Variant.VariantDecimal: // 14 - result = sourceData.getDecimal(); - break; - case Variant.VariantDecimal | Variant.VariantByref: // 14 - result = sourceData.getDecimalRef(); - break; - case Variant.VariantByte: // 17 - result = new Byte(sourceData.getByte()); - break; - case Variant.VariantByte | Variant.VariantByref: // 17 - result = new Byte(sourceData.getByteRef()); - break; - case Variant.VariantLongInt: // 20 - result = new Long(sourceData.getLong()); - break; - case Variant.VariantLongInt | Variant.VariantByref: // 20 - result = new Long(sourceData.getLongRef()); - break; - case Variant.VariantTypeMask: // 4095 - result = new NotImplementedException( - "toJavaObject() Not implemented for VariantBstrBlob/VariantTypeMask"); - break; - case Variant.VariantArray: // 8192 - result = new NotImplementedException( - "toJavaObject() Not implemented for VariantArray"); - break; - case Variant.VariantByref: // 16384 - result = new NotImplementedException( - "toJavaObject() Not implemented for VariantByref"); - break; - default: - result = new NotImplementedException("Unknown return type: " - + type); - // there was a "return result" here that caused defect 1602118 - // so it was removed - break; - }// switch (type) - - if (result instanceof JacobException) { - throw (JacobException) result; - } - } - - return result; - }// toJava() - - /** - * Verifies that we have a scale 0 <= x <= 28 and now more than 96 bits of - * data. The roundToMSDecimal method will attempt to adjust a BigDecimal to - * pass this set of tests - * - * @param in - * @throws IllegalArgumentException - * if out of bounds - */ - protected static void validateDecimalScaleAndBits(BigDecimal in) { - BigInteger allWordBigInt = in.unscaledValue(); - if (in.scale() > 28) { - // should this cast to a string and call putStringRef()? - throw new IllegalArgumentException( - "VT_DECIMAL only supports a maximum scale of 28 and the passed" - + " in value has a scale of " + in.scale()); - } else if (in.scale() < 0) { - // should this cast to a string and call putStringRef()? - throw new IllegalArgumentException( - "VT_DECIMAL only supports a minimum scale of 0 and the passed" - + " in value has a scale of " + in.scale()); - } else if (allWordBigInt.bitLength() > 12 * 8) { - throw new IllegalArgumentException( - "VT_DECIMAL supports a maximum of " - + 12 - * 8 - + " bits not counting scale and the number passed in has " - + allWordBigInt.bitLength()); - - } else { - // no bounds problem to be handled - } - - } - - /** - * Largest possible number with scale set to 0 - */ - private static final BigDecimal LARGEST_DECIMAL = new BigDecimal( - new BigInteger("ffffffffffffffffffffffff", 16)); - /** - * Smallest possible number with scale set to 0. MS doesn't support negative - * scales like BigDecimal. - */ - private static final BigDecimal SMALLEST_DECIMAL = new BigDecimal( - new BigInteger("ffffffffffffffffffffffff", 16).negate()); - - /** - * Does any validation that couldn't have been fixed by rounding or scale - * modification. - * - * @param in - * The BigDecimal to be validated - * @throws IllegalArgumentException - * if the number is too large or too small or null - */ - protected static void validateDecimalMinMax(BigDecimal in) { - if (in == null) { - throw new IllegalArgumentException( - "null is not a supported Decimal value."); - } else if (LARGEST_DECIMAL.compareTo(in) < 0) { - throw new IllegalArgumentException( - "Value too large for VT_DECIMAL data type:" + in.toString() - + " integer: " + in.toBigInteger().toString(16) - + " scale: " + in.scale()); - } else if (SMALLEST_DECIMAL.compareTo(in) > 0) { - throw new IllegalArgumentException( - "Value too small for VT_DECIMAL data type:" + in.toString() - + " integer: " + in.toBigInteger().toString(16) - + " scale: " + in.scale()); - } - - } - - /** - * Rounds the scale and bit length so that it will pass - * validateDecimalScaleBits(). Developers should call this method if they - * really want MS Decimal and don't want to lose precision. - *

    - * Changing the scale on a number that can fit in an MS Decimal can change - * the number's representation enough that it will round to a number too - * large to be represented by an MS VT_DECIMAL - * - * @param sourceDecimal - * @return BigDecimal a new big decimal that was rounded to fit in an MS - * VT_DECIMAL - */ - public static BigDecimal roundToMSDecimal(BigDecimal sourceDecimal) { - BigInteger sourceDecimalIntComponent = sourceDecimal.unscaledValue(); - BigDecimal destinationDecimal = new BigDecimal( - sourceDecimalIntComponent, sourceDecimal.scale()); - int roundingModel = BigDecimal.ROUND_HALF_UP; - validateDecimalMinMax(destinationDecimal); - // First limit the number of digits and then the precision. - // Try and round to 29 digits because we can sometimes do that - BigInteger allWordBigInt; - allWordBigInt = destinationDecimal.unscaledValue(); - if (allWordBigInt.bitLength() > 96) { - destinationDecimal = destinationDecimal.round(new MathContext(29)); - // see if 29 digits uses more than 96 bits - if (allWordBigInt.bitLength() > 96) { - // Dang. It was over 97 bits so shorten it one more digit to - // stay <= 96 bits - destinationDecimal = destinationDecimal.round(new MathContext( - 28)); - } - } - // the bit manipulations above may change the scale so do it afterwards - // round the scale to the max MS can support - if (destinationDecimal.scale() > 28) { - destinationDecimal = destinationDecimal.setScale(28, roundingModel); - } - if (destinationDecimal.scale() < 0) { - destinationDecimal = destinationDecimal.setScale(0, roundingModel); - } - return destinationDecimal; - } -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/VariantViaEvent.java b/vendor/jacob/1.15-M4/java/com/jacob/com/VariantViaEvent.java deleted file mode 100644 index 649d2bc..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/VariantViaEvent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * a public class to variant that is used to track which variant objects are - * created by event callbacks This is solely used for that purpose. - */ -public class VariantViaEvent extends Variant { - - /** - * Standard constructor used by JNI event handling layer - */ - public VariantViaEvent() { - super(); - } -} diff --git a/vendor/jacob/1.15-M4/java/com/jacob/com/WrongThreadException.java b/vendor/jacob/1.15-M4/java/com/jacob/com/WrongThreadException.java deleted file mode 100644 index 938e40c..0000000 --- a/vendor/jacob/1.15-M4/java/com/jacob/com/WrongThreadException.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1999-2004 Sourceforge JACOB Project. - * All rights reserved. Originator: Dan Adler (http://danadler.com). - * Get more information about JACOB at http://sourceforge.net/projects/jacob-project - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -package com.jacob.com; - -/** - * thrown in util.cpp - */ -public class WrongThreadException extends JacobException { - /** - * identifier generated by Eclipse - */ - private static final long serialVersionUID = 6308780364980228692L; - - /** - * standard 0 arg constructor with no message - * - */ - public WrongThreadException() { - super("No Message Provided."); - } - - /** - * standard constructor with a string message - * - * @param s - */ - public WrongThreadException(String s) { - super(s); - } -} \ No newline at end of file diff --git a/vendor/nativecall/0.4.1/NativeCall.dll b/vendor/nativecall/0.4.1/NativeCall.dll deleted file mode 100644 index 6e2cad1..0000000 Binary files a/vendor/nativecall/0.4.1/NativeCall.dll and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/IntCall.asm b/vendor/nativecall/0.4.1/cpp/Debug/IntCall.asm deleted file mode 100644 index 7724ee0..0000000 --- a/vendor/nativecall/0.4.1/cpp/Debug/IntCall.asm +++ /dev/null @@ -1,1766 +0,0 @@ - TITLE C:\Documents and Settings\Administrator\My Documents\Software\NativeCall\src\cpp\IntCall.cpp - .386P -include listing.inc -if @Version gt 510 -.model FLAT -else -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' -_BSS ENDS -$$SYMBOLS SEGMENT BYTE USE32 'DEBSYM' -$$SYMBOLS ENDS -$$TYPES SEGMENT BYTE USE32 'DEBTYP' -$$TYPES ENDS -_TLS SEGMENT DWORD USE32 PUBLIC 'TLS' -_TLS ENDS -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ??8@YAHABU_GUID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_IntCall_executeCall@8 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_IntCall_executeCall0@12 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -FLAT GROUP _DATA, CONST, _BSS - ASSUME CS: FLAT, DS: FLAT, SS: FLAT -endif -PUBLIC ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField -PUBLIC ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -PUBLIC _Java_com_eaio_nativecall_IntCall_executeCall@8 -EXTRN __imp__GetLastError@0:NEAR -EXTRN ?fieldFunctionHandle@@3PAU_jfieldID@@A:DWORD ; fieldFunctionHandle -EXTRN ?fieldLastErrorCode@@3PAU_jfieldID@@A:DWORD ; fieldLastErrorCode -EXTRN __chkesp:NEAR -; COMDAT _Java_com_eaio_nativecall_IntCall_executeCall@8 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_functionHandle$ = -4 -_outVal$ = -8 -_Java_com_eaio_nativecall_IntCall_executeCall@8 PROC NEAR ; COMDAT - -; 79 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 80 : -; 81 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField - mov DWORD PTR _functionHandle$[ebp], eax - -; 82 : jint outVal; -; 83 : -; 84 : #ifdef _WINDOWS -; 85 : #ifdef _X86_ -; 86 : -; 87 : __asm { -; 88 : -; 89 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 90 : mov outVal, eax - - mov DWORD PTR _outVal$[ebp], eax - -; 91 : -; 92 : } -; 93 : -; 94 : #endif -; 95 : #endif -; 96 : -; 97 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov edx, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 98 : -; 99 : return outVal; - - mov eax, DWORD PTR _outVal$[ebp] - -; 100 : -; 101 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -_Java_com_eaio_nativecall_IntCall_executeCall@8 ENDP -_TEXT ENDS -PUBLIC ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField -PUBLIC ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ; JNIEnv_::SetObjectField -PUBLIC _Java_com_eaio_nativecall_IntCall_executeCall0@12 -PUBLIC ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z ; JNIEnv_::GetArrayLength -PUBLIC ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ; JNIEnv_::GetObjectArrayElement -PUBLIC ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' -PUBLIC ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical -PUBLIC ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ; JNIEnv_::ReleasePrimitiveArrayCritical -PUBLIC ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass -PUBLIC ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z ; JNIEnv_::ThrowNew -PUBLIC ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject -PUBLIC ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf -PUBLIC ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod -PUBLIC ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod -EXTRN ??2@YAPAXI@Z:NEAR ; operator new -EXTRN ??3@YAXPAX@Z:NEAR ; operator delete -EXTRN ?fieldHolderO@@3PAU_jfieldID@@A:DWORD ; fieldHolderO -EXTRN ?classBoolean@@3PAV_jclass@@A:DWORD ; classBoolean -EXTRN ?classInteger@@3PAV_jclass@@A:DWORD ; classInteger -EXTRN ?classByteArray@@3PAV_jclass@@A:DWORD ; classByteArray -EXTRN ?classCharArray@@3PAV_jclass@@A:DWORD ; classCharArray -EXTRN ?classHolder@@3PAV_jclass@@A:DWORD ; classHolder -EXTRN ?methodBooleanValue@@3PAU_jmethodID@@A:DWORD ; methodBooleanValue -EXTRN ?methodIntValue@@3PAU_jmethodID@@A:DWORD ; methodIntValue -EXTRN ?newIntegerInt@@3PAU_jmethodID@@A:DWORD ; newIntegerInt -EXTRN ?newBooleanBoolean@@3PAU_jmethodID@@A:DWORD ; newBooleanBoolean -EXTRN _memset:NEAR -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -; File c:\documents and settings\administrator\my documents\software\nativecall\src\cpp\intcall.cpp -CONST SEGMENT -??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ DB 'java/lang/OutOfMemor' - DB 'yError', 00H ; `string' -CONST ENDS -; COMDAT _Java_com_eaio_nativecall_IntCall_executeCall0@12 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_params$ = 16 -_len$ = -4 -_arrays$ = -8 -_param$ = -12 -_i$ = -16 -_intArg$56817 = -20 -_byteArrayArg$56820 = -24 -_charArrayArg$56826 = -28 -_booleanArg$56832 = -32 -_tempArg$56833 = -36 -_o$56836 = -40 -_intPtr$56838 = -44 -_byteArrayArg$56844 = -48 -_charArrayArg$56850 = -52 -_booleanArg$56856 = -56 -_tempPtr$56857 = -60 -_functionHandle$ = -64 -_outVal$ = -68 -_j$ = -72 -_o$56875 = -76 -_out$56877 = -80 -_out$56887 = -84 -$T56916 = -88 -$T56917 = -92 -$T56918 = -96 -$T56919 = -100 -$T56920 = -104 -$T56921 = -108 -_Java_com_eaio_nativecall_IntCall_executeCall0@12 PROC NEAR ; COMDAT - -; 109 : (JNIEnv *env, jobject obj, jobjectArray params) { - - push ebp - mov ebp, esp - sub esp, 172 ; 000000acH - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-172] - mov ecx, 43 ; 0000002bH - mov eax, -858993460 ; ccccccccH - rep stosd - -; 110 : -; 111 : const int len = env->GetArrayLength(params); - - mov eax, DWORD PTR _params$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z ; JNIEnv_::GetArrayLength - mov DWORD PTR _len$[ebp], eax - -; 112 : -; 113 : int* arrays = NULL; - - mov DWORD PTR _arrays$[ebp], 0 - -; 114 : if (!(arrays = new int[len])) { - - mov ecx, DWORD PTR _len$[ebp] - shl ecx, 2 - push ecx - call ??2@YAPAXI@Z ; operator new - add esp, 4 - mov DWORD PTR $T56916[ebp], eax - mov edx, DWORD PTR $T56916[ebp] - mov DWORD PTR _arrays$[ebp], edx - cmp DWORD PTR _arrays$[ebp], 0 - jne SHORT $L56806 - -; 115 : env->ThrowNew(env->FindClass("java/lang/OutOfMemoryError"), NULL); - - push 0 - push OFFSET FLAT:??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z ; JNIEnv_::ThrowNew - -; 116 : return 0; - - xor eax, eax - jmp $L56801 -$L56806: - -; 118 : memset(arrays, 0, (sizeof(int) * len)); - - mov eax, DWORD PTR _len$[ebp] - shl eax, 2 - push eax - push 0 - mov ecx, DWORD PTR _arrays$[ebp] - push ecx - call _memset - add esp, 12 ; 0000000cH - -; 119 : -; 120 : jobject param; -; 121 : -; 122 : for (int i = len - 1; i >= 0; i--) { - - mov edx, DWORD PTR _len$[ebp] - sub edx, 1 - mov DWORD PTR _i$[ebp], edx - jmp SHORT $L56811 -$L56812: - mov eax, DWORD PTR _i$[ebp] - sub eax, 1 - mov DWORD PTR _i$[ebp], eax -$L56811: - cmp DWORD PTR _i$[ebp], 0 - jl $L56813 - -; 123 : -; 124 : param = env->GetObjectArrayElement(params, i); - - mov ecx, DWORD PTR _i$[ebp] - push ecx - mov edx, DWORD PTR _params$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ; JNIEnv_::GetObjectArrayElement - mov DWORD PTR _param$[ebp], eax - -; 125 : -; 126 : if (param == NULL) { - - cmp DWORD PTR _param$[ebp], 0 - jne SHORT $L56814 - -; 127 : _push(0); - - push 0 - -; 129 : else if (env->IsInstanceOf(param, classInteger)) { - - jmp $L56855 -$L56814: - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56816 - -; 130 : int intArg = env->CallIntMethod(param, methodIntValue); - - mov edx, DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - push ecx - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - add esp, 12 ; 0000000cH - mov DWORD PTR _intArg$56817[ebp], eax - -; 131 : _push(intArg) - - push DWORD PTR _intArg$56817[ebp] - -; 133 : else if (env->IsInstanceOf(param, classByteArray)) { - - jmp $L56855 -$L56816: - mov edx, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56819 - -; 134 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) param, 0); - - push 0 - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _byteArrayArg$56820[ebp], eax - -; 135 : arrays[i] = (int) &byteArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _byteArrayArg$56820[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 136 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$56820[ebp] - -; 138 : else if (env->IsInstanceOf(param, classCharArray)) { - - jmp $L56855 -$L56819: - mov edx, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56825 - -; 139 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 140 : (jarray) param, 0); - - push 0 - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _charArrayArg$56826[ebp], eax - -; 141 : arrays[i] = (int) &charArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _charArrayArg$56826[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 142 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$56826[ebp] - -; 144 : else if (env->IsInstanceOf(param, classBoolean)) { - - jmp $L56855 -$L56825: - mov edx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56831 - -; 145 : jboolean booleanArg = env->CallBooleanMethod(param, methodBooleanValue); - - mov ecx, DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov eax, DWORD PTR _env$[ebp] - push eax - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - add esp, 12 ; 0000000cH - mov BYTE PTR _booleanArg$56832[ebp], al - -; 146 : int tempArg = (booleanArg == JNI_FALSE ? 0 : 1); - - mov ecx, DWORD PTR _booleanArg$56832[ebp] - and ecx, 255 ; 000000ffH - neg ecx - sbb ecx, ecx - neg ecx - mov DWORD PTR _tempArg$56833[ebp], ecx - -; 147 : _push(tempArg) - - push DWORD PTR _tempArg$56833[ebp] - -; 149 : else if (env->IsInstanceOf(param, classHolder)) { - - jmp $L56855 -$L56831: - mov edx, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je $L56855 - -; 150 : -; 151 : /* Holder */ -; 152 : -; 153 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov ecx, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField - mov DWORD PTR _o$56836[ebp], eax - -; 154 : -; 155 : if (env->IsInstanceOf(o, classInteger)) { - - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - mov ecx, DWORD PTR _o$56836[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56837 - -; 156 : int *intPtr = new int; - - push 4 - call ??2@YAPAXI@Z ; operator new - add esp, 4 - mov DWORD PTR $T56917[ebp], eax - mov edx, DWORD PTR $T56917[ebp] - mov DWORD PTR _intPtr$56838[ebp], edx - -; 157 : *intPtr = env->CallIntMethod(o, methodIntValue); - - mov eax, DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push eax - mov ecx, DWORD PTR _o$56836[ebp] - push ecx - mov edx, DWORD PTR _env$[ebp] - push edx - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - add esp, 12 ; 0000000cH - mov ecx, DWORD PTR _intPtr$56838[ebp] - mov DWORD PTR [ecx], eax - -; 158 : arrays[i] = (int) intPtr; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - mov ecx, DWORD PTR _intPtr$56838[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 159 : _push(intPtr); - - push DWORD PTR _intPtr$56838[ebp] - -; 161 : else if (env->IsInstanceOf(o, classByteArray)) { - - jmp $L56855 -$L56837: - mov edx, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push edx - mov eax, DWORD PTR _o$56836[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56843 - -; 162 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) o, 0); - - push 0 - mov ecx, DWORD PTR _o$56836[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _byteArrayArg$56844[ebp], eax - -; 163 : arrays[i] = (int) &byteArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _byteArrayArg$56844[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 164 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$56844[ebp] - -; 166 : else if (env->IsInstanceOf(o, classCharArray)) { - - jmp $L56855 -$L56843: - mov edx, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push edx - mov eax, DWORD PTR _o$56836[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56849 - -; 167 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 168 : (jarray) o, 0); - - push 0 - mov ecx, DWORD PTR _o$56836[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _charArrayArg$56850[ebp], eax - -; 169 : arrays[i] = (int) &charArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _charArrayArg$56850[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 170 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$56850[ebp] - -; 172 : else if (env->IsInstanceOf(o, classBoolean)) { - - jmp SHORT $L56855 -$L56849: - mov edx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push edx - mov eax, DWORD PTR _o$56836[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56855 - -; 173 : jboolean booleanArg = env->CallBooleanMethod(o, methodBooleanValue); - - mov ecx, DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ecx - mov edx, DWORD PTR _o$56836[ebp] - push edx - mov eax, DWORD PTR _env$[ebp] - push eax - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - add esp, 12 ; 0000000cH - mov BYTE PTR _booleanArg$56856[ebp], al - -; 174 : int *tempPtr = new int; - - push 4 - call ??2@YAPAXI@Z ; operator new - add esp, 4 - mov DWORD PTR $T56918[ebp], eax - mov ecx, DWORD PTR $T56918[ebp] - mov DWORD PTR _tempPtr$56857[ebp], ecx - -; 175 : *tempPtr = (booleanArg == JNI_FALSE ? 0 : 1); - - mov edx, DWORD PTR _booleanArg$56856[ebp] - and edx, 255 ; 000000ffH - neg edx - sbb edx, edx - neg edx - mov eax, DWORD PTR _tempPtr$56857[ebp] - mov DWORD PTR [eax], edx - -; 176 : arrays[i] = (int) tempPtr; - - mov ecx, DWORD PTR _i$[ebp] - mov edx, DWORD PTR _arrays$[ebp] - mov eax, DWORD PTR _tempPtr$56857[ebp] - mov DWORD PTR [edx+ecx*4], eax - -; 177 : _push(tempPtr); - - push DWORD PTR _tempPtr$56857[ebp] -$L56855: - -; 183 : -; 184 : } - - jmp $L56812 -$L56813: - -; 185 : -; 186 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov ecx, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField - mov DWORD PTR _functionHandle$[ebp], eax - -; 187 : jint outVal; -; 188 : -; 189 : #ifdef _WINDOWS -; 190 : #ifdef _X86_ -; 191 : -; 192 : __asm { -; 193 : -; 194 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 195 : mov outVal, eax - - mov DWORD PTR _outVal$[ebp], eax - -; 196 : -; 197 : } -; 198 : -; 199 : #endif -; 200 : #endif -; 201 : -; 202 : for (int j = 0; j < len; ++j) { - - mov DWORD PTR _j$[ebp], 0 - jmp SHORT $L56864 -$L56865: - mov eax, DWORD PTR _j$[ebp] - add eax, 1 - mov DWORD PTR _j$[ebp], eax -$L56864: - mov ecx, DWORD PTR _j$[ebp] - cmp ecx, DWORD PTR _len$[ebp] - jge $L56866 - -; 203 : param = env->GetObjectArrayElement(params, j); - - mov edx, DWORD PTR _j$[ebp] - push edx - mov eax, DWORD PTR _params$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ; JNIEnv_::GetObjectArrayElement - mov DWORD PTR _param$[ebp], eax - -; 204 : if (param == NULL) {} - - cmp DWORD PTR _param$[ebp], 0 - jne SHORT $L56867 - -; 205 : else if (env->IsInstanceOf(param, classByteArray) || env->IsInstanceOf(param, classCharArray)) { - - jmp $L56886 -$L56867: - mov ecx, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - jne SHORT $L56870 - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56869 -$L56870: - -; 206 : env->ReleasePrimitiveArrayCritical((jarray) param, (void*) arrays[j], 0); - - push 0 - mov edx, DWORD PTR _j$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - mov ecx, DWORD PTR [eax+edx*4] - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ; JNIEnv_::ReleasePrimitiveArrayCritical - -; 208 : else if (env->IsInstanceOf(param, classHolder)) { - - jmp $L56886 -$L56869: - mov eax, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je $L56886 - -; 209 : -; 210 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov edx, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField - mov DWORD PTR _o$56875[ebp], eax - -; 211 : -; 212 : if (env->IsInstanceOf(o, classInteger)) { - - mov ecx, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push ecx - mov edx, DWORD PTR _o$56875[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56876 - -; 213 : int* out = (int*) arrays[j]; - - mov eax, DWORD PTR _j$[ebp] - mov ecx, DWORD PTR _arrays$[ebp] - mov edx, DWORD PTR [ecx+eax*4] - mov DWORD PTR _out$56877[ebp], edx - -; 214 : env->SetObjectField(param, fieldHolderO, env->NewObject(classInteger, newIntegerInt, *out)); - - mov eax, DWORD PTR _out$56877[ebp] - mov ecx, DWORD PTR [eax] - push ecx - mov edx, DWORD PTR ?newIntegerInt@@3PAU_jmethodID@@A ; newIntegerInt - push edx - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - mov ecx, DWORD PTR _env$[ebp] - push ecx - call ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject - add esp, 16 ; 00000010H - push eax - mov edx, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ; JNIEnv_::SetObjectField - -; 215 : delete out; - - mov ecx, DWORD PTR _out$56877[ebp] - mov DWORD PTR $T56919[ebp], ecx - mov edx, DWORD PTR $T56919[ebp] - push edx - call ??3@YAXPAX@Z ; operator delete - add esp, 4 - -; 217 : else if (env->IsInstanceOf(o, classByteArray) || env->IsInstanceOf(o, classCharArray)) { - - jmp $L56886 -$L56876: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push eax - mov ecx, DWORD PTR _o$56875[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - jne SHORT $L56882 - mov edx, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push edx - mov eax, DWORD PTR _o$56875[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56881 -$L56882: - -; 218 : env->ReleasePrimitiveArrayCritical((jarray) o, (void*) arrays[j], 0); - - push 0 - mov ecx, DWORD PTR _j$[ebp] - mov edx, DWORD PTR _arrays$[ebp] - mov eax, DWORD PTR [edx+ecx*4] - push eax - mov ecx, DWORD PTR _o$56875[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ; JNIEnv_::ReleasePrimitiveArrayCritical - -; 220 : else if (env->IsInstanceOf(o, classBoolean)) { - - jmp SHORT $L56886 -$L56881: - mov edx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push edx - mov eax, DWORD PTR _o$56875[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56886 - -; 221 : int* out = (int*) arrays[j]; - - mov ecx, DWORD PTR _j$[ebp] - mov edx, DWORD PTR _arrays$[ebp] - mov eax, DWORD PTR [edx+ecx*4] - mov DWORD PTR _out$56887[ebp], eax - -; 222 : env->SetObjectField(param, fieldHolderO, env->NewObject(classBoolean, newBooleanBoolean, (*out == 0 ? JNI_FALSE : JNI_TRUE))); - - mov ecx, DWORD PTR _out$56887[ebp] - xor edx, edx - cmp DWORD PTR [ecx], 0 - setne dl - push edx - mov eax, DWORD PTR ?newBooleanBoolean@@3PAU_jmethodID@@A ; newBooleanBoolean - push eax - mov ecx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push ecx - mov edx, DWORD PTR _env$[ebp] - push edx - call ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject - add esp, 16 ; 00000010H - push eax - mov eax, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ; JNIEnv_::SetObjectField - -; 223 : delete out; - - mov edx, DWORD PTR _out$56887[ebp] - mov DWORD PTR $T56920[ebp], edx - mov eax, DWORD PTR $T56920[ebp] - push eax - call ??3@YAXPAX@Z ; operator delete - add esp, 4 -$L56886: - -; 227 : -; 228 : } - - jmp $L56865 -$L56866: - -; 229 : -; 230 : delete [] arrays; - - mov ecx, DWORD PTR _arrays$[ebp] - mov DWORD PTR $T56921[ebp], ecx - mov edx, DWORD PTR $T56921[ebp] - push edx - call ??3@YAXPAX@Z ; operator delete - add esp, 4 - -; 231 : -; 232 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov eax, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 233 : -; 234 : return outVal; - - mov eax, DWORD PTR _outVal$[ebp] -$L56801: - -; 235 : -; 236 : } - - pop edi - pop esi - pop ebx - add esp, 172 ; 000000acH - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -_Java_com_eaio_nativecall_IntCall_executeCall0@12 ENDP -_TEXT ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_name$ = 8 -?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z PROC NEAR ; JNIEnv_::FindClass, COMDAT - -; 759 : jclass FindClass(const char *name) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 760 : return functions->FindClass(this, name); - - mov esi, esp - mov eax, DWORD PTR _name$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+24] - cmp esi, esp - call __chkesp - -; 761 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ENDP ; JNIEnv_::FindClass -_TEXT ENDS -; COMDAT ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_clazz$ = 8 -_msg$ = 12 -?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z PROC NEAR ; JNIEnv_::ThrowNew, COMDAT - -; 787 : jint ThrowNew(jclass clazz, const char *msg) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 788 : return functions->ThrowNew(this, clazz, msg); - - mov esi, esp - mov eax, DWORD PTR _msg$[ebp] - push eax - mov ecx, DWORD PTR _clazz$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+56] - cmp esi, esp - call __chkesp - -; 789 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z ENDP ; JNIEnv_::ThrowNew -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_args$ = -4 -_result$ = -8 -_clazz$ = 12 -_methodID$ = 16 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::NewObject, COMDAT - -; 834 : jobject NewObject(jclass clazz, jmethodID methodID, ...) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 835 : va_list args; -; 836 : jobject result; -; 837 : va_start(args, methodID); - - lea eax, DWORD PTR _methodID$[ebp+4] - mov DWORD PTR _args$[ebp], eax - -; 838 : result = functions->NewObjectV(this,clazz,methodID,args); - - mov esi, esp - mov ecx, DWORD PTR _args$[ebp] - push ecx - mov edx, DWORD PTR _methodID$[ebp] - push edx - mov eax, DWORD PTR _clazz$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+116] - cmp esi, esp - call __chkesp - mov DWORD PTR _result$[ebp], eax - -; 839 : va_end(args); - - mov DWORD PTR _args$[ebp], 0 - -; 840 : return result; - - mov eax, DWORD PTR _result$[ebp] - -; 841 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 0 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::NewObject -_TEXT ENDS -; COMDAT ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z -_TEXT SEGMENT -_this$ = -4 -_obj$ = 8 -_clazz$ = 12 -?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z PROC NEAR ; JNIEnv_::IsInstanceOf, COMDAT - -; 854 : jboolean IsInstanceOf(jobject obj, jclass clazz) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 855 : return functions->IsInstanceOf(this,obj,clazz); - - mov esi, esp - mov eax, DWORD PTR _clazz$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+128] - cmp esi, esp - call __chkesp - -; 856 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ENDP ; JNIEnv_::IsInstanceOf -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_args$ = -4 -_result$ = -8 -_obj$ = 12 -_methodID$ = 16 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallBooleanMethod, COMDAT - -; 881 : jmethodID methodID, ...) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 882 : va_list args; -; 883 : jboolean result; -; 884 : va_start(args,methodID); - - lea eax, DWORD PTR _methodID$[ebp+4] - mov DWORD PTR _args$[ebp], eax - -; 885 : result = functions->CallBooleanMethodV(this,obj,methodID,args); - - mov esi, esp - mov ecx, DWORD PTR _args$[ebp] - push ecx - mov edx, DWORD PTR _methodID$[ebp] - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+152] - cmp esi, esp - call __chkesp - mov BYTE PTR _result$[ebp], al - -; 886 : va_end(args); - - mov DWORD PTR _args$[ebp], 0 - -; 887 : return result; - - mov al, BYTE PTR _result$[ebp] - -; 888 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 0 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallBooleanMethod -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_args$ = -4 -_result$ = -8 -_obj$ = 12 -_methodID$ = 16 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallIntMethod, COMDAT - -; 949 : jint CallIntMethod(jobject obj, jmethodID methodID, ...) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 950 : va_list args; -; 951 : jint result; -; 952 : va_start(args,methodID); - - lea eax, DWORD PTR _methodID$[ebp+4] - mov DWORD PTR _args$[ebp], eax - -; 953 : result = functions->CallIntMethodV(this,obj,methodID,args); - - mov esi, esp - mov ecx, DWORD PTR _args$[ebp] - push ecx - mov edx, DWORD PTR _methodID$[ebp] - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+200] - cmp esi, esp - call __chkesp - mov DWORD PTR _result$[ebp], eax - -; 954 : va_end(args); - - mov DWORD PTR _args$[ebp], 0 - -; 955 : return result; - - mov eax, DWORD PTR _result$[ebp] - -; 956 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 0 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallIntMethod -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_this$ = -4 -?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z PROC NEAR ; JNIEnv_::GetObjectField, COMDAT - -; 1248 : jobject GetObjectField(jobject obj, jfieldID fieldID) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1249 : return functions->GetObjectField(this,obj,fieldID); - - mov esi, esp - mov eax, DWORD PTR _fieldID$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+380] - cmp esi, esp - call __chkesp - -; 1250 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ENDP ; JNIEnv_::GetObjectField -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_this$ = -4 -?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z PROC NEAR ; JNIEnv_::GetIntField, COMDAT - -; 1263 : jint GetIntField(jobject obj, jfieldID fieldID) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1264 : return functions->GetIntField(this,obj,fieldID); - - mov esi, esp - mov eax, DWORD PTR _fieldID$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+400] - cmp esi, esp - call __chkesp - -; 1265 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ENDP ; JNIEnv_::GetIntField -_TEXT ENDS -; COMDAT ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_val$ = 16 -_this$ = -4 -?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z PROC NEAR ; JNIEnv_::SetObjectField, COMDAT - -; 1276 : void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1277 : functions->SetObjectField(this,obj,fieldID,val); - - mov esi, esp - mov eax, DWORD PTR _val$[ebp] - push eax - mov ecx, DWORD PTR _fieldID$[ebp] - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+416] - cmp esi, esp - call __chkesp - -; 1278 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ENDP ; JNIEnv_::SetObjectField -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_val$ = 16 -_this$ = -4 -?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z PROC NEAR ; JNIEnv_::SetIntField, COMDAT - -; 1296 : jint val) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1297 : functions->SetIntField(this,obj,fieldID,val); - - mov esi, esp - mov eax, DWORD PTR _val$[ebp] - push eax - mov ecx, DWORD PTR _fieldID$[ebp] - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+436] - cmp esi, esp - call __chkesp - -; 1298 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ENDP ; JNIEnv_::SetIntField -_TEXT ENDS -; COMDAT ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z PROC NEAR ; JNIEnv_::GetArrayLength, COMDAT - -; 1589 : jsize GetArrayLength(jarray array) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1590 : return functions->GetArrayLength(this,array); - - mov esi, esp - mov eax, DWORD PTR _array$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+684] - cmp esi, esp - call __chkesp - -; 1591 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z ENDP ; JNIEnv_::GetArrayLength -_TEXT ENDS -; COMDAT ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -_index$ = 12 -?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z PROC NEAR ; JNIEnv_::GetObjectArrayElement, COMDAT - -; 1597 : jobject GetObjectArrayElement(jobjectArray array, jsize index) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1598 : return functions->GetObjectArrayElement(this,array,index); - - mov esi, esp - mov eax, DWORD PTR _index$[ebp] - push eax - mov ecx, DWORD PTR _array$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+692] - cmp esi, esp - call __chkesp - -; 1599 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ENDP ; JNIEnv_::GetObjectArrayElement -_TEXT ENDS -; COMDAT ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -_isCopy$ = 12 -?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z PROC NEAR ; JNIEnv_::GetPrimitiveArrayCritical, COMDAT - -; 1788 : void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1789 : return functions->GetPrimitiveArrayCritical(this,array,isCopy); - - mov esi, esp - mov eax, DWORD PTR _isCopy$[ebp] - push eax - mov ecx, DWORD PTR _array$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+888] - cmp esi, esp - call __chkesp - -; 1790 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ENDP ; JNIEnv_::GetPrimitiveArrayCritical -_TEXT ENDS -; COMDAT ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -_carray$ = 12 -_mode$ = 16 -?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z PROC NEAR ; JNIEnv_::ReleasePrimitiveArrayCritical, COMDAT - -; 1791 : void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1792 : functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); - - mov esi, esp - mov eax, DWORD PTR _mode$[ebp] - push eax - mov ecx, DWORD PTR _carray$[ebp] - push ecx - mov edx, DWORD PTR _array$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+892] - cmp esi, esp - call __chkesp - -; 1793 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ENDP ; JNIEnv_::ReleasePrimitiveArrayCritical -_TEXT ENDS -END diff --git a/vendor/nativecall/0.4.1/cpp/Debug/IntCall.obj b/vendor/nativecall/0.4.1/cpp/Debug/IntCall.obj deleted file mode 100644 index f33470a..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/IntCall.obj and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.asm b/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.asm deleted file mode 100644 index 8e38052..0000000 --- a/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.asm +++ /dev/null @@ -1,1492 +0,0 @@ - TITLE C:\Documents and Settings\Administrator\My Documents\Software\NativeCall\src\cpp\NativeCall.cpp - .386P -include listing.inc -if @Version gt 510 -.model FLAT -else -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' -_BSS ENDS -$$SYMBOLS SEGMENT BYTE USE32 'DEBSYM' -$$SYMBOLS ENDS -$$TYPES SEGMENT BYTE USE32 'DEBTYP' -$$TYPES ENDS -_TLS SEGMENT DWORD USE32 PUBLIC 'TLS' -_TLS ENDS -; COMDAT ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_08JJOG@function?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_06CODG@module?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_01FLOP@I?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0P@LKIL@functionHandle?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0N@EFAA@moduleHandle?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0O@OMHL@lastErrorCode?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_01PGHN@o?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0BB@LLFN@java?1lang?1String?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_02LOEJ@?$FLB?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_02BENO@?$FLC?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_03KJOK@?$CI?$CJZ?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_0N@KEBP@booleanValue?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_03PPCD@?$CI?$CJI?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_08JCMA@intValue?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_04ECLF@?$CII?$CJV?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_06KILP@?$DMinit?$DO?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ??_C@_04JFOE@?$CIZ?$CJV?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ??8@YAHABU_GUID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_NativeCall_initIDs@8 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_NativeCall_initHandles@8 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_NativeCall_getLastError@8 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_NativeCall_destroy@8 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -FLAT GROUP _DATA, CONST, _BSS - ASSUME CS: FLAT, DS: FLAT, SS: FLAT -endif -PUBLIC ?fieldFunction@@3PAU_jfieldID@@A ; fieldFunction -PUBLIC ?fieldModule@@3PAU_jfieldID@@A ; fieldModule -PUBLIC ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle -PUBLIC ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle -PUBLIC ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode -PUBLIC ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO -PUBLIC ?classBoolean@@3PAV_jclass@@A ; classBoolean -PUBLIC ?classInteger@@3PAV_jclass@@A ; classInteger -PUBLIC ?classString@@3PAV_jclass@@A ; classString -PUBLIC ?classByteArray@@3PAV_jclass@@A ; classByteArray -PUBLIC ?classCharArray@@3PAV_jclass@@A ; classCharArray -PUBLIC ?classHolder@@3PAV_jclass@@A ; classHolder -PUBLIC ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue -PUBLIC ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue -PUBLIC ?newIntegerInt@@3PAU_jmethodID@@A ; newIntegerInt -PUBLIC ?newBooleanBoolean@@3PAU_jmethodID@@A ; newBooleanBoolean -_BSS SEGMENT -?fieldFunction@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldFunction -?fieldModule@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldModule -?fieldFunctionHandle@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldFunctionHandle -?fieldModuleHandle@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldModuleHandle -?fieldLastErrorCode@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldLastErrorCode -?fieldHolderO@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldHolderO -?classBoolean@@3PAV_jclass@@A DD 01H DUP (?) ; classBoolean -?classInteger@@3PAV_jclass@@A DD 01H DUP (?) ; classInteger -?classString@@3PAV_jclass@@A DD 01H DUP (?) ; classString -?classByteArray@@3PAV_jclass@@A DD 01H DUP (?) ; classByteArray -?classCharArray@@3PAV_jclass@@A DD 01H DUP (?) ; classCharArray -?classHolder@@3PAV_jclass@@A DD 01H DUP (?) ; classHolder -?methodBooleanValue@@3PAU_jmethodID@@A DD 01H DUP (?) ; methodBooleanValue -?methodIntValue@@3PAU_jmethodID@@A DD 01H DUP (?) ; methodIntValue -?newIntegerInt@@3PAU_jmethodID@@A DD 01H DUP (?) ; newIntegerInt -?newBooleanBoolean@@3PAU_jmethodID@@A DD 01H DUP (?) ; newBooleanBoolean -_BSS ENDS -PUBLIC ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID -PUBLIC _Java_com_eaio_nativecall_NativeCall_initIDs@8 -PUBLIC ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ ; `string' -PUBLIC ??_C@_08JJOG@function?$AA@ ; `string' -PUBLIC ??_C@_06CODG@module?$AA@ ; `string' -PUBLIC ??_C@_01FLOP@I?$AA@ ; `string' -PUBLIC ??_C@_0P@LKIL@functionHandle?$AA@ ; `string' -PUBLIC ??_C@_0N@EFAA@moduleHandle?$AA@ ; `string' -PUBLIC ??_C@_0O@OMHL@lastErrorCode?$AA@ ; `string' -PUBLIC ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ ; `string' -PUBLIC ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ ; `string' -PUBLIC ??_C@_01PGHN@o?$AA@ ; `string' -PUBLIC ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ ; `string' -PUBLIC ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ ; `string' -PUBLIC ??_C@_0BB@LLFN@java?1lang?1String?$AA@ ; `string' -PUBLIC ??_C@_02LOEJ@?$FLB?$AA@ ; `string' -PUBLIC ??_C@_02BENO@?$FLC?$AA@ ; `string' -PUBLIC ??_C@_03KJOK@?$CI?$CJZ?$AA@ ; `string' -PUBLIC ??_C@_0N@KEBP@booleanValue?$AA@ ; `string' -PUBLIC ??_C@_03PPCD@?$CI?$CJI?$AA@ ; `string' -PUBLIC ??_C@_08JCMA@intValue?$AA@ ; `string' -PUBLIC ??_C@_04ECLF@?$CII?$CJV?$AA@ ; `string' -PUBLIC ??_C@_06KILP@?$DMinit?$DO?$AA@ ; `string' -PUBLIC ??_C@_04JFOE@?$CIZ?$CJV?$AA@ ; `string' -PUBLIC ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass -PUBLIC ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef -PUBLIC ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetMethodID -EXTRN __chkesp:NEAR -; COMDAT ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ -; File c:\documents and settings\administrator\my documents\software\nativecall\src\cpp\nativecall.cpp -CONST SEGMENT -??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ DB 'Ljava/lang/String;', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_08JJOG@function?$AA@ -CONST SEGMENT -??_C@_08JJOG@function?$AA@ DB 'function', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_06CODG@module?$AA@ -CONST SEGMENT -??_C@_06CODG@module?$AA@ DB 'module', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_01FLOP@I?$AA@ -CONST SEGMENT -??_C@_01FLOP@I?$AA@ DB 'I', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0P@LKIL@functionHandle?$AA@ -CONST SEGMENT -??_C@_0P@LKIL@functionHandle?$AA@ DB 'functionHandle', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0N@EFAA@moduleHandle?$AA@ -CONST SEGMENT -??_C@_0N@EFAA@moduleHandle?$AA@ DB 'moduleHandle', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0O@OMHL@lastErrorCode?$AA@ -CONST SEGMENT -??_C@_0O@OMHL@lastErrorCode?$AA@ DB 'lastErrorCode', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ -CONST SEGMENT -??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ DB 'com/eaio/nativecall' - DB '/Holder', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ -CONST SEGMENT -??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ DB 'Ljava/lang/Object;', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_01PGHN@o?$AA@ -CONST SEGMENT -??_C@_01PGHN@o?$AA@ DB 'o', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ -CONST SEGMENT -??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ DB 'java/lang/Boolean', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ -CONST SEGMENT -??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ DB 'java/lang/Integer', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0BB@LLFN@java?1lang?1String?$AA@ -CONST SEGMENT -??_C@_0BB@LLFN@java?1lang?1String?$AA@ DB 'java/lang/String', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_02LOEJ@?$FLB?$AA@ -CONST SEGMENT -??_C@_02LOEJ@?$FLB?$AA@ DB '[B', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_02BENO@?$FLC?$AA@ -CONST SEGMENT -??_C@_02BENO@?$FLC?$AA@ DB '[C', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_03KJOK@?$CI?$CJZ?$AA@ -CONST SEGMENT -??_C@_03KJOK@?$CI?$CJZ?$AA@ DB '()Z', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_0N@KEBP@booleanValue?$AA@ -CONST SEGMENT -??_C@_0N@KEBP@booleanValue?$AA@ DB 'booleanValue', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_03PPCD@?$CI?$CJI?$AA@ -CONST SEGMENT -??_C@_03PPCD@?$CI?$CJI?$AA@ DB '()I', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_08JCMA@intValue?$AA@ -CONST SEGMENT -??_C@_08JCMA@intValue?$AA@ DB 'intValue', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_04ECLF@?$CII?$CJV?$AA@ -CONST SEGMENT -??_C@_04ECLF@?$CII?$CJV?$AA@ DB '(I)V', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_06KILP@?$DMinit?$DO?$AA@ -CONST SEGMENT -??_C@_06KILP@?$DMinit?$DO?$AA@ DB '', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_04JFOE@?$CIZ?$CJV?$AA@ -CONST SEGMENT -??_C@_04JFOE@?$CIZ?$CJV?$AA@ DB '(Z)V', 00H ; `string' -CONST ENDS -; COMDAT _Java_com_eaio_nativecall_NativeCall_initIDs@8 -_TEXT SEGMENT -_env$ = 8 -_cls$ = 12 -_Java_com_eaio_nativecall_NativeCall_initIDs@8 PROC NEAR ; COMDAT - -; 71 : (JNIEnv *env, jclass cls) { - - push ebp - mov ebp, esp - sub esp, 64 ; 00000040H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-64] - mov ecx, 16 ; 00000010H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 72 : -; 73 : // NativeCall fields -; 74 : -; 75 : fieldFunction = env->GetFieldID(cls, "function", "Ljava/lang/String;"); - - push OFFSET FLAT:??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ ; `string' - push OFFSET FLAT:??_C@_08JJOG@function?$AA@ ; `string' - mov eax, DWORD PTR _cls$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID - mov DWORD PTR ?fieldFunction@@3PAU_jfieldID@@A, eax ; fieldFunction - -; 76 : fieldModule = env->GetFieldID(cls, "module", "Ljava/lang/String;"); - - push OFFSET FLAT:??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ ; `string' - push OFFSET FLAT:??_C@_06CODG@module?$AA@ ; `string' - mov ecx, DWORD PTR _cls$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID - mov DWORD PTR ?fieldModule@@3PAU_jfieldID@@A, eax ; fieldModule - -; 77 : -; 78 : fieldFunctionHandle = env->GetFieldID(cls, "functionHandle", "I"); - - push OFFSET FLAT:??_C@_01FLOP@I?$AA@ ; `string' - push OFFSET FLAT:??_C@_0P@LKIL@functionHandle?$AA@ ; `string' - mov edx, DWORD PTR _cls$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID - mov DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A, eax ; fieldFunctionHandle - -; 79 : fieldModuleHandle = env-> GetFieldID(cls, "moduleHandle", "I"); - - push OFFSET FLAT:??_C@_01FLOP@I?$AA@ ; `string' - push OFFSET FLAT:??_C@_0N@EFAA@moduleHandle?$AA@ ; `string' - mov eax, DWORD PTR _cls$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID - mov DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A, eax ; fieldModuleHandle - -; 80 : -; 81 : fieldLastErrorCode = env->GetFieldID(cls, "lastErrorCode", "I"); - - push OFFSET FLAT:??_C@_01FLOP@I?$AA@ ; `string' - push OFFSET FLAT:??_C@_0O@OMHL@lastErrorCode?$AA@ ; `string' - mov ecx, DWORD PTR _cls$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID - mov DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A, eax ; fieldLastErrorCode - -; 82 : -; 83 : // Holder fields -; 84 : -; 85 : classHolder = (jclass) env->NewGlobalRef(env->FindClass("com/eaio/nativecall/Holder")); - - push OFFSET FLAT:??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef - mov DWORD PTR ?classHolder@@3PAV_jclass@@A, eax ; classHolder - -; 86 : fieldHolderO = env->GetFieldID(classHolder, "o", "Ljava/lang/Object;"); - - push OFFSET FLAT:??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ ; `string' - push OFFSET FLAT:??_C@_01PGHN@o?$AA@ ; `string' - mov edx, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetFieldID - mov DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A, eax ; fieldHolderO - -; 87 : -; 88 : // Other classes -; 89 : -; 90 : classBoolean = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Boolean")); - - push OFFSET FLAT:??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef - mov DWORD PTR ?classBoolean@@3PAV_jclass@@A, eax ; classBoolean - -; 91 : /*classByte = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Byte")); -; 92 : classCharacter = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Character")); -; 93 : classShort = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Short"));*/ -; 94 : classInteger = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Integer")); - - push OFFSET FLAT:??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef - mov DWORD PTR ?classInteger@@3PAV_jclass@@A, eax ; classInteger - -; 95 : /*classLong = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Long")); -; 96 : classFloat = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Float")); -; 97 : classDouble = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Double"));*/ -; 98 : classString = (jclass) env->NewGlobalRef(env->FindClass("java/lang/String")); - - push OFFSET FLAT:??_C@_0BB@LLFN@java?1lang?1String?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef - mov DWORD PTR ?classString@@3PAV_jclass@@A, eax ; classString - -; 99 : classByteArray = (jclass) env->NewGlobalRef(env->FindClass("[B")); - - push OFFSET FLAT:??_C@_02LOEJ@?$FLB?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef - mov DWORD PTR ?classByteArray@@3PAV_jclass@@A, eax ; classByteArray - -; 100 : classCharArray = (jclass) env->NewGlobalRef(env->FindClass("[C")); - - push OFFSET FLAT:??_C@_02BENO@?$FLC?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ; JNIEnv_::NewGlobalRef - mov DWORD PTR ?classCharArray@@3PAV_jclass@@A, eax ; classCharArray - -; 101 : /*classIntArray = (jclass) env->NewGlobalRef(env->FindClass("[I"));*/ -; 102 : -; 103 : // Wrapper class methods -; 104 : -; 105 : methodBooleanValue = env->GetMethodID(classBoolean, -; 106 : "booleanValue", "()Z"); - - push OFFSET FLAT:??_C@_03KJOK@?$CI?$CJZ?$AA@ ; `string' - push OFFSET FLAT:??_C@_0N@KEBP@booleanValue?$AA@ ; `string' - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetMethodID - mov DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A, eax ; methodBooleanValue - -; 107 : /*methodByteValue = env->GetMethodID(classByte, -; 108 : "byteValue", "()B"); -; 109 : methodCharValue = env->GetMethodID(classCharacter, -; 110 : "charValue", "()C"); -; 111 : methodShortValue = env->GetMethodID(classShort, -; 112 : "shortValue", "()S");*/ -; 113 : methodIntValue = env->GetMethodID(classInteger, -; 114 : "intValue", "()I"); - - push OFFSET FLAT:??_C@_03PPCD@?$CI?$CJI?$AA@ ; `string' - push OFFSET FLAT:??_C@_08JCMA@intValue?$AA@ ; `string' - mov ecx, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetMethodID - mov DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A, eax ; methodIntValue - -; 115 : /*methodLongValue = env->GetMethodID(classLong, -; 116 : "longValue", "()J"); -; 117 : methodFloatValue = env->GetMethodID(classFloat, -; 118 : "floatValue", "()F"); -; 119 : methodDoubleValue = env->GetMethodID(classDouble, -; 120 : "doubleValue", "()D");*/ -; 121 : -; 122 : // Constructors -; 123 : -; 124 : newIntegerInt = env->GetMethodID(classInteger, "", "(I)V"); - - push OFFSET FLAT:??_C@_04ECLF@?$CII?$CJV?$AA@ ; `string' - push OFFSET FLAT:??_C@_06KILP@?$DMinit?$DO?$AA@ ; `string' - mov edx, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetMethodID - mov DWORD PTR ?newIntegerInt@@3PAU_jmethodID@@A, eax ; newIntegerInt - -; 125 : newBooleanBoolean = env->GetMethodID(classBoolean, "", "(Z)V"); - - push OFFSET FLAT:??_C@_04JFOE@?$CIZ?$CJV?$AA@ ; `string' - push OFFSET FLAT:??_C@_06KILP@?$DMinit?$DO?$AA@ ; `string' - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z ; JNIEnv_::GetMethodID - mov DWORD PTR ?newBooleanBoolean@@3PAU_jmethodID@@A, eax ; newBooleanBoolean - -; 126 : -; 127 : } - - pop edi - pop esi - pop ebx - add esp, 64 ; 00000040H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -_Java_com_eaio_nativecall_NativeCall_initIDs@8 ENDP -_TEXT ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_name$ = 8 -?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z PROC NEAR ; JNIEnv_::FindClass, COMDAT - -; 759 : jclass FindClass(const char *name) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 760 : return functions->FindClass(this, name); - - mov esi, esp - mov eax, DWORD PTR _name$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+24] - cmp esi, esp - call __chkesp - -; 761 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ENDP ; JNIEnv_::FindClass -_TEXT ENDS -PUBLIC ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField -PUBLIC ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -PUBLIC _Java_com_eaio_nativecall_NativeCall_initHandles@8 -PUBLIC ?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z ; JNIEnv_::GetStringUTFChars -PUBLIC ?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z ; JNIEnv_::ReleaseStringUTFChars -EXTRN __imp__LoadLibraryA@4:NEAR -EXTRN __imp__GetLastError@0:NEAR -EXTRN __imp__FreeLibrary@4:NEAR -EXTRN __imp__GetProcAddress@8:NEAR -; COMDAT _Java_com_eaio_nativecall_NativeCall_initHandles@8 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_out$ = -4 -_moduleNameS$ = -8 -_functionNameS$ = -12 -_moduleName$ = -16 -_functionName$ = -20 -_mod$ = -24 -_addr$56841 = -28 -_Java_com_eaio_nativecall_NativeCall_initHandles@8 PROC NEAR ; COMDAT - -; 135 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - sub esp, 92 ; 0000005cH - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-92] - mov ecx, 23 ; 00000017H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 136 : -; 137 : bool out = JNI_TRUE; - - mov BYTE PTR _out$[ebp], 1 - -; 138 : -; 139 : jstring moduleNameS = (jstring) env->GetObjectField(obj, fieldModule); - - mov eax, DWORD PTR ?fieldModule@@3PAU_jfieldID@@A ; fieldModule - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField - mov DWORD PTR _moduleNameS$[ebp], eax - -; 140 : jstring functionNameS = (jstring) env->GetObjectField(obj, fieldFunction); - - mov edx, DWORD PTR ?fieldFunction@@3PAU_jfieldID@@A ; fieldFunction - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField - mov DWORD PTR _functionNameS$[ebp], eax - -; 141 : -; 142 : const char* moduleName = env->GetStringUTFChars(moduleNameS, 0); - - push 0 - mov ecx, DWORD PTR _moduleNameS$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z ; JNIEnv_::GetStringUTFChars - mov DWORD PTR _moduleName$[ebp], eax - -; 143 : const char* functionName = env->GetStringUTFChars(functionNameS, 0); - - push 0 - mov edx, DWORD PTR _functionNameS$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z ; JNIEnv_::GetStringUTFChars - mov DWORD PTR _functionName$[ebp], eax - -; 144 : -; 145 : #ifdef _WINDOWS -; 146 : -; 147 : HMODULE mod = LoadLibrary(moduleName); - - mov esi, esp - mov eax, DWORD PTR _moduleName$[ebp] - push eax - call DWORD PTR __imp__LoadLibraryA@4 - cmp esi, esp - call __chkesp - mov DWORD PTR _mod$[ebp], eax - -; 148 : -; 149 : if (mod == NULL) { - - cmp DWORD PTR _mod$[ebp], 0 - jne SHORT $L56839 - -; 150 : /* no such module or DllMain returned FALSE */ -; 151 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov ecx, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 152 : out = JNI_FALSE; - - mov BYTE PTR _out$[ebp], 0 - -; 154 : else { - - jmp $L56843 -$L56839: - -; 155 : FARPROC addr = GetProcAddress(mod, functionName); - - mov esi, esp - mov eax, DWORD PTR _functionName$[ebp] - push eax - mov ecx, DWORD PTR _mod$[ebp] - push ecx - call DWORD PTR __imp__GetProcAddress@8 - cmp esi, esp - call __chkesp - mov DWORD PTR _addr$56841[ebp], eax - -; 156 : if (addr == NULL) { - - cmp DWORD PTR _addr$56841[ebp], 0 - jne SHORT $L56842 - -; 157 : /* function not found */ -; 158 : FreeLibrary(mod); - - mov esi, esp - mov edx, DWORD PTR _mod$[ebp] - push edx - call DWORD PTR __imp__FreeLibrary@4 - cmp esi, esp - call __chkesp - -; 159 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov eax, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 160 : out = JNI_FALSE; - - mov BYTE PTR _out$[ebp], 0 - -; 162 : else { - - jmp SHORT $L56843 -$L56842: - -; 163 : /* all ok */ -; 164 : env->SetIntField(obj, fieldModuleHandle, (jint) mod); - - mov edx, DWORD PTR _mod$[ebp] - push edx - mov eax, DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 165 : env->SetIntField(obj, fieldFunctionHandle, (jint) addr); - - mov edx, DWORD PTR _addr$56841[ebp] - push edx - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -$L56843: - -; 168 : -; 169 : #endif -; 170 : -; 171 : env->ReleaseStringUTFChars(moduleNameS, moduleName); - - mov edx, DWORD PTR _moduleName$[ebp] - push edx - mov eax, DWORD PTR _moduleNameS$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z ; JNIEnv_::ReleaseStringUTFChars - -; 172 : env->ReleaseStringUTFChars(functionNameS, functionName); - - mov ecx, DWORD PTR _functionName$[ebp] - push ecx - mov edx, DWORD PTR _functionNameS$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z ; JNIEnv_::ReleaseStringUTFChars - -; 173 : -; 174 : return out; - - mov al, BYTE PTR _out$[ebp] - -; 175 : -; 176 : } - - pop edi - pop esi - pop ebx - add esp, 92 ; 0000005cH - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -_Java_com_eaio_nativecall_NativeCall_initHandles@8 ENDP -_TEXT ENDS -PUBLIC ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField -PUBLIC _Java_com_eaio_nativecall_NativeCall_getLastError@8 -PUBLIC ?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z ; JNIEnv_::NewStringUTF -EXTRN __imp__FormatMessageA@28:NEAR -EXTRN __imp__LocalFree@4:NEAR -; COMDAT _Java_com_eaio_nativecall_NativeCall_getLastError@8 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_lastError$ = -4 -_out$ = -8 -_msgBufPtr$ = -12 -_Java_com_eaio_nativecall_NativeCall_getLastError@8 PROC NEAR ; COMDAT - -; 184 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - sub esp, 76 ; 0000004cH - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-76] - mov ecx, 19 ; 00000013H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 185 : -; 186 : jint lastError = env->GetIntField(obj, fieldLastErrorCode); - - mov eax, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField - mov DWORD PTR _lastError$[ebp], eax - -; 187 : -; 188 : if (lastError == 0) return NULL; - - cmp DWORD PTR _lastError$[ebp], 0 - jne SHORT $L56851 - xor eax, eax - jmp SHORT $L56849 -$L56851: - -; 189 : -; 190 : jstring out = NULL; - - mov DWORD PTR _out$[ebp], 0 - -; 191 : -; 192 : #ifdef _WINDOWS -; 193 : -; 194 : LPVOID msgBufPtr = NULL; - - mov DWORD PTR _msgBufPtr$[ebp], 0 - -; 195 : FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | -; 196 : FORMAT_MESSAGE_FROM_SYSTEM, NULL, lastError, 0, -; 197 : (LPSTR) &msgBufPtr, 0, NULL); - - mov esi, esp - push 0 - push 0 - lea edx, DWORD PTR _msgBufPtr$[ebp] - push edx - push 0 - mov eax, DWORD PTR _lastError$[ebp] - push eax - push 0 - push 4352 ; 00001100H - call DWORD PTR __imp__FormatMessageA@28 - cmp esi, esp - call __chkesp - -; 198 : -; 199 : out = env->NewStringUTF((char*) msgBufPtr); - - mov ecx, DWORD PTR _msgBufPtr$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z ; JNIEnv_::NewStringUTF - mov DWORD PTR _out$[ebp], eax - -; 200 : -; 201 : LocalFree(msgBufPtr); - - mov esi, esp - mov edx, DWORD PTR _msgBufPtr$[ebp] - push edx - call DWORD PTR __imp__LocalFree@4 - cmp esi, esp - call __chkesp - -; 202 : -; 203 : #endif -; 204 : -; 205 : return out; - - mov eax, DWORD PTR _out$[ebp] -$L56849: - -; 206 : -; 207 : } - - pop edi - pop esi - pop ebx - add esp, 76 ; 0000004cH - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -_Java_com_eaio_nativecall_NativeCall_getLastError@8 ENDP -_TEXT ENDS -PUBLIC _Java_com_eaio_nativecall_NativeCall_destroy@8 -; COMDAT _Java_com_eaio_nativecall_NativeCall_destroy@8 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_module$ = -4 -_Java_com_eaio_nativecall_NativeCall_destroy@8 PROC NEAR ; COMDAT - -; 215 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 216 : -; 217 : jint module = env->GetIntField(obj, fieldModuleHandle); - - mov eax, DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField - mov DWORD PTR _module$[ebp], eax - -; 218 : -; 219 : if (module == 0) return; - - cmp DWORD PTR _module$[ebp], 0 - jne SHORT $L56861 - jmp SHORT $L56859 -$L56861: - -; 220 : -; 221 : #ifdef _WINDOWS -; 222 : -; 223 : if (FreeLibrary((HMODULE) module) == 0) { - - mov esi, esp - mov edx, DWORD PTR _module$[ebp] - push edx - call DWORD PTR __imp__FreeLibrary@4 - cmp esi, esp - call __chkesp - test eax, eax - jne SHORT $L56863 - -; 224 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov eax, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -$L56863: - -; 226 : -; 227 : #endif -; 228 : -; 229 : env->SetIntField(obj, fieldModuleHandle, 0); - - push 0 - mov edx, DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 230 : env->SetIntField(obj, fieldFunctionHandle, 0); - - push 0 - mov ecx, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -$L56859: - -; 231 : -; 232 : return; -; 233 : -; 234 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -_Java_com_eaio_nativecall_NativeCall_destroy@8 ENDP -_TEXT ENDS -; COMDAT ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z -_TEXT SEGMENT -_this$ = -4 -_lobj$ = 8 -?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z PROC NEAR ; JNIEnv_::NewGlobalRef, COMDAT - -; 810 : jobject NewGlobalRef(jobject lobj) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 811 : return functions->NewGlobalRef(this,lobj); - - mov esi, esp - mov eax, DWORD PTR _lobj$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+84] - cmp esi, esp - call __chkesp - -; 812 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z ENDP ; JNIEnv_::NewGlobalRef -_TEXT ENDS -; COMDAT ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z -_TEXT SEGMENT -_this$ = -4 -_clazz$ = 8 -_name$ = 12 -_sig$ = 16 -?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z PROC NEAR ; JNIEnv_::GetMethodID, COMDAT - -; 859 : const char *sig) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 860 : return functions->GetMethodID(this,clazz,name,sig); - - mov esi, esp - mov eax, DWORD PTR _sig$[ebp] - push eax - mov ecx, DWORD PTR _name$[ebp] - push ecx - mov edx, DWORD PTR _clazz$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+132] - cmp esi, esp - call __chkesp - -; 861 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z ENDP ; JNIEnv_::GetMethodID -_TEXT ENDS -; COMDAT ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z -_TEXT SEGMENT -_clazz$ = 8 -_name$ = 12 -_sig$ = 16 -_this$ = -4 -?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z PROC NEAR ; JNIEnv_::GetFieldID, COMDAT - -; 1244 : const char *sig) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1245 : return functions->GetFieldID(this,clazz,name,sig); - - mov esi, esp - mov eax, DWORD PTR _sig$[ebp] - push eax - mov ecx, DWORD PTR _name$[ebp] - push ecx - mov edx, DWORD PTR _clazz$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+376] - cmp esi, esp - call __chkesp - -; 1246 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z ENDP ; JNIEnv_::GetFieldID -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_this$ = -4 -?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z PROC NEAR ; JNIEnv_::GetObjectField, COMDAT - -; 1248 : jobject GetObjectField(jobject obj, jfieldID fieldID) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1249 : return functions->GetObjectField(this,obj,fieldID); - - mov esi, esp - mov eax, DWORD PTR _fieldID$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+380] - cmp esi, esp - call __chkesp - -; 1250 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ENDP ; JNIEnv_::GetObjectField -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_this$ = -4 -?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z PROC NEAR ; JNIEnv_::GetIntField, COMDAT - -; 1263 : jint GetIntField(jobject obj, jfieldID fieldID) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1264 : return functions->GetIntField(this,obj,fieldID); - - mov esi, esp - mov eax, DWORD PTR _fieldID$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+400] - cmp esi, esp - call __chkesp - -; 1265 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ENDP ; JNIEnv_::GetIntField -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_val$ = 16 -_this$ = -4 -?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z PROC NEAR ; JNIEnv_::SetIntField, COMDAT - -; 1296 : jint val) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1297 : functions->SetIntField(this,obj,fieldID,val); - - mov esi, esp - mov eax, DWORD PTR _val$[ebp] - push eax - mov ecx, DWORD PTR _fieldID$[ebp] - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+436] - cmp esi, esp - call __chkesp - -; 1298 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ENDP ; JNIEnv_::SetIntField -_TEXT ENDS -; COMDAT ?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_utf$ = 8 -?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z PROC NEAR ; JNIEnv_::NewStringUTF, COMDAT - -; 1576 : jstring NewStringUTF(const char *utf) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1577 : return functions->NewStringUTF(this,utf); - - mov esi, esp - mov eax, DWORD PTR _utf$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+668] - cmp esi, esp - call __chkesp - -; 1578 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z ENDP ; JNIEnv_::NewStringUTF -_TEXT ENDS -; COMDAT ?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z -_TEXT SEGMENT -_this$ = -4 -_str$ = 8 -_isCopy$ = 12 -?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z PROC NEAR ; JNIEnv_::GetStringUTFChars, COMDAT - -; 1582 : const char* GetStringUTFChars(jstring str, jboolean *isCopy) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1583 : return functions->GetStringUTFChars(this,str,isCopy); - - mov esi, esp - mov eax, DWORD PTR _isCopy$[ebp] - push eax - mov ecx, DWORD PTR _str$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+676] - cmp esi, esp - call __chkesp - -; 1584 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z ENDP ; JNIEnv_::GetStringUTFChars -_TEXT ENDS -; COMDAT ?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_str$ = 8 -_chars$ = 12 -?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z PROC NEAR ; JNIEnv_::ReleaseStringUTFChars, COMDAT - -; 1585 : void ReleaseStringUTFChars(jstring str, const char* chars) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1586 : functions->ReleaseStringUTFChars(this,str,chars); - - mov esi, esp - mov eax, DWORD PTR _chars$[ebp] - push eax - mov ecx, DWORD PTR _str$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+680] - cmp esi, esp - call __chkesp - -; 1587 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z ENDP ; JNIEnv_::ReleaseStringUTFChars -_TEXT ENDS -END diff --git a/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.dll b/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.dll deleted file mode 100644 index fa9a51b..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.dll and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.obj b/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.obj deleted file mode 100644 index 670355f..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/NativeCall.obj and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/RCa01372 b/vendor/nativecall/0.4.1/cpp/Debug/RCa01372 deleted file mode 100644 index eb8e4b1..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/RCa01372 and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/RCa01444 b/vendor/nativecall/0.4.1/cpp/Debug/RCa01444 deleted file mode 100644 index eb8e4b1..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/RCa01444 and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/RCa01468 b/vendor/nativecall/0.4.1/cpp/Debug/RCa01468 deleted file mode 100644 index eb8e4b1..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/RCa01468 and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Debug/VoidCall.asm b/vendor/nativecall/0.4.1/cpp/Debug/VoidCall.asm deleted file mode 100644 index c64965e..0000000 --- a/vendor/nativecall/0.4.1/cpp/Debug/VoidCall.asm +++ /dev/null @@ -1,1743 +0,0 @@ - TITLE C:\Documents and Settings\Administrator\My Documents\Software\NativeCall\src\cpp\VoidCall.cpp - .386P -include listing.inc -if @Version gt 510 -.model FLAT -else -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' -_BSS ENDS -$$SYMBOLS SEGMENT BYTE USE32 'DEBSYM' -$$SYMBOLS ENDS -$$TYPES SEGMENT BYTE USE32 'DEBTYP' -$$TYPES ENDS -_TLS SEGMENT DWORD USE32 PUBLIC 'TLS' -_TLS ENDS -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ??8@YAHABU_GUID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_VoidCall_executeCall@8 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT _Java_com_eaio_nativecall_VoidCall_executeCall0@12 -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -FLAT GROUP _DATA, CONST, _BSS - ASSUME CS: FLAT, DS: FLAT, SS: FLAT -endif -PUBLIC ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField -PUBLIC ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -PUBLIC _Java_com_eaio_nativecall_VoidCall_executeCall@8 -EXTRN __imp__GetLastError@0:NEAR -EXTRN ?fieldFunctionHandle@@3PAU_jfieldID@@A:DWORD ; fieldFunctionHandle -EXTRN ?fieldLastErrorCode@@3PAU_jfieldID@@A:DWORD ; fieldLastErrorCode -EXTRN __chkesp:NEAR -; COMDAT _Java_com_eaio_nativecall_VoidCall_executeCall@8 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_functionHandle$ = -4 -_Java_com_eaio_nativecall_VoidCall_executeCall@8 PROC NEAR ; COMDAT - -; 79 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 80 : -; 81 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField - mov DWORD PTR _functionHandle$[ebp], eax - -; 82 : -; 83 : #ifdef _WINDOWS -; 84 : #ifdef _X86_ -; 85 : -; 86 : __asm { -; 87 : -; 88 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 89 : -; 90 : } -; 91 : -; 92 : #endif -; 93 : #endif -; 94 : -; 95 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov edx, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField - -; 96 : -; 97 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -_Java_com_eaio_nativecall_VoidCall_executeCall@8 ENDP -_TEXT ENDS -PUBLIC ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField -PUBLIC ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ; JNIEnv_::SetObjectField -PUBLIC _Java_com_eaio_nativecall_VoidCall_executeCall0@12 -PUBLIC ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z ; JNIEnv_::GetArrayLength -PUBLIC ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ; JNIEnv_::GetObjectArrayElement -PUBLIC ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' -PUBLIC ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical -PUBLIC ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ; JNIEnv_::ReleasePrimitiveArrayCritical -PUBLIC ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass -PUBLIC ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z ; JNIEnv_::ThrowNew -PUBLIC ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject -PUBLIC ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf -PUBLIC ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod -PUBLIC ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod -EXTRN ??2@YAPAXI@Z:NEAR ; operator new -EXTRN ??3@YAXPAX@Z:NEAR ; operator delete -EXTRN ?fieldHolderO@@3PAU_jfieldID@@A:DWORD ; fieldHolderO -EXTRN ?classBoolean@@3PAV_jclass@@A:DWORD ; classBoolean -EXTRN ?classInteger@@3PAV_jclass@@A:DWORD ; classInteger -EXTRN ?classByteArray@@3PAV_jclass@@A:DWORD ; classByteArray -EXTRN ?classCharArray@@3PAV_jclass@@A:DWORD ; classCharArray -EXTRN ?classHolder@@3PAV_jclass@@A:DWORD ; classHolder -EXTRN ?methodBooleanValue@@3PAU_jmethodID@@A:DWORD ; methodBooleanValue -EXTRN ?methodIntValue@@3PAU_jmethodID@@A:DWORD ; methodIntValue -EXTRN ?newIntegerInt@@3PAU_jmethodID@@A:DWORD ; newIntegerInt -EXTRN ?newBooleanBoolean@@3PAU_jmethodID@@A:DWORD ; newBooleanBoolean -EXTRN _memset:NEAR -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -; File c:\documents and settings\administrator\my documents\software\nativecall\src\cpp\voidcall.cpp -CONST SEGMENT -??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ DB 'java/lang/OutOfMemor' - DB 'yError', 00H ; `string' -CONST ENDS -; COMDAT _Java_com_eaio_nativecall_VoidCall_executeCall0@12 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_params$ = 16 -_len$ = -4 -_arrays$ = -8 -_param$ = -12 -_i$ = -16 -_intArg$56816 = -20 -_byteArrayArg$56819 = -24 -_charArrayArg$56825 = -28 -_booleanArg$56831 = -32 -_tempArg$56832 = -36 -_o$56835 = -40 -_intPtr$56837 = -44 -_byteArrayArg$56843 = -48 -_charArrayArg$56849 = -52 -_booleanArg$56855 = -56 -_tempPtr$56856 = -60 -_functionHandle$ = -64 -_j$ = -68 -_o$56873 = -72 -_out$56875 = -76 -_out$56885 = -80 -$T56914 = -84 -$T56915 = -88 -$T56916 = -92 -$T56917 = -96 -$T56918 = -100 -$T56919 = -104 -_Java_com_eaio_nativecall_VoidCall_executeCall0@12 PROC NEAR ; COMDAT - -; 105 : (JNIEnv *env, jobject obj, jobjectArray params) { - - push ebp - mov ebp, esp - sub esp, 168 ; 000000a8H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-168] - mov ecx, 42 ; 0000002aH - mov eax, -858993460 ; ccccccccH - rep stosd - -; 106 : -; 107 : const int len = env->GetArrayLength(params); - - mov eax, DWORD PTR _params$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z ; JNIEnv_::GetArrayLength - mov DWORD PTR _len$[ebp], eax - -; 108 : -; 109 : int* arrays = NULL; - - mov DWORD PTR _arrays$[ebp], 0 - -; 110 : if (!(arrays = new int[len])) { - - mov ecx, DWORD PTR _len$[ebp] - shl ecx, 2 - push ecx - call ??2@YAPAXI@Z ; operator new - add esp, 4 - mov DWORD PTR $T56914[ebp], eax - mov edx, DWORD PTR $T56914[ebp] - mov DWORD PTR _arrays$[ebp], edx - cmp DWORD PTR _arrays$[ebp], 0 - jne SHORT $L56805 - -; 111 : env->ThrowNew(env->FindClass("java/lang/OutOfMemoryError"), NULL); - - push 0 - push OFFSET FLAT:??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' - mov ecx, DWORD PTR _env$[ebp] - call ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ; JNIEnv_::FindClass - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z ; JNIEnv_::ThrowNew - -; 112 : return; - - jmp $L56800 -$L56805: - -; 114 : memset(arrays, 0, (sizeof(int) * len)); - - mov eax, DWORD PTR _len$[ebp] - shl eax, 2 - push eax - push 0 - mov ecx, DWORD PTR _arrays$[ebp] - push ecx - call _memset - add esp, 12 ; 0000000cH - -; 115 : -; 116 : jobject param; -; 117 : -; 118 : for (int i = len - 1; i >= 0; i--) { - - mov edx, DWORD PTR _len$[ebp] - sub edx, 1 - mov DWORD PTR _i$[ebp], edx - jmp SHORT $L56810 -$L56811: - mov eax, DWORD PTR _i$[ebp] - sub eax, 1 - mov DWORD PTR _i$[ebp], eax -$L56810: - cmp DWORD PTR _i$[ebp], 0 - jl $L56812 - -; 119 : -; 120 : param = env->GetObjectArrayElement(params, i); - - mov ecx, DWORD PTR _i$[ebp] - push ecx - mov edx, DWORD PTR _params$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ; JNIEnv_::GetObjectArrayElement - mov DWORD PTR _param$[ebp], eax - -; 121 : -; 122 : if (param == NULL) { - - cmp DWORD PTR _param$[ebp], 0 - jne SHORT $L56813 - -; 123 : _push(0); - - push 0 - -; 125 : else if (env->IsInstanceOf(param, classInteger)) { - - jmp $L56854 -$L56813: - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56815 - -; 126 : int intArg = env->CallIntMethod(param, methodIntValue); - - mov edx, DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - push ecx - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - add esp, 12 ; 0000000cH - mov DWORD PTR _intArg$56816[ebp], eax - -; 127 : _push(intArg) - - push DWORD PTR _intArg$56816[ebp] - -; 129 : else if (env->IsInstanceOf(param, classByteArray)) { - - jmp $L56854 -$L56815: - mov edx, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56818 - -; 130 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) param, 0); - - push 0 - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _byteArrayArg$56819[ebp], eax - -; 131 : arrays[i] = (int) &byteArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _byteArrayArg$56819[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 132 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$56819[ebp] - -; 134 : else if (env->IsInstanceOf(param, classCharArray)) { - - jmp $L56854 -$L56818: - mov edx, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56824 - -; 135 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 136 : (jarray) param, 0); - - push 0 - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _charArrayArg$56825[ebp], eax - -; 137 : arrays[i] = (int) &charArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _charArrayArg$56825[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 138 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$56825[ebp] - -; 140 : else if (env->IsInstanceOf(param, classBoolean)) { - - jmp $L56854 -$L56824: - mov edx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56830 - -; 141 : jboolean booleanArg = env->CallBooleanMethod(param, methodBooleanValue); - - mov ecx, DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov eax, DWORD PTR _env$[ebp] - push eax - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - add esp, 12 ; 0000000cH - mov BYTE PTR _booleanArg$56831[ebp], al - -; 142 : int tempArg = (booleanArg == JNI_FALSE ? 0 : 1); - - mov ecx, DWORD PTR _booleanArg$56831[ebp] - and ecx, 255 ; 000000ffH - neg ecx - sbb ecx, ecx - neg ecx - mov DWORD PTR _tempArg$56832[ebp], ecx - -; 143 : _push(tempArg) - - push DWORD PTR _tempArg$56832[ebp] - -; 145 : else if (env->IsInstanceOf(param, classHolder)) { - - jmp $L56854 -$L56830: - mov edx, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je $L56854 - -; 146 : -; 147 : /* Holder */ -; 148 : -; 149 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov ecx, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField - mov DWORD PTR _o$56835[ebp], eax - -; 150 : -; 151 : if (env->IsInstanceOf(o, classInteger)) { - - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - mov ecx, DWORD PTR _o$56835[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56836 - -; 152 : int *intPtr = new int; - - push 4 - call ??2@YAPAXI@Z ; operator new - add esp, 4 - mov DWORD PTR $T56915[ebp], eax - mov edx, DWORD PTR $T56915[ebp] - mov DWORD PTR _intPtr$56837[ebp], edx - -; 153 : *intPtr = env->CallIntMethod(o, methodIntValue); - - mov eax, DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push eax - mov ecx, DWORD PTR _o$56835[ebp] - push ecx - mov edx, DWORD PTR _env$[ebp] - push edx - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - add esp, 12 ; 0000000cH - mov ecx, DWORD PTR _intPtr$56837[ebp] - mov DWORD PTR [ecx], eax - -; 154 : arrays[i] = (int) intPtr; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - mov ecx, DWORD PTR _intPtr$56837[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 155 : _push(intPtr); - - push DWORD PTR _intPtr$56837[ebp] - -; 157 : else if (env->IsInstanceOf(o, classByteArray)) { - - jmp $L56854 -$L56836: - mov edx, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push edx - mov eax, DWORD PTR _o$56835[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56842 - -; 158 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) o, 0); - - push 0 - mov ecx, DWORD PTR _o$56835[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _byteArrayArg$56843[ebp], eax - -; 159 : arrays[i] = (int) &byteArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _byteArrayArg$56843[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 160 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$56843[ebp] - -; 162 : else if (env->IsInstanceOf(o, classCharArray)) { - - jmp $L56854 -$L56842: - mov edx, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push edx - mov eax, DWORD PTR _o$56835[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56848 - -; 163 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 164 : (jarray) o, 0); - - push 0 - mov ecx, DWORD PTR _o$56835[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ; JNIEnv_::GetPrimitiveArrayCritical - mov DWORD PTR _charArrayArg$56849[ebp], eax - -; 165 : arrays[i] = (int) &charArrayArg; - - mov edx, DWORD PTR _i$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - lea ecx, DWORD PTR _charArrayArg$56849[ebp] - mov DWORD PTR [eax+edx*4], ecx - -; 166 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$56849[ebp] - -; 168 : else if (env->IsInstanceOf(o, classBoolean)) { - - jmp SHORT $L56854 -$L56848: - mov edx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push edx - mov eax, DWORD PTR _o$56835[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56854 - -; 169 : jboolean booleanArg = env->CallBooleanMethod(o, methodBooleanValue); - - mov ecx, DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ecx - mov edx, DWORD PTR _o$56835[ebp] - push edx - mov eax, DWORD PTR _env$[ebp] - push eax - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - add esp, 12 ; 0000000cH - mov BYTE PTR _booleanArg$56855[ebp], al - -; 170 : int *tempPtr = new int; - - push 4 - call ??2@YAPAXI@Z ; operator new - add esp, 4 - mov DWORD PTR $T56916[ebp], eax - mov ecx, DWORD PTR $T56916[ebp] - mov DWORD PTR _tempPtr$56856[ebp], ecx - -; 171 : *tempPtr = (booleanArg == JNI_FALSE ? 0 : 1); - - mov edx, DWORD PTR _booleanArg$56855[ebp] - and edx, 255 ; 000000ffH - neg edx - sbb edx, edx - neg edx - mov eax, DWORD PTR _tempPtr$56856[ebp] - mov DWORD PTR [eax], edx - -; 172 : arrays[i] = (int) tempPtr; - - mov ecx, DWORD PTR _i$[ebp] - mov edx, DWORD PTR _arrays$[ebp] - mov eax, DWORD PTR _tempPtr$56856[ebp] - mov DWORD PTR [edx+ecx*4], eax - -; 173 : _push(tempPtr); - - push DWORD PTR _tempPtr$56856[ebp] -$L56854: - -; 179 : -; 180 : } - - jmp $L56811 -$L56812: - -; 181 : -; 182 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov ecx, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ; JNIEnv_::GetIntField - mov DWORD PTR _functionHandle$[ebp], eax - -; 183 : -; 184 : #ifdef _WINDOWS -; 185 : #ifdef _X86_ -; 186 : -; 187 : __asm { -; 188 : -; 189 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 190 : -; 191 : } -; 192 : -; 193 : #endif -; 194 : #endif -; 195 : -; 196 : for (int j = 0; j < len; ++j) { - - mov DWORD PTR _j$[ebp], 0 - jmp SHORT $L56862 -$L56863: - mov eax, DWORD PTR _j$[ebp] - add eax, 1 - mov DWORD PTR _j$[ebp], eax -$L56862: - mov ecx, DWORD PTR _j$[ebp] - cmp ecx, DWORD PTR _len$[ebp] - jge $L56864 - -; 197 : param = env->GetObjectArrayElement(params, j); - - mov edx, DWORD PTR _j$[ebp] - push edx - mov eax, DWORD PTR _params$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ; JNIEnv_::GetObjectArrayElement - mov DWORD PTR _param$[ebp], eax - -; 198 : if (param == NULL) {} - - cmp DWORD PTR _param$[ebp], 0 - jne SHORT $L56865 - -; 199 : else if (env->IsInstanceOf(param, classByteArray) || env->IsInstanceOf(param, classCharArray)) { - - jmp $L56884 -$L56865: - mov ecx, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - jne SHORT $L56868 - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56867 -$L56868: - -; 200 : env->ReleasePrimitiveArrayCritical((jarray) param, (void*) arrays[j], 0); - - push 0 - mov edx, DWORD PTR _j$[ebp] - mov eax, DWORD PTR _arrays$[ebp] - mov ecx, DWORD PTR [eax+edx*4] - push ecx - mov edx, DWORD PTR _param$[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ; JNIEnv_::ReleasePrimitiveArrayCritical - -; 202 : else if (env->IsInstanceOf(param, classHolder)) { - - jmp $L56884 -$L56867: - mov eax, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je $L56884 - -; 203 : -; 204 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov edx, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ; JNIEnv_::GetObjectField - mov DWORD PTR _o$56873[ebp], eax - -; 205 : -; 206 : if (env->IsInstanceOf(o, classInteger)) { - - mov ecx, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push ecx - mov edx, DWORD PTR _o$56873[ebp] - push edx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56874 - -; 207 : int* out = (int*) arrays[j]; - - mov eax, DWORD PTR _j$[ebp] - mov ecx, DWORD PTR _arrays$[ebp] - mov edx, DWORD PTR [ecx+eax*4] - mov DWORD PTR _out$56875[ebp], edx - -; 208 : env->SetObjectField(param, fieldHolderO, env->NewObject(classInteger, newIntegerInt, *out)); - - mov eax, DWORD PTR _out$56875[ebp] - mov ecx, DWORD PTR [eax] - push ecx - mov edx, DWORD PTR ?newIntegerInt@@3PAU_jmethodID@@A ; newIntegerInt - push edx - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - mov ecx, DWORD PTR _env$[ebp] - push ecx - call ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject - add esp, 16 ; 00000010H - push eax - mov edx, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push edx - mov eax, DWORD PTR _param$[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ; JNIEnv_::SetObjectField - -; 209 : delete out; - - mov ecx, DWORD PTR _out$56875[ebp] - mov DWORD PTR $T56917[ebp], ecx - mov edx, DWORD PTR $T56917[ebp] - push edx - call ??3@YAXPAX@Z ; operator delete - add esp, 4 - -; 211 : else if (env->IsInstanceOf(o, classByteArray) || env->IsInstanceOf(o, classCharArray)) { - - jmp $L56884 -$L56874: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - push eax - mov ecx, DWORD PTR _o$56873[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - jne SHORT $L56880 - mov edx, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - push edx - mov eax, DWORD PTR _o$56873[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56879 -$L56880: - -; 212 : env->ReleasePrimitiveArrayCritical((jarray) o, (void*) arrays[j], 0); - - push 0 - mov ecx, DWORD PTR _j$[ebp] - mov edx, DWORD PTR _arrays$[ebp] - mov eax, DWORD PTR [edx+ecx*4] - push eax - mov ecx, DWORD PTR _o$56873[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ; JNIEnv_::ReleasePrimitiveArrayCritical - -; 214 : else if (env->IsInstanceOf(o, classBoolean)) { - - jmp SHORT $L56884 -$L56879: - mov edx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push edx - mov eax, DWORD PTR _o$56873[ebp] - push eax - mov ecx, DWORD PTR _env$[ebp] - call ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ; JNIEnv_::IsInstanceOf - and eax, 255 ; 000000ffH - test eax, eax - je SHORT $L56884 - -; 215 : int* out = (int*) arrays[j]; - - mov ecx, DWORD PTR _j$[ebp] - mov edx, DWORD PTR _arrays$[ebp] - mov eax, DWORD PTR [edx+ecx*4] - mov DWORD PTR _out$56885[ebp], eax - -; 216 : env->SetObjectField(param, fieldHolderO, env->NewObject(classBoolean, newBooleanBoolean, (*out == 0 ? JNI_FALSE : JNI_TRUE))); - - mov ecx, DWORD PTR _out$56885[ebp] - xor edx, edx - cmp DWORD PTR [ecx], 0 - setne dl - push edx - mov eax, DWORD PTR ?newBooleanBoolean@@3PAU_jmethodID@@A ; newBooleanBoolean - push eax - mov ecx, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push ecx - mov edx, DWORD PTR _env$[ebp] - push edx - call ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject - add esp, 16 ; 00000010H - push eax - mov eax, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push eax - mov ecx, DWORD PTR _param$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ; JNIEnv_::SetObjectField - -; 217 : delete out; - - mov edx, DWORD PTR _out$56885[ebp] - mov DWORD PTR $T56918[ebp], edx - mov eax, DWORD PTR $T56918[ebp] - push eax - call ??3@YAXPAX@Z ; operator delete - add esp, 4 -$L56884: - -; 221 : -; 222 : } - - jmp $L56863 -$L56864: - -; 223 : -; 224 : delete [] arrays; - - mov ecx, DWORD PTR _arrays$[ebp] - mov DWORD PTR $T56919[ebp], ecx - mov edx, DWORD PTR $T56919[ebp] - push edx - call ??3@YAXPAX@Z ; operator delete - add esp, 4 - -; 225 : -; 226 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - mov esi, esp - call DWORD PTR __imp__GetLastError@0 - cmp esi, esp - call __chkesp - push eax - mov eax, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov ecx, DWORD PTR _env$[ebp] - call ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ; JNIEnv_::SetIntField -$L56800: - -; 227 : -; 228 : } - - pop edi - pop esi - pop ebx - add esp, 168 ; 000000a8H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -_Java_com_eaio_nativecall_VoidCall_executeCall0@12 ENDP -_TEXT ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_name$ = 8 -?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z PROC NEAR ; JNIEnv_::FindClass, COMDAT - -; 759 : jclass FindClass(const char *name) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 760 : return functions->FindClass(this, name); - - mov esi, esp - mov eax, DWORD PTR _name$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+24] - cmp esi, esp - call __chkesp - -; 761 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z ENDP ; JNIEnv_::FindClass -_TEXT ENDS -; COMDAT ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z -_TEXT SEGMENT -_this$ = -4 -_clazz$ = 8 -_msg$ = 12 -?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z PROC NEAR ; JNIEnv_::ThrowNew, COMDAT - -; 787 : jint ThrowNew(jclass clazz, const char *msg) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 788 : return functions->ThrowNew(this, clazz, msg); - - mov esi, esp - mov eax, DWORD PTR _msg$[ebp] - push eax - mov ecx, DWORD PTR _clazz$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+56] - cmp esi, esp - call __chkesp - -; 789 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z ENDP ; JNIEnv_::ThrowNew -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_args$ = -4 -_result$ = -8 -_clazz$ = 12 -_methodID$ = 16 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::NewObject, COMDAT - -; 834 : jobject NewObject(jclass clazz, jmethodID methodID, ...) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 835 : va_list args; -; 836 : jobject result; -; 837 : va_start(args, methodID); - - lea eax, DWORD PTR _methodID$[ebp+4] - mov DWORD PTR _args$[ebp], eax - -; 838 : result = functions->NewObjectV(this,clazz,methodID,args); - - mov esi, esp - mov ecx, DWORD PTR _args$[ebp] - push ecx - mov edx, DWORD PTR _methodID$[ebp] - push edx - mov eax, DWORD PTR _clazz$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+116] - cmp esi, esp - call __chkesp - mov DWORD PTR _result$[ebp], eax - -; 839 : va_end(args); - - mov DWORD PTR _args$[ebp], 0 - -; 840 : return result; - - mov eax, DWORD PTR _result$[ebp] - -; 841 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 0 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::NewObject -_TEXT ENDS -; COMDAT ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z -_TEXT SEGMENT -_this$ = -4 -_obj$ = 8 -_clazz$ = 12 -?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z PROC NEAR ; JNIEnv_::IsInstanceOf, COMDAT - -; 854 : jboolean IsInstanceOf(jobject obj, jclass clazz) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 855 : return functions->IsInstanceOf(this,obj,clazz); - - mov esi, esp - mov eax, DWORD PTR _clazz$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+128] - cmp esi, esp - call __chkesp - -; 856 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z ENDP ; JNIEnv_::IsInstanceOf -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_args$ = -4 -_result$ = -8 -_obj$ = 12 -_methodID$ = 16 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallBooleanMethod, COMDAT - -; 881 : jmethodID methodID, ...) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 882 : va_list args; -; 883 : jboolean result; -; 884 : va_start(args,methodID); - - lea eax, DWORD PTR _methodID$[ebp+4] - mov DWORD PTR _args$[ebp], eax - -; 885 : result = functions->CallBooleanMethodV(this,obj,methodID,args); - - mov esi, esp - mov ecx, DWORD PTR _args$[ebp] - push ecx - mov edx, DWORD PTR _methodID$[ebp] - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+152] - cmp esi, esp - call __chkesp - mov BYTE PTR _result$[ebp], al - -; 886 : va_end(args); - - mov DWORD PTR _args$[ebp], 0 - -; 887 : return result; - - mov al, BYTE PTR _result$[ebp] - -; 888 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 0 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallBooleanMethod -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_args$ = -4 -_result$ = -8 -_obj$ = 12 -_methodID$ = 16 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallIntMethod, COMDAT - -; 949 : jint CallIntMethod(jobject obj, jmethodID methodID, ...) { - - push ebp - mov ebp, esp - sub esp, 72 ; 00000048H - push ebx - push esi - push edi - lea edi, DWORD PTR [ebp-72] - mov ecx, 18 ; 00000012H - mov eax, -858993460 ; ccccccccH - rep stosd - -; 950 : va_list args; -; 951 : jint result; -; 952 : va_start(args,methodID); - - lea eax, DWORD PTR _methodID$[ebp+4] - mov DWORD PTR _args$[ebp], eax - -; 953 : result = functions->CallIntMethodV(this,obj,methodID,args); - - mov esi, esp - mov ecx, DWORD PTR _args$[ebp] - push ecx - mov edx, DWORD PTR _methodID$[ebp] - push edx - mov eax, DWORD PTR _obj$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+200] - cmp esi, esp - call __chkesp - mov DWORD PTR _result$[ebp], eax - -; 954 : va_end(args); - - mov DWORD PTR _args$[ebp], 0 - -; 955 : return result; - - mov eax, DWORD PTR _result$[ebp] - -; 956 : } - - pop edi - pop esi - pop ebx - add esp, 72 ; 00000048H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 0 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallIntMethod -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_this$ = -4 -?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z PROC NEAR ; JNIEnv_::GetObjectField, COMDAT - -; 1248 : jobject GetObjectField(jobject obj, jfieldID fieldID) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1249 : return functions->GetObjectField(this,obj,fieldID); - - mov esi, esp - mov eax, DWORD PTR _fieldID$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+380] - cmp esi, esp - call __chkesp - -; 1250 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z ENDP ; JNIEnv_::GetObjectField -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_this$ = -4 -?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z PROC NEAR ; JNIEnv_::GetIntField, COMDAT - -; 1263 : jint GetIntField(jobject obj, jfieldID fieldID) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1264 : return functions->GetIntField(this,obj,fieldID); - - mov esi, esp - mov eax, DWORD PTR _fieldID$[ebp] - push eax - mov ecx, DWORD PTR _obj$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+400] - cmp esi, esp - call __chkesp - -; 1265 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z ENDP ; JNIEnv_::GetIntField -_TEXT ENDS -; COMDAT ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_val$ = 16 -_this$ = -4 -?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z PROC NEAR ; JNIEnv_::SetObjectField, COMDAT - -; 1276 : void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1277 : functions->SetObjectField(this,obj,fieldID,val); - - mov esi, esp - mov eax, DWORD PTR _val$[ebp] - push eax - mov ecx, DWORD PTR _fieldID$[ebp] - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+416] - cmp esi, esp - call __chkesp - -; 1278 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z ENDP ; JNIEnv_::SetObjectField -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT -_obj$ = 8 -_fieldID$ = 12 -_val$ = 16 -_this$ = -4 -?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z PROC NEAR ; JNIEnv_::SetIntField, COMDAT - -; 1296 : jint val) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1297 : functions->SetIntField(this,obj,fieldID,val); - - mov esi, esp - mov eax, DWORD PTR _val$[ebp] - push eax - mov ecx, DWORD PTR _fieldID$[ebp] - push ecx - mov edx, DWORD PTR _obj$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+436] - cmp esi, esp - call __chkesp - -; 1298 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z ENDP ; JNIEnv_::SetIntField -_TEXT ENDS -; COMDAT ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z PROC NEAR ; JNIEnv_::GetArrayLength, COMDAT - -; 1589 : jsize GetArrayLength(jarray array) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1590 : return functions->GetArrayLength(this,array); - - mov esi, esp - mov eax, DWORD PTR _array$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - mov eax, DWORD PTR [edx] - call DWORD PTR [eax+684] - cmp esi, esp - call __chkesp - -; 1591 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 4 -?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z ENDP ; JNIEnv_::GetArrayLength -_TEXT ENDS -; COMDAT ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -_index$ = 12 -?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z PROC NEAR ; JNIEnv_::GetObjectArrayElement, COMDAT - -; 1597 : jobject GetObjectArrayElement(jobjectArray array, jsize index) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1598 : return functions->GetObjectArrayElement(this,array,index); - - mov esi, esp - mov eax, DWORD PTR _index$[ebp] - push eax - mov ecx, DWORD PTR _array$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+692] - cmp esi, esp - call __chkesp - -; 1599 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z ENDP ; JNIEnv_::GetObjectArrayElement -_TEXT ENDS -; COMDAT ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -_isCopy$ = 12 -?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z PROC NEAR ; JNIEnv_::GetPrimitiveArrayCritical, COMDAT - -; 1788 : void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1789 : return functions->GetPrimitiveArrayCritical(this,array,isCopy); - - mov esi, esp - mov eax, DWORD PTR _isCopy$[ebp] - push eax - mov ecx, DWORD PTR _array$[ebp] - push ecx - mov edx, DWORD PTR _this$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - mov ecx, DWORD PTR [eax] - call DWORD PTR [ecx+888] - cmp esi, esp - call __chkesp - -; 1790 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 8 -?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z ENDP ; JNIEnv_::GetPrimitiveArrayCritical -_TEXT ENDS -; COMDAT ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z -_TEXT SEGMENT -_this$ = -4 -_array$ = 8 -_carray$ = 12 -_mode$ = 16 -?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z PROC NEAR ; JNIEnv_::ReleasePrimitiveArrayCritical, COMDAT - -; 1791 : void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { - - push ebp - mov ebp, esp - sub esp, 68 ; 00000044H - push ebx - push esi - push edi - push ecx - lea edi, DWORD PTR [ebp-68] - mov ecx, 17 ; 00000011H - mov eax, -858993460 ; ccccccccH - rep stosd - pop ecx - mov DWORD PTR _this$[ebp], ecx - -; 1792 : functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); - - mov esi, esp - mov eax, DWORD PTR _mode$[ebp] - push eax - mov ecx, DWORD PTR _carray$[ebp] - push ecx - mov edx, DWORD PTR _array$[ebp] - push edx - mov eax, DWORD PTR _this$[ebp] - push eax - mov ecx, DWORD PTR _this$[ebp] - mov edx, DWORD PTR [ecx] - call DWORD PTR [edx+892] - cmp esi, esp - call __chkesp - -; 1793 : } - - pop edi - pop esi - pop ebx - add esp, 68 ; 00000044H - cmp ebp, esp - call __chkesp - mov esp, ebp - pop ebp - ret 12 ; 0000000cH -?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z ENDP ; JNIEnv_::ReleasePrimitiveArrayCritical -_TEXT ENDS -END diff --git a/vendor/nativecall/0.4.1/cpp/Debug/VoidCall.obj b/vendor/nativecall/0.4.1/cpp/Debug/VoidCall.obj deleted file mode 100644 index 9ba9ad6..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Debug/VoidCall.obj and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/IntCall.cpp b/vendor/nativecall/0.4.1/cpp/IntCall.cpp deleted file mode 100644 index c221ab2..0000000 --- a/vendor/nativecall/0.4.1/cpp/IntCall.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/* - * IntCall.cpp - * - * Created on 11.09.2004. - * - * $Id: IntCall.cpp,v 1.3 2006/04/19 20:54:55 grnull Exp $ - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#include -#include "com_eaio_nativecall_IntCall.h" - -#ifdef _WINDOWS -#include -#include -#endif - -#ifdef _WINDOWS -#ifdef _X86_ - -#define _push(x) __asm { push x }; - -#endif -#endif - -// NativeCall fields - -extern jfieldID fieldFunction, fieldModule, fieldFunctionHandle, - fieldModuleHandle, fieldLastErrorCode; - -// Holder fields - -extern jfieldID fieldHolderO; - -// Classes - -extern jclass classBoolean,/* classByte, classCharacter, classShort,*/ - classInteger, /* classLong, classFloat, classDouble,*/ classString, - classByteArray, classCharArray, /*classIntArray,*/ classHolder; - -// Wrapper class methods - -extern jmethodID methodBooleanValue,/* methodByteValue, methodCharValue, -methodShortValue,*/ methodIntValue/*, methodLongValue, methodFloatValue, -methodDoubleValue*/; - -// Constructors - -extern jmethodID newIntegerInt, newBooleanBoolean; - -/* - * Class: com_eaio_nativecall_IntCall - * Method: executeCall - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_eaio_nativecall_IntCall_executeCall -(JNIEnv *env, jobject obj) { - - jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - jint outVal; - -#ifdef _WINDOWS -#ifdef _X86_ - - __asm { - - call functionHandle - mov outVal, eax - - } - -#endif -#endif - - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - return outVal; - -} - -/* - * Class: com_eaio_nativecall_IntCall - * Method: executeCall0 - * Signature: ([Ljava/lang/Object;)I - */ -JNIEXPORT jint JNICALL Java_com_eaio_nativecall_IntCall_executeCall0 -(JNIEnv *env, jobject obj, jobjectArray params) { - - const int len = env->GetArrayLength(params); - - int* arrays = NULL; - if (!(arrays = new int[len])) { - env->ThrowNew(env->FindClass("java/lang/OutOfMemoryError"), NULL); - return 0; - } - memset(arrays, 0, (sizeof(int) * len)); - - jobject param; - - for (int i = len - 1; i >= 0; i--) { - - param = env->GetObjectArrayElement(params, i); - - if (param == NULL) { - _push(0); - } - else if (env->IsInstanceOf(param, classInteger)) { - int intArg = env->CallIntMethod(param, methodIntValue); - _push(intArg) - } - else if (env->IsInstanceOf(param, classByteArray)) { - char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) param, 0); - arrays[i] = (int) &byteArrayArg; - _push(byteArrayArg) - } - else if (env->IsInstanceOf(param, classCharArray)) { - unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( - (jarray) param, 0); - arrays[i] = (int) &charArrayArg; - _push(charArrayArg) - } - else if (env->IsInstanceOf(param, classBoolean)) { - jboolean booleanArg = env->CallBooleanMethod(param, methodBooleanValue); - int tempArg = (booleanArg == JNI_FALSE ? 0 : 1); - _push(tempArg) - } - else if (env->IsInstanceOf(param, classHolder)) { - - /* Holder */ - - jobject o = env->GetObjectField(param, fieldHolderO); - - if (env->IsInstanceOf(o, classInteger)) { - int *intPtr = new int; - *intPtr = env->CallIntMethod(o, methodIntValue); - arrays[i] = (int) intPtr; - _push(intPtr); - } - else if (env->IsInstanceOf(o, classByteArray)) { - char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) o, 0); - arrays[i] = (int) &byteArrayArg; - _push(byteArrayArg) - } - else if (env->IsInstanceOf(o, classCharArray)) { - unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( - (jarray) o, 0); - arrays[i] = (int) &charArrayArg; - _push(charArrayArg) - } - else if (env->IsInstanceOf(o, classBoolean)) { - jboolean booleanArg = env->CallBooleanMethod(o, methodBooleanValue); - int *tempPtr = new int; - *tempPtr = (booleanArg == JNI_FALSE ? 0 : 1); - arrays[i] = (int) tempPtr; - _push(tempPtr); - } - - /* end Holder */ - - } - - } - - jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - jint outVal; - -#ifdef _WINDOWS -#ifdef _X86_ - - __asm { - - call functionHandle - mov outVal, eax - - } - -#endif -#endif - - for (int j = 0; j < len; ++j) { - param = env->GetObjectArrayElement(params, j); - if (param == NULL) {} - else if (env->IsInstanceOf(param, classByteArray) || env->IsInstanceOf(param, classCharArray)) { - env->ReleasePrimitiveArrayCritical((jarray) param, (void*) arrays[j], 0); - } - else if (env->IsInstanceOf(param, classHolder)) { - - jobject o = env->GetObjectField(param, fieldHolderO); - - if (env->IsInstanceOf(o, classInteger)) { - int* out = (int*) arrays[j]; - env->SetObjectField(param, fieldHolderO, env->NewObject(classInteger, newIntegerInt, *out)); - delete out; - } - else if (env->IsInstanceOf(o, classByteArray) || env->IsInstanceOf(o, classCharArray)) { - env->ReleasePrimitiveArrayCritical((jarray) o, (void*) arrays[j], 0); - } - else if (env->IsInstanceOf(o, classBoolean)) { - int* out = (int*) arrays[j]; - env->SetObjectField(param, fieldHolderO, env->NewObject(classBoolean, newBooleanBoolean, (*out == 0 ? JNI_FALSE : JNI_TRUE))); - delete out; - } - - } - - } - - delete [] arrays; - - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - return outVal; - -} diff --git a/vendor/nativecall/0.4.1/cpp/NativeCall.cpp b/vendor/nativecall/0.4.1/cpp/NativeCall.cpp deleted file mode 100644 index d5267d3..0000000 --- a/vendor/nativecall/0.4.1/cpp/NativeCall.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/* - * NativeCall.cpp - * - * Created on 11.09.2004. - * - * $Id: NativeCall.cpp,v 1.4 2006/04/19 20:54:55 grnull Exp $ - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#include -#include "com_eaio_nativecall_NativeCall.h" - -#ifdef _WINDOWS -#include -#include -#endif - -// NativeCall fields - -jfieldID fieldFunction, fieldModule, fieldFunctionHandle, - fieldModuleHandle, fieldLastErrorCode; - -// Holder fields - -jfieldID fieldHolderO; - -// Classes - -jclass classBoolean,/* classByte, classCharacter, classShort,*/ - classInteger, /* classLong, classFloat, classDouble,*/ classString, - classByteArray, classCharArray, /*classIntArray,*/ classHolder; - -// Wrapper class methods - -jmethodID methodBooleanValue,/* methodByteValue, methodCharValue, -methodShortValue,*/ methodIntValue/*, methodLongValue, methodFloatValue, -methodDoubleValue*/; - -// Constructors - -jmethodID newIntegerInt, newBooleanBoolean; - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_NativeCall_initIDs -(JNIEnv *env, jclass cls) { - - // NativeCall fields - - fieldFunction = env->GetFieldID(cls, "function", "Ljava/lang/String;"); - fieldModule = env->GetFieldID(cls, "module", "Ljava/lang/String;"); - - fieldFunctionHandle = env->GetFieldID(cls, "functionHandle", "I"); - fieldModuleHandle = env-> GetFieldID(cls, "moduleHandle", "I"); - - fieldLastErrorCode = env->GetFieldID(cls, "lastErrorCode", "I"); - - // Holder fields - - classHolder = (jclass) env->NewGlobalRef(env->FindClass("com/eaio/nativecall/Holder")); - fieldHolderO = env->GetFieldID(classHolder, "o", "Ljava/lang/Object;"); - - // Other classes - - classBoolean = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Boolean")); - /*classByte = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Byte")); - classCharacter = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Character")); - classShort = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Short"));*/ - classInteger = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Integer")); - /*classLong = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Long")); - classFloat = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Float")); - classDouble = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Double"));*/ - classString = (jclass) env->NewGlobalRef(env->FindClass("java/lang/String")); - classByteArray = (jclass) env->NewGlobalRef(env->FindClass("[B")); - classCharArray = (jclass) env->NewGlobalRef(env->FindClass("[C")); - /*classIntArray = (jclass) env->NewGlobalRef(env->FindClass("[I"));*/ - - // Wrapper class methods - - methodBooleanValue = env->GetMethodID(classBoolean, - "booleanValue", "()Z"); - /*methodByteValue = env->GetMethodID(classByte, - "byteValue", "()B"); - methodCharValue = env->GetMethodID(classCharacter, - "charValue", "()C"); - methodShortValue = env->GetMethodID(classShort, - "shortValue", "()S");*/ - methodIntValue = env->GetMethodID(classInteger, - "intValue", "()I"); - /*methodLongValue = env->GetMethodID(classLong, - "longValue", "()J"); - methodFloatValue = env->GetMethodID(classFloat, - "floatValue", "()F"); - methodDoubleValue = env->GetMethodID(classDouble, - "doubleValue", "()D");*/ - - // Constructors - - newIntegerInt = env->GetMethodID(classInteger, "", "(I)V"); - newBooleanBoolean = env->GetMethodID(classBoolean, "", "(Z)V"); - -} - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: initHandles - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_com_eaio_nativecall_NativeCall_initHandles -(JNIEnv *env, jobject obj) { - - bool out = JNI_TRUE; - - jstring moduleNameS = (jstring) env->GetObjectField(obj, fieldModule); - jstring functionNameS = (jstring) env->GetObjectField(obj, fieldFunction); - - const char* moduleName = env->GetStringUTFChars(moduleNameS, 0); - const char* functionName = env->GetStringUTFChars(functionNameS, 0); - -#ifdef _WINDOWS - - HMODULE mod = LoadLibrary(moduleName); - - if (mod == NULL) { - /* no such module or DllMain returned FALSE */ - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - out = JNI_FALSE; - } - else { - FARPROC addr = GetProcAddress(mod, functionName); - if (addr == NULL) { - /* function not found */ - FreeLibrary(mod); - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - out = JNI_FALSE; - } - else { - /* all ok */ - env->SetIntField(obj, fieldModuleHandle, (jint) mod); - env->SetIntField(obj, fieldFunctionHandle, (jint) addr); - } - } - -#endif - - env->ReleaseStringUTFChars(moduleNameS, moduleName); - env->ReleaseStringUTFChars(functionNameS, functionName); - - return out; - -} - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: getLastError - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_com_eaio_nativecall_NativeCall_getLastError -(JNIEnv *env, jobject obj) { - - jint lastError = env->GetIntField(obj, fieldLastErrorCode); - - if (lastError == 0) return NULL; - - jstring out = NULL; - -#ifdef _WINDOWS - - LPVOID msgBufPtr = NULL; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, NULL, lastError, 0, - (LPSTR) &msgBufPtr, 0, NULL); - - out = env->NewStringUTF((char*) msgBufPtr); - - LocalFree(msgBufPtr); - -#endif - - return out; - -} - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: destroy - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_NativeCall_destroy -(JNIEnv *env, jobject obj) { - - jint module = env->GetIntField(obj, fieldModuleHandle); - - if (module == 0) return; - -#ifdef _WINDOWS - - if (FreeLibrary((HMODULE) module) == 0) { - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - } - -#endif - - env->SetIntField(obj, fieldModuleHandle, 0); - env->SetIntField(obj, fieldFunctionHandle, 0); - - return; - -} \ No newline at end of file diff --git a/vendor/nativecall/0.4.1/cpp/NativeCall.dsp b/vendor/nativecall/0.4.1/cpp/NativeCall.dsp deleted file mode 100644 index 7959712..0000000 --- a/vendor/nativecall/0.4.1/cpp/NativeCall.dsp +++ /dev/null @@ -1,132 +0,0 @@ -# Microsoft Developer Studio Project File - Name="NativeCall" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=NativeCall - Win32 Debug -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "NativeCall.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "NativeCall.mak" CFG="NativeCall - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "NativeCall - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "NativeCall - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "NativeCall - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVECALL_EXPORTS" /YX /FD /c -# ADD CPP /nologo /G5 /MD /W3 /Oa /Og /Os /Oy /Ob2 /Gf /I "C:\Program Files\IBMJava13\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVECALL_EXPORTS" /D "WIN32_LEAN_AND_MEAN" /FAs /FR /YX /FD /c -# SUBTRACT CPP /Ox /Ot /Gy -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib libctiny.lib "C:\Program Files\Microsoft Visual Studio\VC98\Lib\libcmt.lib" "C:\Program Files\Microsoft Visual Studio\VC98\Lib\msvcrt.lib" /nologo /subsystem:console /dll /map /machine:I386 /nodefaultlib /MERGE:".rdata=.text" /OPT:REF /OPT:NOWIN98 -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "NativeCall - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVECALL_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "C:\Program Files\IBMJava13\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVECALL_EXPORTS" /FAs /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "NativeCall - Win32 Release" -# Name "NativeCall - Win32 Debug" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\IntCall.cpp -# End Source File -# Begin Source File - -SOURCE=.\NativeCall.cpp -# End Source File -# Begin Source File - -SOURCE=.\version.rc -# End Source File -# Begin Source File - -SOURCE=.\VoidCall.cpp -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\com_eaio_nativecall_IntCall.h -# End Source File -# Begin Source File - -SOURCE=.\com_eaio_nativecall_NativeCall.h -# End Source File -# Begin Source File - -SOURCE=.\com_eaio_nativecall_VoidCall.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/vendor/nativecall/0.4.1/cpp/NativeCall.dsw b/vendor/nativecall/0.4.1/cpp/NativeCall.dsw deleted file mode 100644 index e591c50..0000000 --- a/vendor/nativecall/0.4.1/cpp/NativeCall.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! - -############################################################################### - -Project: "NativeCall"=".\NativeCall.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/vendor/nativecall/0.4.1/cpp/Release/IntCall.asm b/vendor/nativecall/0.4.1/cpp/Release/IntCall.asm deleted file mode 100644 index f2aa3af..0000000 --- a/vendor/nativecall/0.4.1/cpp/Release/IntCall.asm +++ /dev/null @@ -1,943 +0,0 @@ - TITLE C:\Documents and Settings\Administrator\My Documents\Software\NativeCall\src\cpp\IntCall.cpp - .386P -include listing.inc -if @Version gt 510 -.model FLAT -else -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' -_BSS ENDS -_TLS SEGMENT DWORD USE32 PUBLIC 'TLS' -_TLS ENDS -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -FLAT GROUP _DATA, CONST, _BSS - ASSUME CS: FLAT, DS: FLAT, SS: FLAT -endif -PUBLIC _Java_com_eaio_nativecall_IntCall_executeCall@8 -EXTRN ?fieldFunctionHandle@@3PAU_jfieldID@@A:DWORD ; fieldFunctionHandle -EXTRN ?fieldLastErrorCode@@3PAU_jfieldID@@A:DWORD ; fieldLastErrorCode -EXTRN __imp__GetLastError@0:NEAR -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_functionHandle$ = 8 -_outVal$ = -4 -_Java_com_eaio_nativecall_IntCall_executeCall@8 PROC NEAR - -; 79 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - push ecx - -; 80 : -; 81 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push esi - mov esi, DWORD PTR _env$[ebp] - push eax - push DWORD PTR _obj$[ebp] - mov ecx, DWORD PTR [esi] - push esi - call DWORD PTR [ecx+400] - mov DWORD PTR _functionHandle$[ebp], eax - -; 82 : jint outVal; -; 83 : -; 84 : #ifdef _WINDOWS -; 85 : #ifdef _X86_ -; 86 : -; 87 : __asm { -; 88 : -; 89 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 90 : mov outVal, eax - - mov DWORD PTR _outVal$[ebp], eax - -; 91 : -; 92 : } -; 93 : -; 94 : #endif -; 95 : #endif -; 96 : -; 97 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - call DWORD PTR __imp__GetLastError@0 - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push DWORD PTR _obj$[ebp] - push esi - call DWORD PTR [ecx+436] - -; 98 : -; 99 : return outVal; - - mov eax, DWORD PTR _outVal$[ebp] - -; 100 : -; 101 : } - - pop esi - leave - ret 8 -_Java_com_eaio_nativecall_IntCall_executeCall@8 ENDP -_TEXT ENDS -PUBLIC ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' -PUBLIC _Java_com_eaio_nativecall_IntCall_executeCall0@12 -PUBLIC ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject -PUBLIC ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod -PUBLIC ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod -EXTRN ?fieldHolderO@@3PAU_jfieldID@@A:DWORD ; fieldHolderO -EXTRN ?classBoolean@@3PAV_jclass@@A:DWORD ; classBoolean -EXTRN ?classInteger@@3PAV_jclass@@A:DWORD ; classInteger -EXTRN ?classByteArray@@3PAV_jclass@@A:DWORD ; classByteArray -EXTRN ?classCharArray@@3PAV_jclass@@A:DWORD ; classCharArray -EXTRN ?classHolder@@3PAV_jclass@@A:DWORD ; classHolder -EXTRN ?methodBooleanValue@@3PAU_jmethodID@@A:DWORD ; methodBooleanValue -EXTRN ?methodIntValue@@3PAU_jmethodID@@A:DWORD ; methodIntValue -EXTRN ?newIntegerInt@@3PAU_jmethodID@@A:DWORD ; newIntegerInt -EXTRN ?newBooleanBoolean@@3PAU_jmethodID@@A:DWORD ; newBooleanBoolean -EXTRN ??2@YAPAXI@Z:NEAR ; operator new -EXTRN ??3@YAXPAX@Z:NEAR ; operator delete -EXTRN _memset:NEAR -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -; File C:\Program Files\IBMJava13\include\jni.h -_DATA SEGMENT -??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ DB 'java/lang/OutOfMemor' - DB 'yError', 00H ; `string' -_DATA ENDS -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_params$ = 16 -_len$ = -28 -_arrays$ = -20 -_param$ = -24 -_i$ = 8 -_intArg$27770 = -24 -_byteArrayArg$27773 = -4 -_charArrayArg$27779 = -8 -_tempArg$27786 = -24 -_intPtr$27791 = -24 -_byteArrayArg$27797 = -12 -_charArrayArg$27803 = -16 -_tempPtr$27810 = -24 -_functionHandle$ = 8 -_outVal$ = -32 -_j$ = 8 -_Java_com_eaio_nativecall_IntCall_executeCall0@12 PROC NEAR - -; 109 : (JNIEnv *env, jobject obj, jobjectArray params) { - - push ebp - mov ebp, esp - sub esp, 32 ; 00000020H - push ebx - push esi - -; 110 : -; 111 : const int len = env->GetArrayLength(params); - - mov esi, DWORD PTR _env$[ebp] - push edi - push DWORD PTR _params$[ebp] - mov eax, DWORD PTR [esi] - push esi - call DWORD PTR [eax+684] - mov ebx, eax - -; 112 : -; 113 : int* arrays = NULL; -; 114 : if (!(arrays = new int[len])) { - - mov edi, ebx - mov DWORD PTR _len$[ebp], ebx - shl edi, 2 - push edi - call ??2@YAPAXI@Z ; operator new - test eax, eax - pop ecx - mov DWORD PTR _arrays$[ebp], eax - jne SHORT $L27759 - -; 115 : env->ThrowNew(env->FindClass("java/lang/OutOfMemoryError"), NULL); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push 0 - push eax - push esi - call DWORD PTR [ecx+56] - -; 116 : return 0; - - xor eax, eax - jmp $L27754 -$L27759: - -; 117 : } -; 118 : memset(arrays, 0, (sizeof(int) * len)); - - push edi - push 0 - push eax - call _memset - -; 119 : -; 120 : jobject param; -; 121 : -; 122 : for (int i = len - 1; i >= 0; i--) { - - lea eax, DWORD PTR [ebx-1] - add esp, 12 ; 0000000cH - test eax, eax - mov DWORD PTR _i$[ebp], eax - jl $L27766 - mov ecx, DWORD PTR _arrays$[ebp] - lea edi, DWORD PTR [ecx+eax*4] - jmp SHORT $L27764 -$L28030: - -; 117 : } -; 118 : memset(arrays, 0, (sizeof(int) * len)); - - mov eax, DWORD PTR _i$[ebp] -$L27764: - -; 123 : -; 124 : param = env->GetObjectArrayElement(params, i); - - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR _params$[ebp] - push esi - call DWORD PTR [ecx+692] - mov ebx, eax - -; 125 : -; 126 : if (param == NULL) { - - test ebx, ebx - jne SHORT $L27767 - -; 127 : _push(0); - - push 0 - -; 128 : } -; 129 : else if (env->IsInstanceOf(param, classInteger)) { - - jmp $L27765 -$L27767: - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27769 - -; 130 : int intArg = env->CallIntMethod(param, methodIntValue); - - push DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push ebx - push esi - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - add esp, 12 ; 0000000cH - mov DWORD PTR _intArg$27770[ebp], eax - -; 131 : _push(intArg) - - push DWORD PTR _intArg$27770[ebp] - -; 132 : } -; 133 : else if (env->IsInstanceOf(param, classByteArray)) { - - jmp $L27765 -$L27769: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27772 - -; 134 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) param, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _byteArrayArg$27773[ebp], eax - -; 135 : arrays[i] = (int) &byteArrayArg; - - lea eax, DWORD PTR _byteArrayArg$27773[ebp] - mov DWORD PTR [edi], eax - -; 136 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$27773[ebp] - -; 137 : } -; 138 : else if (env->IsInstanceOf(param, classCharArray)) { - - jmp $L27765 -$L27772: - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27778 - -; 139 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 140 : (jarray) param, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _charArrayArg$27779[ebp], eax - -; 141 : arrays[i] = (int) &charArrayArg; - - lea eax, DWORD PTR _charArrayArg$27779[ebp] - mov DWORD PTR [edi], eax - -; 142 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$27779[ebp] - -; 143 : } -; 144 : else if (env->IsInstanceOf(param, classBoolean)) { - - jmp $L27765 -$L27778: - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27784 - -; 145 : jboolean booleanArg = env->CallBooleanMethod(param, methodBooleanValue); - - push DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ebx - push esi - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - add esp, 12 ; 0000000cH - -; 146 : int tempArg = (booleanArg == JNI_FALSE ? 0 : 1); - - neg al - sbb eax, eax - neg eax - mov DWORD PTR _tempArg$27786[ebp], eax - -; 147 : _push(tempArg) - - push DWORD PTR _tempArg$27786[ebp] - -; 148 : } -; 149 : else if (env->IsInstanceOf(param, classHolder)) { - - jmp $L27765 -$L27784: - mov eax, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je $L27765 - -; 150 : -; 151 : /* Holder */ -; 152 : -; 153 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov eax, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+380] - -; 154 : -; 155 : if (env->IsInstanceOf(o, classInteger)) { - - mov ecx, DWORD PTR [esi] - mov ebx, eax - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27790 - -; 156 : int *intPtr = new int; - - push 4 - call ??2@YAPAXI@Z ; operator new - pop ecx - mov DWORD PTR _intPtr$27791[ebp], eax - -; 157 : *intPtr = env->CallIntMethod(o, methodIntValue); - - push DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push ebx - push esi - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - mov ecx, DWORD PTR _intPtr$27791[ebp] - add esp, 12 ; 0000000cH - -; 158 : arrays[i] = (int) intPtr; - - mov DWORD PTR [edi], ecx - mov DWORD PTR [ecx], eax - -; 159 : _push(intPtr); - - push DWORD PTR _intPtr$27791[ebp] - -; 160 : } -; 161 : else if (env->IsInstanceOf(o, classByteArray)) { - - jmp $L27765 -$L27790: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27796 - -; 162 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) o, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _byteArrayArg$27797[ebp], eax - -; 163 : arrays[i] = (int) &byteArrayArg; - - lea eax, DWORD PTR _byteArrayArg$27797[ebp] - mov DWORD PTR [edi], eax - -; 164 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$27797[ebp] - -; 165 : } -; 166 : else if (env->IsInstanceOf(o, classCharArray)) { - - jmp SHORT $L27765 -$L27796: - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27802 - -; 167 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 168 : (jarray) o, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _charArrayArg$27803[ebp], eax - -; 169 : arrays[i] = (int) &charArrayArg; - - lea eax, DWORD PTR _charArrayArg$27803[ebp] - mov DWORD PTR [edi], eax - -; 170 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$27803[ebp] - -; 171 : } -; 172 : else if (env->IsInstanceOf(o, classBoolean)) { - - jmp SHORT $L27765 -$L27802: - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27765 - -; 173 : jboolean booleanArg = env->CallBooleanMethod(o, methodBooleanValue); - - push DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ebx - push esi - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - -; 174 : int *tempPtr = new int; - - push 4 - mov bl, al - call ??2@YAPAXI@Z ; operator new - add esp, 16 ; 00000010H - -; 175 : *tempPtr = (booleanArg == JNI_FALSE ? 0 : 1); - - xor ecx, ecx - test bl, bl - setne cl - mov DWORD PTR _tempPtr$27810[ebp], eax - mov DWORD PTR [eax], ecx - -; 176 : arrays[i] = (int) tempPtr; - - mov DWORD PTR [edi], eax - -; 177 : _push(tempPtr); - - push DWORD PTR _tempPtr$27810[ebp] - -; 176 : arrays[i] = (int) tempPtr; - -$L27765: - dec DWORD PTR _i$[ebp] - sub edi, 4 - cmp DWORD PTR _i$[ebp], 0 - jge $L28030 - -; 119 : -; 120 : jobject param; -; 121 : -; 122 : for (int i = len - 1; i >= 0; i--) { - - mov ebx, DWORD PTR _len$[ebp] -$L27766: - -; 178 : } -; 179 : -; 180 : /* end Holder */ -; 181 : -; 182 : } -; 183 : -; 184 : } -; 185 : -; 186 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR _obj$[ebp] - push esi - call DWORD PTR [ecx+400] - mov DWORD PTR _functionHandle$[ebp], eax - -; 187 : jint outVal; -; 188 : -; 189 : #ifdef _WINDOWS -; 190 : #ifdef _X86_ -; 191 : -; 192 : __asm { -; 193 : -; 194 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 195 : mov outVal, eax - - mov DWORD PTR _outVal$[ebp], eax - -; 196 : -; 197 : } -; 198 : -; 199 : #endif -; 200 : #endif -; 201 : -; 202 : for (int j = 0; j < len; ++j) { - - and DWORD PTR _j$[ebp], 0 - test ebx, ebx - jle $L27819 - -; 178 : } -; 179 : -; 180 : /* end Holder */ -; 181 : -; 182 : } -; 183 : -; 184 : } -; 185 : -; 186 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov ebx, DWORD PTR _arrays$[ebp] -$L27817: - -; 203 : param = env->GetObjectArrayElement(params, j); - - push DWORD PTR _j$[ebp] - mov eax, DWORD PTR [esi] - push DWORD PTR _params$[ebp] - push esi - call DWORD PTR [eax+692] - mov edi, eax - -; 204 : if (param == NULL) {} - - test edi, edi - mov DWORD PTR _param$[ebp], edi - je $L27818 - -; 205 : else if (env->IsInstanceOf(param, classByteArray) || env->IsInstanceOf(param, classCharArray)) { - - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne $L27835 - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne $L27835 - -; 207 : } -; 208 : else if (env->IsInstanceOf(param, classHolder)) { - - mov eax, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - je $L27818 - -; 209 : -; 210 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov eax, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+380] - -; 211 : -; 212 : if (env->IsInstanceOf(o, classInteger)) { - - mov ecx, DWORD PTR [esi] - mov edi, eax - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27829 - -; 213 : int* out = (int*) arrays[j]; - - mov edi, DWORD PTR [ebx] - -; 214 : env->SetObjectField(param, fieldHolderO, env->NewObject(classInteger, newIntegerInt, *out)); - - push DWORD PTR [edi] - push DWORD PTR ?newIntegerInt@@3PAU_jmethodID@@A ; newIntegerInt - push DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger -$L28033: - push esi - call ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject - add esp, 16 ; 00000010H - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push DWORD PTR _param$[ebp] - push esi - call DWORD PTR [ecx+416] - -; 215 : delete out; - - push edi - call ??3@YAXPAX@Z ; operator delete - pop ecx - -; 216 : } -; 217 : else if (env->IsInstanceOf(o, classByteArray) || env->IsInstanceOf(o, classCharArray)) { - - jmp SHORT $L27818 -$L27829: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne SHORT $L27835 - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne SHORT $L27835 - -; 218 : env->ReleasePrimitiveArrayCritical((jarray) o, (void*) arrays[j], 0); -; 219 : } -; 220 : else if (env->IsInstanceOf(o, classBoolean)) { - - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27818 - -; 221 : int* out = (int*) arrays[j]; - - mov edi, DWORD PTR [ebx] - -; 222 : env->SetObjectField(param, fieldHolderO, env->NewObject(classBoolean, newBooleanBoolean, (*out == 0 ? JNI_FALSE : JNI_TRUE))); - - xor eax, eax - cmp DWORD PTR [edi], eax - setne al - push eax - push DWORD PTR ?newBooleanBoolean@@3PAU_jmethodID@@A ; newBooleanBoolean - push DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - -; 223 : delete out; - - jmp SHORT $L28033 -$L27835: - -; 206 : env->ReleasePrimitiveArrayCritical((jarray) param, (void*) arrays[j], 0); - - mov eax, DWORD PTR [esi] - push 0 - push DWORD PTR [ebx] - push edi - push esi - call DWORD PTR [eax+892] -$L27818: - inc DWORD PTR _j$[ebp] - mov eax, DWORD PTR _j$[ebp] - add ebx, 4 - cmp eax, DWORD PTR _len$[ebp] - jl $L27817 -$L27819: - -; 224 : } -; 225 : -; 226 : } -; 227 : -; 228 : } -; 229 : -; 230 : delete [] arrays; - - push DWORD PTR _arrays$[ebp] - call ??3@YAXPAX@Z ; operator delete - pop ecx - -; 231 : -; 232 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - call DWORD PTR __imp__GetLastError@0 - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push DWORD PTR _obj$[ebp] - push esi - call DWORD PTR [ecx+436] - -; 233 : -; 234 : return outVal; - - mov eax, DWORD PTR _outVal$[ebp] -$L27754: - -; 235 : -; 236 : } - - pop edi - pop esi - pop ebx - leave - ret 12 ; 0000000cH -_Java_com_eaio_nativecall_IntCall_executeCall0@12 ENDP -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_clazz$ = 12 -_methodID$ = 16 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::NewObject, COMDAT - -; 835 : va_list args; -; 836 : jobject result; -; 837 : va_start(args, methodID); -; 838 : result = functions->NewObjectV(this,clazz,methodID,args); - - mov eax, DWORD PTR _this$[esp-4] - lea edx, DWORD PTR _methodID$[esp] - push edx - push DWORD PTR _methodID$[esp] - mov ecx, DWORD PTR [eax] - push DWORD PTR _clazz$[esp+4] - push eax - call DWORD PTR [ecx+116] - -; 839 : va_end(args); -; 840 : return result; -; 841 : } - - ret 0 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::NewObject -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_obj$ = 12 -_methodID$ = 16 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallBooleanMethod, COMDAT - -; 882 : va_list args; -; 883 : jboolean result; -; 884 : va_start(args,methodID); -; 885 : result = functions->CallBooleanMethodV(this,obj,methodID,args); - - mov eax, DWORD PTR _this$[esp-4] - lea edx, DWORD PTR _methodID$[esp] - push edx - push DWORD PTR _methodID$[esp] - mov ecx, DWORD PTR [eax] - push DWORD PTR _obj$[esp+4] - push eax - call DWORD PTR [ecx+152] - -; 886 : va_end(args); -; 887 : return result; -; 888 : } - - ret 0 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallBooleanMethod -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_obj$ = 12 -_methodID$ = 16 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallIntMethod, COMDAT - -; 950 : va_list args; -; 951 : jint result; -; 952 : va_start(args,methodID); -; 953 : result = functions->CallIntMethodV(this,obj,methodID,args); - - mov eax, DWORD PTR _this$[esp-4] - lea edx, DWORD PTR _methodID$[esp] - push edx - push DWORD PTR _methodID$[esp] - mov ecx, DWORD PTR [eax] - push DWORD PTR _obj$[esp+4] - push eax - call DWORD PTR [ecx+200] - -; 954 : va_end(args); -; 955 : return result; -; 956 : } - - ret 0 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallIntMethod -_TEXT ENDS -END diff --git a/vendor/nativecall/0.4.1/cpp/Release/IntCall.obj b/vendor/nativecall/0.4.1/cpp/Release/IntCall.obj deleted file mode 100644 index 4459fd4..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Release/IntCall.obj and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.asm b/vendor/nativecall/0.4.1/cpp/Release/NativeCall.asm deleted file mode 100644 index 980f7ca..0000000 --- a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.asm +++ /dev/null @@ -1,859 +0,0 @@ - TITLE C:\Documents and Settings\Administrator\My Documents\Software\NativeCall\src\cpp\NativeCall.cpp - .386P -include listing.inc -if @Version gt 510 -.model FLAT -else -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' -_BSS ENDS -_TLS SEGMENT DWORD USE32 PUBLIC 'TLS' -_TLS ENDS -; COMDAT ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_08JJOG@function?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_06CODG@module?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_01FLOP@I?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0P@LKIL@functionHandle?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0N@EFAA@moduleHandle?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0O@OMHL@lastErrorCode?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_01PGHN@o?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0BB@LLFN@java?1lang?1String?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_02LOEJ@?$FLB?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_02BENO@?$FLC?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_03KJOK@?$CI?$CJZ?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_0N@KEBP@booleanValue?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_03PPCD@?$CI?$CJI?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_08JCMA@intValue?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_04ECLF@?$CII?$CJV?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_06KILP@?$DMinit?$DO?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ??_C@_04JFOE@?$CIZ?$CJV?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewGlobalRef@JNIEnv_@@QAEPAV_jobject@@PAV2@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetMethodID@JNIEnv_@@QAEPAU_jmethodID@@PAV_jclass@@PBD1@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetFieldID@JNIEnv_@@QAEPAU_jfieldID@@PAV_jclass@@PBD1@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewStringUTF@JNIEnv_@@QAEPAV_jstring@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetStringUTFChars@JNIEnv_@@QAEPBDPAV_jstring@@PAE@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ReleaseStringUTFChars@JNIEnv_@@QAEXPAV_jstring@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -FLAT GROUP _DATA, CONST, _BSS - ASSUME CS: FLAT, DS: FLAT, SS: FLAT -endif -PUBLIC ?fieldFunction@@3PAU_jfieldID@@A ; fieldFunction -PUBLIC ?fieldModule@@3PAU_jfieldID@@A ; fieldModule -PUBLIC ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle -PUBLIC ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle -PUBLIC ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode -PUBLIC ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO -PUBLIC ?classBoolean@@3PAV_jclass@@A ; classBoolean -PUBLIC ?classInteger@@3PAV_jclass@@A ; classInteger -PUBLIC ?classString@@3PAV_jclass@@A ; classString -PUBLIC ?classByteArray@@3PAV_jclass@@A ; classByteArray -PUBLIC ?classCharArray@@3PAV_jclass@@A ; classCharArray -PUBLIC ?classHolder@@3PAV_jclass@@A ; classHolder -PUBLIC ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue -PUBLIC ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue -PUBLIC ?newIntegerInt@@3PAU_jmethodID@@A ; newIntegerInt -PUBLIC ?newBooleanBoolean@@3PAU_jmethodID@@A ; newBooleanBoolean -_BSS SEGMENT -?fieldFunction@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldFunction -?fieldModule@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldModule -?fieldFunctionHandle@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldFunctionHandle -?fieldModuleHandle@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldModuleHandle -?fieldLastErrorCode@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldLastErrorCode -?fieldHolderO@@3PAU_jfieldID@@A DD 01H DUP (?) ; fieldHolderO -?classBoolean@@3PAV_jclass@@A DD 01H DUP (?) ; classBoolean -?classInteger@@3PAV_jclass@@A DD 01H DUP (?) ; classInteger -?classString@@3PAV_jclass@@A DD 01H DUP (?) ; classString -?classByteArray@@3PAV_jclass@@A DD 01H DUP (?) ; classByteArray -?classCharArray@@3PAV_jclass@@A DD 01H DUP (?) ; classCharArray -?classHolder@@3PAV_jclass@@A DD 01H DUP (?) ; classHolder -?methodBooleanValue@@3PAU_jmethodID@@A DD 01H DUP (?) ; methodBooleanValue -?methodIntValue@@3PAU_jmethodID@@A DD 01H DUP (?) ; methodIntValue -?newIntegerInt@@3PAU_jmethodID@@A DD 01H DUP (?) ; newIntegerInt -?newBooleanBoolean@@3PAU_jmethodID@@A DD 01H DUP (?) ; newBooleanBoolean -_BSS ENDS -PUBLIC ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ ; `string' -PUBLIC ??_C@_08JJOG@function?$AA@ ; `string' -PUBLIC ??_C@_06CODG@module?$AA@ ; `string' -PUBLIC ??_C@_01FLOP@I?$AA@ ; `string' -PUBLIC ??_C@_0P@LKIL@functionHandle?$AA@ ; `string' -PUBLIC ??_C@_0N@EFAA@moduleHandle?$AA@ ; `string' -PUBLIC ??_C@_0O@OMHL@lastErrorCode?$AA@ ; `string' -PUBLIC ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ ; `string' -PUBLIC ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ ; `string' -PUBLIC ??_C@_01PGHN@o?$AA@ ; `string' -PUBLIC ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ ; `string' -PUBLIC ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ ; `string' -PUBLIC ??_C@_0BB@LLFN@java?1lang?1String?$AA@ ; `string' -PUBLIC ??_C@_02LOEJ@?$FLB?$AA@ ; `string' -PUBLIC ??_C@_02BENO@?$FLC?$AA@ ; `string' -PUBLIC ??_C@_03KJOK@?$CI?$CJZ?$AA@ ; `string' -PUBLIC ??_C@_0N@KEBP@booleanValue?$AA@ ; `string' -PUBLIC ??_C@_03PPCD@?$CI?$CJI?$AA@ ; `string' -PUBLIC ??_C@_08JCMA@intValue?$AA@ ; `string' -PUBLIC ??_C@_04ECLF@?$CII?$CJV?$AA@ ; `string' -PUBLIC ??_C@_06KILP@?$DMinit?$DO?$AA@ ; `string' -PUBLIC ??_C@_04JFOE@?$CIZ?$CJV?$AA@ ; `string' -PUBLIC _Java_com_eaio_nativecall_NativeCall_initIDs@8 -; COMDAT ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ -; File C:\Program Files\IBMJava13\include\jni.h -_DATA SEGMENT -??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ DB 'Ljava/lang/String;', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_08JJOG@function?$AA@ -_DATA SEGMENT -??_C@_08JJOG@function?$AA@ DB 'function', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_06CODG@module?$AA@ -_DATA SEGMENT -??_C@_06CODG@module?$AA@ DB 'module', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_01FLOP@I?$AA@ -_DATA SEGMENT -??_C@_01FLOP@I?$AA@ DB 'I', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0P@LKIL@functionHandle?$AA@ -_DATA SEGMENT -??_C@_0P@LKIL@functionHandle?$AA@ DB 'functionHandle', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0N@EFAA@moduleHandle?$AA@ -_DATA SEGMENT -??_C@_0N@EFAA@moduleHandle?$AA@ DB 'moduleHandle', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0O@OMHL@lastErrorCode?$AA@ -_DATA SEGMENT -??_C@_0O@OMHL@lastErrorCode?$AA@ DB 'lastErrorCode', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ -_DATA SEGMENT -??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ DB 'com/eaio/nativecall' - DB '/Holder', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ -_DATA SEGMENT -??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ DB 'Ljava/lang/Object;', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_01PGHN@o?$AA@ -_DATA SEGMENT -??_C@_01PGHN@o?$AA@ DB 'o', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ -_DATA SEGMENT -??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ DB 'java/lang/Boolean', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ -_DATA SEGMENT -??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ DB 'java/lang/Integer', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0BB@LLFN@java?1lang?1String?$AA@ -_DATA SEGMENT -??_C@_0BB@LLFN@java?1lang?1String?$AA@ DB 'java/lang/String', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_02LOEJ@?$FLB?$AA@ -_DATA SEGMENT -??_C@_02LOEJ@?$FLB?$AA@ DB '[B', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_02BENO@?$FLC?$AA@ -_DATA SEGMENT -??_C@_02BENO@?$FLC?$AA@ DB '[C', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_03KJOK@?$CI?$CJZ?$AA@ -_DATA SEGMENT -??_C@_03KJOK@?$CI?$CJZ?$AA@ DB '()Z', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_0N@KEBP@booleanValue?$AA@ -_DATA SEGMENT -??_C@_0N@KEBP@booleanValue?$AA@ DB 'booleanValue', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_03PPCD@?$CI?$CJI?$AA@ -_DATA SEGMENT -??_C@_03PPCD@?$CI?$CJI?$AA@ DB '()I', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_08JCMA@intValue?$AA@ -_DATA SEGMENT -??_C@_08JCMA@intValue?$AA@ DB 'intValue', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_04ECLF@?$CII?$CJV?$AA@ -_DATA SEGMENT -??_C@_04ECLF@?$CII?$CJV?$AA@ DB '(I)V', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_06KILP@?$DMinit?$DO?$AA@ -_DATA SEGMENT -??_C@_06KILP@?$DMinit?$DO?$AA@ DB '', 00H ; `string' -_DATA ENDS -; COMDAT ??_C@_04JFOE@?$CIZ?$CJV?$AA@ -_DATA SEGMENT -??_C@_04JFOE@?$CIZ?$CJV?$AA@ DB '(Z)V', 00H ; `string' -_DATA ENDS -_TEXT SEGMENT -_env$ = 8 -_cls$ = 12 -_Java_com_eaio_nativecall_NativeCall_initIDs@8 PROC NEAR - -; 71 : (JNIEnv *env, jclass cls) { - - push ebx - -; 72 : -; 73 : // NativeCall fields -; 74 : -; 75 : fieldFunction = env->GetFieldID(cls, "function", "Ljava/lang/String;"); - - mov ebx, DWORD PTR _cls$[esp] - push esi - mov esi, DWORD PTR _env$[esp+4] - push edi - mov edi, OFFSET FLAT:??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ ; `string' - mov eax, DWORD PTR [esi] - push edi - push OFFSET FLAT:??_C@_08JJOG@function?$AA@ ; `string' - push ebx - push esi - call DWORD PTR [eax+376] - -; 76 : fieldModule = env->GetFieldID(cls, "module", "Ljava/lang/String;"); - - push edi - mov DWORD PTR ?fieldFunction@@3PAU_jfieldID@@A, eax ; fieldFunction - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_06CODG@module?$AA@ ; `string' - push ebx - push esi - call DWORD PTR [eax+376] - -; 77 : -; 78 : fieldFunctionHandle = env->GetFieldID(cls, "functionHandle", "I"); - - mov edi, OFFSET FLAT:??_C@_01FLOP@I?$AA@ ; `string' - mov DWORD PTR ?fieldModule@@3PAU_jfieldID@@A, eax ; fieldModule - mov eax, DWORD PTR [esi] - push edi - push OFFSET FLAT:??_C@_0P@LKIL@functionHandle?$AA@ ; `string' - push ebx - push esi - call DWORD PTR [eax+376] - -; 79 : fieldModuleHandle = env-> GetFieldID(cls, "moduleHandle", "I"); - - push edi - mov DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A, eax ; fieldFunctionHandle - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0N@EFAA@moduleHandle?$AA@ ; `string' - push ebx - push esi - call DWORD PTR [eax+376] - -; 80 : -; 81 : fieldLastErrorCode = env->GetFieldID(cls, "lastErrorCode", "I"); - - push edi - mov DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A, eax ; fieldModuleHandle - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0O@OMHL@lastErrorCode?$AA@ ; `string' - push ebx - push esi - call DWORD PTR [eax+376] - mov DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A, eax ; fieldLastErrorCode - -; 82 : -; 83 : // Holder fields -; 84 : -; 85 : classHolder = (jclass) env->NewGlobalRef(env->FindClass("com/eaio/nativecall/Holder")); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push eax - push esi - call DWORD PTR [ecx+84] - -; 86 : fieldHolderO = env->GetFieldID(classHolder, "o", "Ljava/lang/Object;"); - - mov ecx, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ ; `string' - push OFFSET FLAT:??_C@_01PGHN@o?$AA@ ; `string' - push eax - push esi - mov DWORD PTR ?classHolder@@3PAV_jclass@@A, eax ; classHolder - call DWORD PTR [ecx+376] - mov DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A, eax ; fieldHolderO - -; 87 : -; 88 : // Other classes -; 89 : -; 90 : classBoolean = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Boolean")); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push eax - push esi - call DWORD PTR [ecx+84] - mov DWORD PTR ?classBoolean@@3PAV_jclass@@A, eax ; classBoolean - -; 91 : /*classByte = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Byte")); -; 92 : classCharacter = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Character")); -; 93 : classShort = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Short"));*/ -; 94 : classInteger = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Integer")); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push eax - push esi - call DWORD PTR [ecx+84] - mov DWORD PTR ?classInteger@@3PAV_jclass@@A, eax ; classInteger - -; 95 : /*classLong = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Long")); -; 96 : classFloat = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Float")); -; 97 : classDouble = (jclass) env->NewGlobalRef(env->FindClass("java/lang/Double"));*/ -; 98 : classString = (jclass) env->NewGlobalRef(env->FindClass("java/lang/String")); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BB@LLFN@java?1lang?1String?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push eax - push esi - call DWORD PTR [ecx+84] - mov DWORD PTR ?classString@@3PAV_jclass@@A, eax ; classString - -; 99 : classByteArray = (jclass) env->NewGlobalRef(env->FindClass("[B")); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_02LOEJ@?$FLB?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push eax - push esi - call DWORD PTR [ecx+84] - mov DWORD PTR ?classByteArray@@3PAV_jclass@@A, eax ; classByteArray - -; 100 : classCharArray = (jclass) env->NewGlobalRef(env->FindClass("[C")); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_02BENO@?$FLC?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push eax - push esi - call DWORD PTR [ecx+84] - -; 101 : /*classIntArray = (jclass) env->NewGlobalRef(env->FindClass("[I"));*/ -; 102 : -; 103 : // Wrapper class methods -; 104 : -; 105 : methodBooleanValue = env->GetMethodID(classBoolean, -; 106 : "booleanValue", "()Z"); - - mov ecx, DWORD PTR [esi] - mov DWORD PTR ?classCharArray@@3PAV_jclass@@A, eax ; classCharArray - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push OFFSET FLAT:??_C@_03KJOK@?$CI?$CJZ?$AA@ ; `string' - push OFFSET FLAT:??_C@_0N@KEBP@booleanValue?$AA@ ; `string' - push eax - push esi - call DWORD PTR [ecx+132] - -; 107 : /*methodByteValue = env->GetMethodID(classByte, -; 108 : "byteValue", "()B"); -; 109 : methodCharValue = env->GetMethodID(classCharacter, -; 110 : "charValue", "()C"); -; 111 : methodShortValue = env->GetMethodID(classShort, -; 112 : "shortValue", "()S");*/ -; 113 : methodIntValue = env->GetMethodID(classInteger, -; 114 : "intValue", "()I"); - - mov ecx, DWORD PTR [esi] - mov DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A, eax ; methodBooleanValue - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push OFFSET FLAT:??_C@_03PPCD@?$CI?$CJI?$AA@ ; `string' - push OFFSET FLAT:??_C@_08JCMA@intValue?$AA@ ; `string' - push eax - push esi - call DWORD PTR [ecx+132] - -; 115 : /*methodLongValue = env->GetMethodID(classLong, -; 116 : "longValue", "()J"); -; 117 : methodFloatValue = env->GetMethodID(classFloat, -; 118 : "floatValue", "()F"); -; 119 : methodDoubleValue = env->GetMethodID(classDouble, -; 120 : "doubleValue", "()D");*/ -; 121 : -; 122 : // Constructors -; 123 : -; 124 : newIntegerInt = env->GetMethodID(classInteger, "", "(I)V"); - - mov ecx, DWORD PTR [esi] - mov DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A, eax ; methodIntValue - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - mov edi, OFFSET FLAT:??_C@_06KILP@?$DMinit?$DO?$AA@ ; `string' - push OFFSET FLAT:??_C@_04ECLF@?$CII?$CJV?$AA@ ; `string' - push edi - push eax - push esi - call DWORD PTR [ecx+132] - -; 125 : newBooleanBoolean = env->GetMethodID(classBoolean, "", "(Z)V"); - - mov ecx, DWORD PTR [esi] - mov DWORD PTR ?newIntegerInt@@3PAU_jmethodID@@A, eax ; newIntegerInt - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - push OFFSET FLAT:??_C@_04JFOE@?$CIZ?$CJV?$AA@ ; `string' - push edi - push eax - push esi - call DWORD PTR [ecx+132] - pop edi - pop esi - mov DWORD PTR ?newBooleanBoolean@@3PAU_jmethodID@@A, eax ; newBooleanBoolean - pop ebx - -; 126 : -; 127 : } - - ret 8 -_Java_com_eaio_nativecall_NativeCall_initIDs@8 ENDP -_TEXT ENDS -PUBLIC _Java_com_eaio_nativecall_NativeCall_initHandles@8 -EXTRN __imp__LoadLibraryA@4:NEAR -EXTRN __imp__GetLastError@0:NEAR -EXTRN __imp__FreeLibrary@4:NEAR -EXTRN __imp__GetProcAddress@8:NEAR -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_out$ = -1 -_moduleNameS$ = 12 -_functionNameS$ = -12 -_moduleName$ = 8 -_functionName$ = -8 -_addr$27794 = -16 -_Java_com_eaio_nativecall_NativeCall_initHandles@8 PROC NEAR - -; 135 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - sub esp, 16 ; 00000010H - -; 136 : -; 137 : bool out = JNI_TRUE; -; 138 : -; 139 : jstring moduleNameS = (jstring) env->GetObjectField(obj, fieldModule); - - mov eax, DWORD PTR ?fieldModule@@3PAU_jfieldID@@A ; fieldModule - push ebx - push esi - mov esi, DWORD PTR _env$[ebp] - push edi - mov edi, DWORD PTR _obj$[ebp] - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - mov BYTE PTR _out$[ebp], 1 - call DWORD PTR [ecx+380] - -; 140 : jstring functionNameS = (jstring) env->GetObjectField(obj, fieldFunction); - - mov ecx, DWORD PTR [esi] - mov DWORD PTR _moduleNameS$[ebp], eax - mov eax, DWORD PTR ?fieldFunction@@3PAU_jfieldID@@A ; fieldFunction - push eax - push edi - push esi - call DWORD PTR [ecx+380] - -; 141 : -; 142 : const char* moduleName = env->GetStringUTFChars(moduleNameS, 0); - - push 0 - mov DWORD PTR _functionNameS$[ebp], eax - push DWORD PTR _moduleNameS$[ebp] - mov eax, DWORD PTR [esi] - push esi - call DWORD PTR [eax+676] - -; 143 : const char* functionName = env->GetStringUTFChars(functionNameS, 0); - - push 0 - mov DWORD PTR _moduleName$[ebp], eax - push DWORD PTR _functionNameS$[ebp] - mov eax, DWORD PTR [esi] - push esi - call DWORD PTR [eax+676] - -; 144 : -; 145 : #ifdef _WINDOWS -; 146 : -; 147 : HMODULE mod = LoadLibrary(moduleName); - - push DWORD PTR _moduleName$[ebp] - mov DWORD PTR _functionName$[ebp], eax - call DWORD PTR __imp__LoadLibraryA@4 - mov ebx, eax - -; 148 : -; 149 : if (mod == NULL) { - - test ebx, ebx - jne SHORT $L27792 -$L27990: - -; 150 : /* no such module or DllMain returned FALSE */ -; 151 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - call DWORD PTR __imp__GetLastError@0 - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push edi - push esi - call DWORD PTR [ecx+436] - -; 152 : out = JNI_FALSE; - - and BYTE PTR _out$[ebp], 0 - -; 153 : } -; 154 : else { - - jmp SHORT $L27982 -$L27792: - -; 155 : FARPROC addr = GetProcAddress(mod, functionName); - - push DWORD PTR _functionName$[ebp] - push ebx - call DWORD PTR __imp__GetProcAddress@8 - -; 156 : if (addr == NULL) { - - test eax, eax - mov DWORD PTR _addr$27794[ebp], eax - jne SHORT $L27795 - -; 157 : /* function not found */ -; 158 : FreeLibrary(mod); - - push ebx - call DWORD PTR __imp__FreeLibrary@4 - -; 159 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); -; 160 : out = JNI_FALSE; -; 161 : } -; 162 : else { - - jmp SHORT $L27990 -$L27795: - -; 163 : /* all ok */ -; 164 : env->SetIntField(obj, fieldModuleHandle, (jint) mod); - - mov eax, DWORD PTR [esi] - push ebx - push DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle - push edi - push esi - call DWORD PTR [eax+436] - -; 165 : env->SetIntField(obj, fieldFunctionHandle, (jint) addr); - - push DWORD PTR _addr$27794[ebp] - mov eax, DWORD PTR [esi] - push DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push edi - push esi - call DWORD PTR [eax+436] -$L27982: - -; 166 : } -; 167 : } -; 168 : -; 169 : #endif -; 170 : -; 171 : env->ReleaseStringUTFChars(moduleNameS, moduleName); - - push DWORD PTR _moduleName$[ebp] - mov eax, DWORD PTR [esi] - push DWORD PTR _moduleNameS$[ebp] - push esi - call DWORD PTR [eax+680] - -; 172 : env->ReleaseStringUTFChars(functionNameS, functionName); - - push DWORD PTR _functionName$[ebp] - mov eax, DWORD PTR [esi] - push DWORD PTR _functionNameS$[ebp] - push esi - call DWORD PTR [eax+680] - -; 173 : -; 174 : return out; - - mov al, BYTE PTR _out$[ebp] - pop edi - pop esi - pop ebx - -; 175 : -; 176 : } - - leave - ret 8 -_Java_com_eaio_nativecall_NativeCall_initHandles@8 ENDP -_TEXT ENDS -PUBLIC _Java_com_eaio_nativecall_NativeCall_getLastError@8 -EXTRN __imp__FormatMessageA@28:NEAR -EXTRN __imp__LocalFree@4:NEAR -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_msgBufPtr$ = 8 -_Java_com_eaio_nativecall_NativeCall_getLastError@8 PROC NEAR - -; 184 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - -; 185 : -; 186 : jint lastError = env->GetIntField(obj, fieldLastErrorCode); - - mov eax, DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push esi - mov esi, DWORD PTR _env$[ebp] - push eax - push DWORD PTR _obj$[ebp] - mov ecx, DWORD PTR [esi] - push esi - call DWORD PTR [ecx+400] - -; 187 : -; 188 : if (lastError == 0) return NULL; - - xor ecx, ecx - cmp eax, ecx - jne SHORT $L27804 - xor eax, eax - jmp SHORT $L27802 -$L27804: - -; 189 : -; 190 : jstring out = NULL; -; 191 : -; 192 : #ifdef _WINDOWS -; 193 : -; 194 : LPVOID msgBufPtr = NULL; -; 195 : FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | -; 196 : FORMAT_MESSAGE_FROM_SYSTEM, NULL, lastError, 0, -; 197 : (LPSTR) &msgBufPtr, 0, NULL); - - push ecx - lea edx, DWORD PTR _msgBufPtr$[ebp] - push ecx - push edx - push ecx - push eax - push ecx - push 4352 ; 00001100H - mov DWORD PTR _msgBufPtr$[ebp], ecx - call DWORD PTR __imp__FormatMessageA@28 - -; 198 : -; 199 : out = env->NewStringUTF((char*) msgBufPtr); - - push DWORD PTR _msgBufPtr$[ebp] - mov eax, DWORD PTR [esi] - push esi - call DWORD PTR [eax+668] - -; 200 : -; 201 : LocalFree(msgBufPtr); - - push DWORD PTR _msgBufPtr$[ebp] - mov esi, eax - call DWORD PTR __imp__LocalFree@4 - -; 202 : -; 203 : #endif -; 204 : -; 205 : return out; - - mov eax, esi -$L27802: - pop esi - -; 206 : -; 207 : } - - pop ebp - ret 8 -_Java_com_eaio_nativecall_NativeCall_getLastError@8 ENDP -_TEXT ENDS -PUBLIC _Java_com_eaio_nativecall_NativeCall_destroy@8 -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_Java_com_eaio_nativecall_NativeCall_destroy@8 PROC NEAR - -; 216 : -; 217 : jint module = env->GetIntField(obj, fieldModuleHandle); - - mov eax, DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle - push esi - mov esi, DWORD PTR _env$[esp] - push edi - mov edi, DWORD PTR _obj$[esp+4] - push eax - mov ecx, DWORD PTR [esi] - push edi - push esi - call DWORD PTR [ecx+400] - -; 218 : -; 219 : if (module == 0) return; - - test eax, eax - je SHORT $L28016 - -; 220 : -; 221 : #ifdef _WINDOWS -; 222 : -; 223 : if (FreeLibrary((HMODULE) module) == 0) { - - push eax - call DWORD PTR __imp__FreeLibrary@4 - test eax, eax - jne SHORT $L28007 - -; 224 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - call DWORD PTR __imp__GetLastError@0 - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push edi - push esi - call DWORD PTR [ecx+436] -$L28007: - -; 225 : } -; 226 : -; 227 : #endif -; 228 : -; 229 : env->SetIntField(obj, fieldModuleHandle, 0); - - mov eax, DWORD PTR [esi] - push 0 - push DWORD PTR ?fieldModuleHandle@@3PAU_jfieldID@@A ; fieldModuleHandle - push edi - push esi - call DWORD PTR [eax+436] - -; 230 : env->SetIntField(obj, fieldFunctionHandle, 0); - - mov eax, DWORD PTR [esi] - push 0 - push DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push edi - push esi - call DWORD PTR [eax+436] -$L28016: - pop edi - pop esi - -; 231 : -; 232 : return; -; 233 : -; 234 : } - - ret 8 -_Java_com_eaio_nativecall_NativeCall_destroy@8 ENDP -_TEXT ENDS -END diff --git a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.dll b/vendor/nativecall/0.4.1/cpp/Release/NativeCall.dll deleted file mode 100644 index 6e2cad1..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.dll and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.map b/vendor/nativecall/0.4.1/cpp/Release/NativeCall.map deleted file mode 100644 index e31a069..0000000 --- a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.map +++ /dev/null @@ -1,101 +0,0 @@ - NativeCall - - Timestamp is 44472064 (Thu Apr 20 07:47:16 2006) - - Preferred load address is 10000000 - - Start Length Name Class - 0001:00000000 00000028H .idata$5 CODE - 0001:00000030 00000d1eH .text CODE - 0001:00000d50 00000014H .idata$2 CODE - 0001:00000d64 00000014H .idata$3 CODE - 0001:00000d78 00000028H .idata$4 CODE - 0001:00000da0 00000096H .idata$6 CODE - 0001:00000e40 00000212H .edata CODE - 0002:00000000 00000004H .CRT$XCA DATA - 0002:00000004 00000004H .CRT$XCZ DATA - 0002:00000010 00000130H .data DATA - 0002:00000140 0000004cH .bss DATA - 0003:00000000 00000058H .rsrc$01 DATA - 0003:00000060 000002b0H .rsrc$02 DATA - - Address Publics by Value Rva+Base Lib:Object - - 0001:00000000 __imp__FormatMessageA@28 10001000 kernel32:KERNEL32.dll - 0001:00000004 __imp__FreeLibrary@4 10001004 kernel32:KERNEL32.dll - 0001:00000008 __imp__GetProcAddress@8 10001008 kernel32:KERNEL32.dll - 0001:0000000c __imp__LoadLibraryA@4 1000100c kernel32:KERNEL32.dll - 0001:00000010 __imp__LocalFree@4 10001010 kernel32:KERNEL32.dll - 0001:00000014 __imp__GetLastError@0 10001014 kernel32:KERNEL32.dll - 0001:00000018 __imp__HeapAlloc@12 10001018 kernel32:KERNEL32.dll - 0001:0000001c __imp__GetProcessHeap@0 1000101c kernel32:KERNEL32.dll - 0001:00000020 __imp__HeapFree@12 10001020 kernel32:KERNEL32.dll - 0001:00000024 \177KERNEL32_NULL_THUNK_DATA 10001024 kernel32:KERNEL32.dll - 0001:00000030 _Java_com_eaio_nativecall_IntCall_executeCall@8 10001030 f IntCall.obj - 0001:00000074 _Java_com_eaio_nativecall_IntCall_executeCall0@12 10001074 f IntCall.obj - 0001:0000045e ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ 1000145e f i IntCall.obj - 0001:00000476 ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ 10001476 f i IntCall.obj - 0001:00000491 ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ 10001491 f i IntCall.obj - 0001:000004ac _Java_com_eaio_nativecall_NativeCall_initIDs@8 100014ac f NativeCall.obj - 0001:00000648 _Java_com_eaio_nativecall_NativeCall_initHandles@8 10001648 f NativeCall.obj - 0001:00000735 _Java_com_eaio_nativecall_NativeCall_getLastError@8 10001735 f NativeCall.obj - 0001:0000078d _Java_com_eaio_nativecall_NativeCall_destroy@8 1000178d f NativeCall.obj - 0001:000007f6 _Java_com_eaio_nativecall_VoidCall_executeCall@8 100017f6 f VoidCall.obj - 0001:00000833 _Java_com_eaio_nativecall_VoidCall_executeCall0@12 10001833 f VoidCall.obj - 0001:00000c15 ??2@YAPAXI@Z 10001c15 f libctiny:NEWDEL.OBJ - 0001:00000c29 ??3@YAXPAX@Z 10001c29 f libctiny:NEWDEL.OBJ - 0001:00000c3d __DllMainCRTStartup@12 10001c3d f libctiny:DLLCRT0.OBJ - 0001:00000c7f ?_initterm@@YAXPAP6AXXZ0@Z 10001c7f f libctiny:INITTERM.OBJ - 0001:00000c99 ?_atexit_init@@YAXXZ 10001c99 f libctiny:INITTERM.OBJ - 0001:00000cb1 ?_DoExit@@YAXXZ 10001cb1 f libctiny:INITTERM.OBJ - 0001:00000ccd _calloc 10001ccd f libctiny:ALLOC2.OBJ - 0001:00000cf0 _memset 10001cf0 f libcmt:memset.obj - 0001:00000d48 _DllMain@12 10001d48 f libcmt:dllmain.obj - 0001:00000d50 __IMPORT_DESCRIPTOR_KERNEL32 10001d50 kernel32:KERNEL32.dll - 0001:00000d64 __NULL_IMPORT_DESCRIPTOR 10001d64 kernel32:KERNEL32.dll - 0002:00000000 ?__xc_a@@3PAP6AXXZA 10003000 libctiny:INITTERM.OBJ - 0002:00000004 ?__xc_z@@3PAP6AXXZA 10003004 libctiny:INITTERM.OBJ - 0002:00000010 ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ 10003010 IntCall.obj - 0002:0000002c ??_C@_04JFOE@?$CIZ?$CJV?$AA@ 1000302c NativeCall.obj - 0002:00000034 ??_C@_04ECLF@?$CII?$CJV?$AA@ 10003034 NativeCall.obj - 0002:0000003c ??_C@_06KILP@?$DMinit?$DO?$AA@ 1000303c NativeCall.obj - 0002:00000044 ??_C@_08JCMA@intValue?$AA@ 10003044 NativeCall.obj - 0002:00000050 ??_C@_03PPCD@?$CI?$CJI?$AA@ 10003050 NativeCall.obj - 0002:00000054 ??_C@_0N@KEBP@booleanValue?$AA@ 10003054 NativeCall.obj - 0002:00000064 ??_C@_03KJOK@?$CI?$CJZ?$AA@ 10003064 NativeCall.obj - 0002:00000068 ??_C@_02BENO@?$FLC?$AA@ 10003068 NativeCall.obj - 0002:0000006c ??_C@_02LOEJ@?$FLB?$AA@ 1000306c NativeCall.obj - 0002:00000070 ??_C@_0BB@LLFN@java?1lang?1String?$AA@ 10003070 NativeCall.obj - 0002:00000084 ??_C@_0BC@FBKL@java?1lang?1Integer?$AA@ 10003084 NativeCall.obj - 0002:00000098 ??_C@_0BC@IGNJ@java?1lang?1Boolean?$AA@ 10003098 NativeCall.obj - 0002:000000ac ??_C@_01PGHN@o?$AA@ 100030ac NativeCall.obj - 0002:000000b0 ??_C@_0BD@GEDI@Ljava?1lang?1Object?$DL?$AA@ 100030b0 NativeCall.obj - 0002:000000c4 ??_C@_0BL@DALH@com?1eaio?1nativecall?1Holder?$AA@ 100030c4 NativeCall.obj - 0002:000000e0 ??_C@_0O@OMHL@lastErrorCode?$AA@ 100030e0 NativeCall.obj - 0002:000000f0 ??_C@_0N@EFAA@moduleHandle?$AA@ 100030f0 NativeCall.obj - 0002:00000100 ??_C@_0P@LKIL@functionHandle?$AA@ 10003100 NativeCall.obj - 0002:00000110 ??_C@_01FLOP@I?$AA@ 10003110 NativeCall.obj - 0002:00000114 ??_C@_06CODG@module?$AA@ 10003114 NativeCall.obj - 0002:0000011c ??_C@_08JJOG@function?$AA@ 1000311c NativeCall.obj - 0002:00000128 ??_C@_0BD@DFD@Ljava?1lang?1String?$DL?$AA@ 10003128 NativeCall.obj - 0002:00000140 ?classString@@3PAV_jclass@@A 10003140 NativeCall.obj - 0002:00000144 ?fieldFunctionHandle@@3PAU_jfieldID@@A 10003144 NativeCall.obj - 0002:00000148 ?newIntegerInt@@3PAU_jmethodID@@A 10003148 NativeCall.obj - 0002:0000014c ?classCharArray@@3PAV_jclass@@A 1000314c NativeCall.obj - 0002:00000150 ?fieldFunction@@3PAU_jfieldID@@A 10003150 NativeCall.obj - 0002:00000154 ?classInteger@@3PAV_jclass@@A 10003154 NativeCall.obj - 0002:00000158 ?newBooleanBoolean@@3PAU_jmethodID@@A 10003158 NativeCall.obj - 0002:0000015c ?classBoolean@@3PAV_jclass@@A 1000315c NativeCall.obj - 0002:00000160 ?fieldModule@@3PAU_jfieldID@@A 10003160 NativeCall.obj - 0002:00000164 ?fieldModuleHandle@@3PAU_jfieldID@@A 10003164 NativeCall.obj - 0002:00000168 ?classHolder@@3PAV_jclass@@A 10003168 NativeCall.obj - 0002:0000016c ?fieldLastErrorCode@@3PAU_jfieldID@@A 1000316c NativeCall.obj - 0002:00000170 ?classByteArray@@3PAV_jclass@@A 10003170 NativeCall.obj - 0002:00000174 ?fieldHolderO@@3PAU_jfieldID@@A 10003174 NativeCall.obj - 0002:00000178 ?methodBooleanValue@@3PAU_jmethodID@@A 10003178 NativeCall.obj - 0002:0000017c ?methodIntValue@@3PAU_jmethodID@@A 1000317c NativeCall.obj - - entry point at 0001:00000c3d - - Static symbols - diff --git a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.obj b/vendor/nativecall/0.4.1/cpp/Release/NativeCall.obj deleted file mode 100644 index 44a1efa..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Release/NativeCall.obj and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Release/RCa01380 b/vendor/nativecall/0.4.1/cpp/Release/RCa01380 deleted file mode 100644 index eb8e4b1..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Release/RCa01380 and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/Release/VoidCall.asm b/vendor/nativecall/0.4.1/cpp/Release/VoidCall.asm deleted file mode 100644 index 9e91a33..0000000 --- a/vendor/nativecall/0.4.1/cpp/Release/VoidCall.asm +++ /dev/null @@ -1,919 +0,0 @@ - TITLE C:\Documents and Settings\Administrator\My Documents\Software\NativeCall\src\cpp\VoidCall.cpp - .386P -include listing.inc -if @Version gt 510 -.model FLAT -else -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -CONST SEGMENT DWORD USE32 PUBLIC 'CONST' -CONST ENDS -_BSS SEGMENT DWORD USE32 PUBLIC 'BSS' -_BSS ENDS -_TLS SEGMENT DWORD USE32 PUBLIC 'TLS' -_TLS ENDS -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -_DATA SEGMENT DWORD USE32 PUBLIC 'DATA' -_DATA ENDS -; COMDAT ?FindClass@JNIEnv_@@QAEPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ThrowNew@JNIEnv_@@QAEJPAV_jclass@@PBD@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?IsInstanceOf@JNIEnv_@@QAEEPAV_jobject@@PAV_jclass@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectField@JNIEnv_@@QAEPAV_jobject@@PAV2@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetIntField@JNIEnv_@@QAEJPAV_jobject@@PAU_jfieldID@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetObjectField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@0@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?SetIntField@JNIEnv_@@QAEXPAV_jobject@@PAU_jfieldID@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetArrayLength@JNIEnv_@@QAEJPAV_jarray@@@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetObjectArrayElement@JNIEnv_@@QAEPAV_jobject@@PAV_jobjectArray@@J@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?GetPrimitiveArrayCritical@JNIEnv_@@QAEPAXPAV_jarray@@PAE@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -; COMDAT ?ReleasePrimitiveArrayCritical@JNIEnv_@@QAEXPAV_jarray@@PAXJ@Z -_TEXT SEGMENT PARA USE32 PUBLIC 'CODE' -_TEXT ENDS -FLAT GROUP _DATA, CONST, _BSS - ASSUME CS: FLAT, DS: FLAT, SS: FLAT -endif -PUBLIC _Java_com_eaio_nativecall_VoidCall_executeCall@8 -EXTRN ?fieldFunctionHandle@@3PAU_jfieldID@@A:DWORD ; fieldFunctionHandle -EXTRN ?fieldLastErrorCode@@3PAU_jfieldID@@A:DWORD ; fieldLastErrorCode -EXTRN __imp__GetLastError@0:NEAR -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_functionHandle$ = 8 -_Java_com_eaio_nativecall_VoidCall_executeCall@8 PROC NEAR - -; 79 : (JNIEnv *env, jobject obj) { - - push ebp - mov ebp, esp - -; 80 : -; 81 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - push esi - mov esi, DWORD PTR _env$[ebp] - push eax - push DWORD PTR _obj$[ebp] - mov ecx, DWORD PTR [esi] - push esi - call DWORD PTR [ecx+400] - mov DWORD PTR _functionHandle$[ebp], eax - -; 82 : -; 83 : #ifdef _WINDOWS -; 84 : #ifdef _X86_ -; 85 : -; 86 : __asm { -; 87 : -; 88 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 89 : -; 90 : } -; 91 : -; 92 : #endif -; 93 : #endif -; 94 : -; 95 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - call DWORD PTR __imp__GetLastError@0 - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push DWORD PTR _obj$[ebp] - push esi - call DWORD PTR [ecx+436] - -; 96 : -; 97 : } - - pop esi - pop ebp - ret 8 -_Java_com_eaio_nativecall_VoidCall_executeCall@8 ENDP -_TEXT ENDS -PUBLIC ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' -PUBLIC _Java_com_eaio_nativecall_VoidCall_executeCall0@12 -PUBLIC ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject -PUBLIC ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod -PUBLIC ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod -EXTRN ?fieldHolderO@@3PAU_jfieldID@@A:DWORD ; fieldHolderO -EXTRN ?classBoolean@@3PAV_jclass@@A:DWORD ; classBoolean -EXTRN ?classInteger@@3PAV_jclass@@A:DWORD ; classInteger -EXTRN ?classByteArray@@3PAV_jclass@@A:DWORD ; classByteArray -EXTRN ?classCharArray@@3PAV_jclass@@A:DWORD ; classCharArray -EXTRN ?classHolder@@3PAV_jclass@@A:DWORD ; classHolder -EXTRN ?methodBooleanValue@@3PAU_jmethodID@@A:DWORD ; methodBooleanValue -EXTRN ?methodIntValue@@3PAU_jmethodID@@A:DWORD ; methodIntValue -EXTRN ?newIntegerInt@@3PAU_jmethodID@@A:DWORD ; newIntegerInt -EXTRN ?newBooleanBoolean@@3PAU_jmethodID@@A:DWORD ; newBooleanBoolean -EXTRN ??2@YAPAXI@Z:NEAR ; operator new -EXTRN ??3@YAXPAX@Z:NEAR ; operator delete -EXTRN _memset:NEAR -; COMDAT ??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ -; File C:\Program Files\IBMJava13\include\jni.h -_DATA SEGMENT -??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ DB 'java/lang/OutOfMemor' - DB 'yError', 00H ; `string' -_DATA ENDS -_TEXT SEGMENT -_env$ = 8 -_obj$ = 12 -_params$ = 16 -_len$ = -28 -_arrays$ = -20 -_param$ = -24 -_i$ = 8 -_intArg$27769 = -24 -_byteArrayArg$27772 = -4 -_charArrayArg$27778 = -8 -_tempArg$27785 = -24 -_intPtr$27790 = -24 -_byteArrayArg$27796 = -12 -_charArrayArg$27802 = -16 -_tempPtr$27809 = -24 -_functionHandle$ = 8 -_j$ = 8 -_Java_com_eaio_nativecall_VoidCall_executeCall0@12 PROC NEAR - -; 105 : (JNIEnv *env, jobject obj, jobjectArray params) { - - push ebp - mov ebp, esp - sub esp, 28 ; 0000001cH - push ebx - push esi - -; 106 : -; 107 : const int len = env->GetArrayLength(params); - - mov esi, DWORD PTR _env$[ebp] - push edi - push DWORD PTR _params$[ebp] - mov eax, DWORD PTR [esi] - push esi - call DWORD PTR [eax+684] - mov ebx, eax - -; 108 : -; 109 : int* arrays = NULL; -; 110 : if (!(arrays = new int[len])) { - - mov edi, ebx - mov DWORD PTR _len$[ebp], ebx - shl edi, 2 - push edi - call ??2@YAPAXI@Z ; operator new - test eax, eax - pop ecx - mov DWORD PTR _arrays$[ebp], eax - jne SHORT $L27758 - -; 111 : env->ThrowNew(env->FindClass("java/lang/OutOfMemoryError"), NULL); - - mov eax, DWORD PTR [esi] - push OFFSET FLAT:??_C@_0BL@NKOM@java?1lang?1OutOfMemoryError?$AA@ ; `string' - push esi - call DWORD PTR [eax+24] - mov ecx, DWORD PTR [esi] - push 0 - push eax - push esi - call DWORD PTR [ecx+56] - -; 112 : return; - - jmp $L28021 -$L27758: - -; 113 : } -; 114 : memset(arrays, 0, (sizeof(int) * len)); - - push edi - push 0 - push eax - call _memset - -; 115 : -; 116 : jobject param; -; 117 : -; 118 : for (int i = len - 1; i >= 0; i--) { - - lea eax, DWORD PTR [ebx-1] - add esp, 12 ; 0000000cH - test eax, eax - mov DWORD PTR _i$[ebp], eax - jl $L27765 - mov ecx, DWORD PTR _arrays$[ebp] - lea edi, DWORD PTR [ecx+eax*4] - jmp SHORT $L27763 -$L28028: - -; 113 : } -; 114 : memset(arrays, 0, (sizeof(int) * len)); - - mov eax, DWORD PTR _i$[ebp] -$L27763: - -; 119 : -; 120 : param = env->GetObjectArrayElement(params, i); - - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR _params$[ebp] - push esi - call DWORD PTR [ecx+692] - mov ebx, eax - -; 121 : -; 122 : if (param == NULL) { - - test ebx, ebx - jne SHORT $L27766 - -; 123 : _push(0); - - push 0 - -; 124 : } -; 125 : else if (env->IsInstanceOf(param, classInteger)) { - - jmp $L27764 -$L27766: - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27768 - -; 126 : int intArg = env->CallIntMethod(param, methodIntValue); - - push DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push ebx - push esi - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - add esp, 12 ; 0000000cH - mov DWORD PTR _intArg$27769[ebp], eax - -; 127 : _push(intArg) - - push DWORD PTR _intArg$27769[ebp] - -; 128 : } -; 129 : else if (env->IsInstanceOf(param, classByteArray)) { - - jmp $L27764 -$L27768: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27771 - -; 130 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) param, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _byteArrayArg$27772[ebp], eax - -; 131 : arrays[i] = (int) &byteArrayArg; - - lea eax, DWORD PTR _byteArrayArg$27772[ebp] - mov DWORD PTR [edi], eax - -; 132 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$27772[ebp] - -; 133 : } -; 134 : else if (env->IsInstanceOf(param, classCharArray)) { - - jmp $L27764 -$L27771: - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27777 - -; 135 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 136 : (jarray) param, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _charArrayArg$27778[ebp], eax - -; 137 : arrays[i] = (int) &charArrayArg; - - lea eax, DWORD PTR _charArrayArg$27778[ebp] - mov DWORD PTR [edi], eax - -; 138 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$27778[ebp] - -; 139 : } -; 140 : else if (env->IsInstanceOf(param, classBoolean)) { - - jmp $L27764 -$L27777: - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27783 - -; 141 : jboolean booleanArg = env->CallBooleanMethod(param, methodBooleanValue); - - push DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ebx - push esi - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - add esp, 12 ; 0000000cH - -; 142 : int tempArg = (booleanArg == JNI_FALSE ? 0 : 1); - - neg al - sbb eax, eax - neg eax - mov DWORD PTR _tempArg$27785[ebp], eax - -; 143 : _push(tempArg) - - push DWORD PTR _tempArg$27785[ebp] - -; 144 : } -; 145 : else if (env->IsInstanceOf(param, classHolder)) { - - jmp $L27764 -$L27783: - mov eax, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je $L27764 - -; 146 : -; 147 : /* Holder */ -; 148 : -; 149 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov eax, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+380] - -; 150 : -; 151 : if (env->IsInstanceOf(o, classInteger)) { - - mov ecx, DWORD PTR [esi] - mov ebx, eax - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27789 - -; 152 : int *intPtr = new int; - - push 4 - call ??2@YAPAXI@Z ; operator new - pop ecx - mov DWORD PTR _intPtr$27790[ebp], eax - -; 153 : *intPtr = env->CallIntMethod(o, methodIntValue); - - push DWORD PTR ?methodIntValue@@3PAU_jmethodID@@A ; methodIntValue - push ebx - push esi - call ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallIntMethod - mov ecx, DWORD PTR _intPtr$27790[ebp] - add esp, 12 ; 0000000cH - -; 154 : arrays[i] = (int) intPtr; - - mov DWORD PTR [edi], ecx - mov DWORD PTR [ecx], eax - -; 155 : _push(intPtr); - - push DWORD PTR _intPtr$27790[ebp] - -; 156 : } -; 157 : else if (env->IsInstanceOf(o, classByteArray)) { - - jmp $L27764 -$L27789: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27795 - -; 158 : char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) o, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _byteArrayArg$27796[ebp], eax - -; 159 : arrays[i] = (int) &byteArrayArg; - - lea eax, DWORD PTR _byteArrayArg$27796[ebp] - mov DWORD PTR [edi], eax - -; 160 : _push(byteArrayArg) - - push DWORD PTR _byteArrayArg$27796[ebp] - -; 161 : } -; 162 : else if (env->IsInstanceOf(o, classCharArray)) { - - jmp SHORT $L27764 -$L27795: - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27801 - -; 163 : unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( -; 164 : (jarray) o, 0); - - mov eax, DWORD PTR [esi] - push 0 - push ebx - push esi - call DWORD PTR [eax+888] - mov DWORD PTR _charArrayArg$27802[ebp], eax - -; 165 : arrays[i] = (int) &charArrayArg; - - lea eax, DWORD PTR _charArrayArg$27802[ebp] - mov DWORD PTR [edi], eax - -; 166 : _push(charArrayArg) - - push DWORD PTR _charArrayArg$27802[ebp] - -; 167 : } -; 168 : else if (env->IsInstanceOf(o, classBoolean)) { - - jmp SHORT $L27764 -$L27801: - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - mov ecx, DWORD PTR [esi] - push eax - push ebx - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27764 - -; 169 : jboolean booleanArg = env->CallBooleanMethod(o, methodBooleanValue); - - push DWORD PTR ?methodBooleanValue@@3PAU_jmethodID@@A ; methodBooleanValue - push ebx - push esi - call ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ; JNIEnv_::CallBooleanMethod - -; 170 : int *tempPtr = new int; - - push 4 - mov bl, al - call ??2@YAPAXI@Z ; operator new - add esp, 16 ; 00000010H - -; 171 : *tempPtr = (booleanArg == JNI_FALSE ? 0 : 1); - - xor ecx, ecx - test bl, bl - setne cl - mov DWORD PTR _tempPtr$27809[ebp], eax - mov DWORD PTR [eax], ecx - -; 172 : arrays[i] = (int) tempPtr; - - mov DWORD PTR [edi], eax - -; 173 : _push(tempPtr); - - push DWORD PTR _tempPtr$27809[ebp] - -; 172 : arrays[i] = (int) tempPtr; - -$L27764: - dec DWORD PTR _i$[ebp] - sub edi, 4 - cmp DWORD PTR _i$[ebp], 0 - jge $L28028 - -; 115 : -; 116 : jobject param; -; 117 : -; 118 : for (int i = len - 1; i >= 0; i--) { - - mov ebx, DWORD PTR _len$[ebp] -$L27765: - -; 174 : } -; 175 : -; 176 : /* end Holder */ -; 177 : -; 178 : } -; 179 : -; 180 : } -; 181 : -; 182 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov eax, DWORD PTR ?fieldFunctionHandle@@3PAU_jfieldID@@A ; fieldFunctionHandle - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR _obj$[ebp] - push esi - call DWORD PTR [ecx+400] - mov DWORD PTR _functionHandle$[ebp], eax - -; 183 : -; 184 : #ifdef _WINDOWS -; 185 : #ifdef _X86_ -; 186 : -; 187 : __asm { -; 188 : -; 189 : call functionHandle - - call DWORD PTR _functionHandle$[ebp] - -; 190 : -; 191 : } -; 192 : -; 193 : #endif -; 194 : #endif -; 195 : -; 196 : for (int j = 0; j < len; ++j) { - - and DWORD PTR _j$[ebp], 0 - test ebx, ebx - jle $L27817 - -; 174 : } -; 175 : -; 176 : /* end Holder */ -; 177 : -; 178 : } -; 179 : -; 180 : } -; 181 : -; 182 : jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - - mov ebx, DWORD PTR _arrays$[ebp] -$L27815: - -; 197 : param = env->GetObjectArrayElement(params, j); - - push DWORD PTR _j$[ebp] - mov eax, DWORD PTR [esi] - push DWORD PTR _params$[ebp] - push esi - call DWORD PTR [eax+692] - mov edi, eax - -; 198 : if (param == NULL) {} - - test edi, edi - mov DWORD PTR _param$[ebp], edi - je $L27816 - -; 199 : else if (env->IsInstanceOf(param, classByteArray) || env->IsInstanceOf(param, classCharArray)) { - - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne $L27833 - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne $L27833 - -; 201 : } -; 202 : else if (env->IsInstanceOf(param, classHolder)) { - - mov eax, DWORD PTR ?classHolder@@3PAV_jclass@@A ; classHolder - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - je $L27816 - -; 203 : -; 204 : jobject o = env->GetObjectField(param, fieldHolderO); - - mov eax, DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+380] - -; 205 : -; 206 : if (env->IsInstanceOf(o, classInteger)) { - - mov ecx, DWORD PTR [esi] - mov edi, eax - mov eax, DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27827 - -; 207 : int* out = (int*) arrays[j]; - - mov edi, DWORD PTR [ebx] - -; 208 : env->SetObjectField(param, fieldHolderO, env->NewObject(classInteger, newIntegerInt, *out)); - - push DWORD PTR [edi] - push DWORD PTR ?newIntegerInt@@3PAU_jmethodID@@A ; newIntegerInt - push DWORD PTR ?classInteger@@3PAV_jclass@@A ; classInteger -$L28031: - push esi - call ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ; JNIEnv_::NewObject - add esp, 16 ; 00000010H - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldHolderO@@3PAU_jfieldID@@A ; fieldHolderO - push DWORD PTR _param$[ebp] - push esi - call DWORD PTR [ecx+416] - -; 209 : delete out; - - push edi - call ??3@YAXPAX@Z ; operator delete - pop ecx - -; 210 : } -; 211 : else if (env->IsInstanceOf(o, classByteArray) || env->IsInstanceOf(o, classCharArray)) { - - jmp SHORT $L27816 -$L27827: - mov eax, DWORD PTR ?classByteArray@@3PAV_jclass@@A ; classByteArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne SHORT $L27833 - mov eax, DWORD PTR ?classCharArray@@3PAV_jclass@@A ; classCharArray - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - jne SHORT $L27833 - -; 212 : env->ReleasePrimitiveArrayCritical((jarray) o, (void*) arrays[j], 0); -; 213 : } -; 214 : else if (env->IsInstanceOf(o, classBoolean)) { - - mov eax, DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - mov ecx, DWORD PTR [esi] - push eax - push edi - push esi - call DWORD PTR [ecx+128] - test al, al - je SHORT $L27816 - -; 215 : int* out = (int*) arrays[j]; - - mov edi, DWORD PTR [ebx] - -; 216 : env->SetObjectField(param, fieldHolderO, env->NewObject(classBoolean, newBooleanBoolean, (*out == 0 ? JNI_FALSE : JNI_TRUE))); - - xor eax, eax - cmp DWORD PTR [edi], eax - setne al - push eax - push DWORD PTR ?newBooleanBoolean@@3PAU_jmethodID@@A ; newBooleanBoolean - push DWORD PTR ?classBoolean@@3PAV_jclass@@A ; classBoolean - -; 217 : delete out; - - jmp SHORT $L28031 -$L27833: - -; 200 : env->ReleasePrimitiveArrayCritical((jarray) param, (void*) arrays[j], 0); - - mov eax, DWORD PTR [esi] - push 0 - push DWORD PTR [ebx] - push edi - push esi - call DWORD PTR [eax+892] -$L27816: - inc DWORD PTR _j$[ebp] - mov eax, DWORD PTR _j$[ebp] - add ebx, 4 - cmp eax, DWORD PTR _len$[ebp] - jl $L27815 -$L27817: - -; 218 : } -; 219 : -; 220 : } -; 221 : -; 222 : } -; 223 : -; 224 : delete [] arrays; - - push DWORD PTR _arrays$[ebp] - call ??3@YAXPAX@Z ; operator delete - pop ecx - -; 225 : -; 226 : env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - - call DWORD PTR __imp__GetLastError@0 - mov ecx, DWORD PTR [esi] - push eax - push DWORD PTR ?fieldLastErrorCode@@3PAU_jfieldID@@A ; fieldLastErrorCode - push DWORD PTR _obj$[ebp] - push esi - call DWORD PTR [ecx+436] -$L28021: - -; 227 : -; 228 : } - - pop edi - pop esi - pop ebx - leave - ret 12 ; 0000000cH -_Java_com_eaio_nativecall_VoidCall_executeCall0@12 ENDP -_TEXT ENDS -; COMDAT ?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_clazz$ = 12 -_methodID$ = 16 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::NewObject, COMDAT - -; 835 : va_list args; -; 836 : jobject result; -; 837 : va_start(args, methodID); -; 838 : result = functions->NewObjectV(this,clazz,methodID,args); - - mov eax, DWORD PTR _this$[esp-4] - lea edx, DWORD PTR _methodID$[esp] - push edx - push DWORD PTR _methodID$[esp] - mov ecx, DWORD PTR [eax] - push DWORD PTR _clazz$[esp+4] - push eax - call DWORD PTR [ecx+116] - -; 839 : va_end(args); -; 840 : return result; -; 841 : } - - ret 0 -?NewObject@JNIEnv_@@QAAPAV_jobject@@PAV_jclass@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::NewObject -_TEXT ENDS -; COMDAT ?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_obj$ = 12 -_methodID$ = 16 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallBooleanMethod, COMDAT - -; 882 : va_list args; -; 883 : jboolean result; -; 884 : va_start(args,methodID); -; 885 : result = functions->CallBooleanMethodV(this,obj,methodID,args); - - mov eax, DWORD PTR _this$[esp-4] - lea edx, DWORD PTR _methodID$[esp] - push edx - push DWORD PTR _methodID$[esp] - mov ecx, DWORD PTR [eax] - push DWORD PTR _obj$[esp+4] - push eax - call DWORD PTR [ecx+152] - -; 886 : va_end(args); -; 887 : return result; -; 888 : } - - ret 0 -?CallBooleanMethod@JNIEnv_@@QAAEPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallBooleanMethod -_TEXT ENDS -; COMDAT ?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ -_TEXT SEGMENT -_this$ = 8 -_obj$ = 12 -_methodID$ = 16 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ PROC NEAR ; JNIEnv_::CallIntMethod, COMDAT - -; 950 : va_list args; -; 951 : jint result; -; 952 : va_start(args,methodID); -; 953 : result = functions->CallIntMethodV(this,obj,methodID,args); - - mov eax, DWORD PTR _this$[esp-4] - lea edx, DWORD PTR _methodID$[esp] - push edx - push DWORD PTR _methodID$[esp] - mov ecx, DWORD PTR [eax] - push DWORD PTR _obj$[esp+4] - push eax - call DWORD PTR [ecx+200] - -; 954 : va_end(args); -; 955 : return result; -; 956 : } - - ret 0 -?CallIntMethod@JNIEnv_@@QAAJPAV_jobject@@PAU_jmethodID@@ZZ ENDP ; JNIEnv_::CallIntMethod -_TEXT ENDS -END diff --git a/vendor/nativecall/0.4.1/cpp/Release/VoidCall.obj b/vendor/nativecall/0.4.1/cpp/Release/VoidCall.obj deleted file mode 100644 index 3edebca..0000000 Binary files a/vendor/nativecall/0.4.1/cpp/Release/VoidCall.obj and /dev/null differ diff --git a/vendor/nativecall/0.4.1/cpp/VoidCall.cpp b/vendor/nativecall/0.4.1/cpp/VoidCall.cpp deleted file mode 100644 index a99d658..0000000 --- a/vendor/nativecall/0.4.1/cpp/VoidCall.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - * VoidCall.cpp - * - * Created on 16.09.2004. - * - * $Id: VoidCall.cpp,v 1.4 2006/04/20 05:50:15 grnull Exp $ - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#include -#include "com_eaio_nativecall_VoidCall.h" - -#ifdef _WINDOWS -#include -#include -#endif - -#ifdef _WINDOWS -#ifdef _X86_ - -#define _push(x) __asm { push x }; - -#endif -#endif - -// NativeCall fields - -extern jfieldID fieldFunction, fieldModule, fieldFunctionHandle, - fieldModuleHandle, fieldLastErrorCode; - -// Holder fields - -extern jfieldID fieldHolderO; - -// Classes - -extern jclass classBoolean,/* classByte, classCharacter, classShort,*/ - classInteger, /* classLong, classFloat, classDouble,*/ classString, - classByteArray, classCharArray, /*classIntArray,*/ classHolder; - -// Wrapper class methods - -extern jmethodID methodBooleanValue,/* methodByteValue, methodCharValue, -methodShortValue,*/ methodIntValue/*, methodLongValue, methodFloatValue, -methodDoubleValue*/; - -// Constructors - -extern jmethodID newIntegerInt, newBooleanBoolean; - -/* - * Class: com_eaio_nativecall_VoidCall - * Method: executeCall - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_VoidCall_executeCall -(JNIEnv *env, jobject obj) { - - jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - -#ifdef _WINDOWS -#ifdef _X86_ - - __asm { - - call functionHandle - - } - -#endif -#endif - - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - -} - -/* - * Class: com_eaio_nativecall_VoidCall - * Method: executeCall0 - * Signature: ([Ljava/lang/Object;)V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_VoidCall_executeCall0 -(JNIEnv *env, jobject obj, jobjectArray params) { - - const int len = env->GetArrayLength(params); - - int* arrays = NULL; - if (!(arrays = new int[len])) { - env->ThrowNew(env->FindClass("java/lang/OutOfMemoryError"), NULL); - return; - } - memset(arrays, 0, (sizeof(int) * len)); - - jobject param; - - for (int i = len - 1; i >= 0; i--) { - - param = env->GetObjectArrayElement(params, i); - - if (param == NULL) { - _push(0); - } - else if (env->IsInstanceOf(param, classInteger)) { - int intArg = env->CallIntMethod(param, methodIntValue); - _push(intArg) - } - else if (env->IsInstanceOf(param, classByteArray)) { - char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) param, 0); - arrays[i] = (int) &byteArrayArg; - _push(byteArrayArg) - } - else if (env->IsInstanceOf(param, classCharArray)) { - unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( - (jarray) param, 0); - arrays[i] = (int) &charArrayArg; - _push(charArrayArg) - } - else if (env->IsInstanceOf(param, classBoolean)) { - jboolean booleanArg = env->CallBooleanMethod(param, methodBooleanValue); - int tempArg = (booleanArg == JNI_FALSE ? 0 : 1); - _push(tempArg) - } - else if (env->IsInstanceOf(param, classHolder)) { - - /* Holder */ - - jobject o = env->GetObjectField(param, fieldHolderO); - - if (env->IsInstanceOf(o, classInteger)) { - int *intPtr = new int; - *intPtr = env->CallIntMethod(o, methodIntValue); - arrays[i] = (int) intPtr; - _push(intPtr); - } - else if (env->IsInstanceOf(o, classByteArray)) { - char* byteArrayArg = (char*) env->GetPrimitiveArrayCritical((jarray) o, 0); - arrays[i] = (int) &byteArrayArg; - _push(byteArrayArg) - } - else if (env->IsInstanceOf(o, classCharArray)) { - unsigned short* charArrayArg = (unsigned short*) env->GetPrimitiveArrayCritical( - (jarray) o, 0); - arrays[i] = (int) &charArrayArg; - _push(charArrayArg) - } - else if (env->IsInstanceOf(o, classBoolean)) { - jboolean booleanArg = env->CallBooleanMethod(o, methodBooleanValue); - int *tempPtr = new int; - *tempPtr = (booleanArg == JNI_FALSE ? 0 : 1); - arrays[i] = (int) tempPtr; - _push(tempPtr); - } - - /* end Holder */ - - } - - } - - jint functionHandle = env->GetIntField(obj, fieldFunctionHandle); - -#ifdef _WINDOWS -#ifdef _X86_ - - __asm { - - call functionHandle - - } - -#endif -#endif - - for (int j = 0; j < len; ++j) { - param = env->GetObjectArrayElement(params, j); - if (param == NULL) {} - else if (env->IsInstanceOf(param, classByteArray) || env->IsInstanceOf(param, classCharArray)) { - env->ReleasePrimitiveArrayCritical((jarray) param, (void*) arrays[j], 0); - } - else if (env->IsInstanceOf(param, classHolder)) { - - jobject o = env->GetObjectField(param, fieldHolderO); - - if (env->IsInstanceOf(o, classInteger)) { - int* out = (int*) arrays[j]; - env->SetObjectField(param, fieldHolderO, env->NewObject(classInteger, newIntegerInt, *out)); - delete out; - } - else if (env->IsInstanceOf(o, classByteArray) || env->IsInstanceOf(o, classCharArray)) { - env->ReleasePrimitiveArrayCritical((jarray) o, (void*) arrays[j], 0); - } - else if (env->IsInstanceOf(o, classBoolean)) { - int* out = (int*) arrays[j]; - env->SetObjectField(param, fieldHolderO, env->NewObject(classBoolean, newBooleanBoolean, (*out == 0 ? JNI_FALSE : JNI_TRUE))); - delete out; - } - - } - - } - - delete [] arrays; - - env->SetIntField(obj, fieldLastErrorCode, GetLastError()); - -} \ No newline at end of file diff --git a/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_IntCall.h b/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_IntCall.h deleted file mode 100644 index 4bdd687..0000000 --- a/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_IntCall.h +++ /dev/null @@ -1,29 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class com_eaio_nativecall_IntCall */ - -#ifndef _Included_com_eaio_nativecall_IntCall -#define _Included_com_eaio_nativecall_IntCall -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_eaio_nativecall_IntCall - * Method: executeCall - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_eaio_nativecall_IntCall_executeCall - (JNIEnv *, jobject); - -/* - * Class: com_eaio_nativecall_IntCall - * Method: executeCall0 - * Signature: ([Ljava/lang/Object;)I - */ -JNIEXPORT jint JNICALL Java_com_eaio_nativecall_IntCall_executeCall0 - (JNIEnv *, jobject, jobjectArray); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_NativeCall.h b/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_NativeCall.h deleted file mode 100644 index 3092265..0000000 --- a/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_NativeCall.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class com_eaio_nativecall_NativeCall */ - -#ifndef _Included_com_eaio_nativecall_NativeCall -#define _Included_com_eaio_nativecall_NativeCall -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_eaio_nativecall_NativeCall - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_NativeCall_initIDs - (JNIEnv *, jclass); - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: initHandles - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_com_eaio_nativecall_NativeCall_initHandles - (JNIEnv *, jobject); - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: getLastError - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_com_eaio_nativecall_NativeCall_getLastError - (JNIEnv *, jobject); - -/* - * Class: com_eaio_nativecall_NativeCall - * Method: destroy - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_NativeCall_destroy - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_VoidCall.h b/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_VoidCall.h deleted file mode 100644 index 473da22..0000000 --- a/vendor/nativecall/0.4.1/cpp/com_eaio_nativecall_VoidCall.h +++ /dev/null @@ -1,29 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class com_eaio_nativecall_VoidCall */ - -#ifndef _Included_com_eaio_nativecall_VoidCall -#define _Included_com_eaio_nativecall_VoidCall -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_eaio_nativecall_VoidCall - * Method: executeCall - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_VoidCall_executeCall - (JNIEnv *, jobject); - -/* - * Class: com_eaio_nativecall_VoidCall - * Method: executeCall0 - * Signature: ([Ljava/lang/Object;)V - */ -JNIEXPORT void JNICALL Java_com_eaio_nativecall_VoidCall_executeCall0 - (JNIEnv *, jobject, jobjectArray); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vendor/nativecall/0.4.1/cpp/readme.txt b/vendor/nativecall/0.4.1/cpp/readme.txt deleted file mode 100644 index b493c79..0000000 --- a/vendor/nativecall/0.4.1/cpp/readme.txt +++ /dev/null @@ -1,25 +0,0 @@ -# $Id: readme.txt,v 1.1 2006/01/05 19:55:58 grnull Exp $ - -Hi, - -this is the readme file for people who want to build the native libraries for -NativeCall themselves. - -Compiling the native libraries requires some header files (after all, it's -just C++). - -Search for - - jni.h - -which is required. You will most likey also need jni_md.h and -jniproto_md.h. Copy these files to this directory. - -The library has been compiled and is set up for libctiny.lib to make the -binaries even smaller. You can download libctiny.lib from - - - -After you downloaded it, extract libctiny.lib to this folder. You also might -have to change the paths for the compiler and the linker. - diff --git a/vendor/nativecall/0.4.1/cpp/resource.h b/vendor/nativecall/0.4.1/cpp/resource.h deleted file mode 100644 index bbf1b2f..0000000 --- a/vendor/nativecall/0.4.1/cpp/resource.h +++ /dev/null @@ -1,15 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by version.rc -// - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 103 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/vendor/nativecall/0.4.1/cpp/version.rc b/vendor/nativecall/0.4.1/cpp/version.rc deleted file mode 100644 index a85bfed..0000000 --- a/vendor/nativecall/0.4.1/cpp/version.rc +++ /dev/null @@ -1,104 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Deutsch (Deutschland) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) -#ifdef _WIN32 -LANGUAGE LANG_GERMAN, SUBLANG_GERMAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,4,1,0 - PRODUCTVERSION 0,4,1,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040704b0" - BEGIN - VALUE "CompanyName", "eaio\0" - VALUE "FileDescription", "NativeCall native library\0" - VALUE "FileVersion", "0, 4, 1, 0\0" - VALUE "LegalCopyright", "2003-2006 Johann Burkard\0" - VALUE "OriginalFilename", "NativeCall.dll\0" - VALUE "ProductName", "NativeCall\0" - VALUE "ProductVersion", "0, 4, 1, 0\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x407, 1200 - END -END - -#endif // !_MAC - -#endif // Deutsch (Deutschland) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/vendor/nativecall/0.4.1/java/META-INF/services/com.eaio.nativecall.Verifier b/vendor/nativecall/0.4.1/java/META-INF/services/com.eaio.nativecall.Verifier deleted file mode 100644 index e5bdea6..0000000 --- a/vendor/nativecall/0.4.1/java/META-INF/services/com.eaio.nativecall.Verifier +++ /dev/null @@ -1 +0,0 @@ -com.eaio.nativecall.Win32Verifier \ No newline at end of file diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Holder.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Holder.java deleted file mode 100644 index 6ed5358..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Holder.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Holder.java - * - * Created on 14.09.2004. - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -/** - * Holder is a class that encapsulates another Object. Use this class for output - * parameters. - * - * @author Johann Burkard - * @version $Id: Holder.java,v 1.3 2006/04/19 20:54:58 grnull Exp $ - */ -public class Holder { - - /** - * The encapsulated object. - *

    - * Accessed by native code. DO NOT RENAME THIS FIELD. - */ - private Object o; - - /** - * Constructor for Holder. - * - * @param o the Object to encapsulate, may be null, but cannot - * be of type Holder - * @throws ClassCastException if o is of type Holder - */ - public Holder(Object o) { - if (o instanceof Holder) { - throw new ClassCastException(); - } - else if (o == null) { - o = new Integer(0); - } - this.o = o; - } - - /** - * Returns the referenced Object. - * - * @return an Object - */ - public final Object get() { - return o; - } - - /** - * Returns the hashCode of the encapsulated Object or - * {@link java.lang.Object#hashCode()} if the Object is null. - * - * @return the hashCode - * @see java.lang.Object#hashCode() - */ - public int hashCode() { - return getClass().getName().hashCode() ^ (o == null ? 0 : o.hashCode()); - } - - /** - * Returns if this Object is equal to another Object. - * - * @param obj the other Object, may be null - * @return if both Objects are equal - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof Holder)) { - return false; - } - Holder h = (Holder) obj; - return o == null ? h.o == null : o.equals(h.o); - } - - /** - * Returns a String representation of this Object. - * - * @return a String, never null - * @see java.lang.Object#toString() - * @see #toStringBuffer(StringBuffer) - */ - public final String toString() { - return toStringBuffer(null).toString(); - } - - /** - * Appends a String representation of this Object to the given - * {@link StringBuffer} or creates a new one if none is given. - * - * @param in the StringBuffer to append to, may be null - * @return a StringBuffer, never null - */ - public StringBuffer toStringBuffer(StringBuffer in) { - if (in == null) { - in = new StringBuffer(32); - } - else { - in.ensureCapacity(in.length() + 32); - } - in.append("{ Holder: o = "); - in.append(o); - in.append(" }"); - return in; - } - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/IntCall.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/IntCall.java deleted file mode 100644 index 3dc60ff..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/IntCall.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * IntCall.java - * - * Created on 07.09.2004. - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -/** - * An IntCall instance encapsulates an operating system method that returns - * an integer. - * - * @author Johann Burkard - * @version $Id: IntCall.java,v 1.1 2006/01/05 20:02:44 grnull Exp $ - */ -public class IntCall extends NativeCall { - - /** - * Constructor for IntCall. - * - * @see NativeCall#NativeCall(String) - */ - public IntCall(String function) throws SecurityException, - IllegalArgumentException, NullPointerException { - super(function); - } - - /** - * Constructor for IntCall. - * - * @see NativeCall#NativeCall(String, String) - */ - public IntCall(String module, String function) throws SecurityException, - IllegalArgumentException, NullPointerException { - super(module, function); - } - - /** - * Returns false if calling {@link #executeCall()} returned - * 0, true otherwise. - *

    - * Updates the error code field. See {@link #getLastError()}. - * - * @return true or false - */ - public boolean executeBooleanCall() { - return executeCall() == 0 ? false : true; - } - - /** - * Returns false if calling {@link #executeCall(Object)} - * returned 0, true otherwise. - *

    - * Updates the error code field. See {@link #getLastError()}. - * - * @param param the parameter, may be null - * @return true or false - * @see #executeBooleanCall(Object[]) - */ - public boolean executeBooleanCall(Object param) { - return executeCall(param) == 0 ? false : true; - } - - /** - * Returns false if calling - * {@link #executeCall(Object[])} returned 0, true otherwise. - *

    - * Updates the error code field. See {@link #getLastError()}. - *

    - * During this operation, the contents of the array might be changed. - * - * @param params the parameter array, may be null - * @return true or false - */ - public boolean executeBooleanCall(Object[] params) { - return executeCall(params) == 0 ? false : true; - } - - /** - * Calls the function, returning its output. - *

    - * Updates the error code field. See {@link #getLastError()}. - * - * @return an int - */ - public native int executeCall(); - - /** - * Calls the function using the given parameter. - *

    - * Updates the error code field. See {@link #getLastError()}. - * - * @param param the parameter, may be null - * @return an int - * @see #executeCall(Object[]) - */ - public int executeCall(Object param) { - return executeCall(new Object[] { param }); - } - - /** - * Calls the function using the given parameters. - *

    - * Updates the error code field. See {@link #getLastError()}. - *

    - * During this operation, the contents of the array might be changed. - * - * @param params the parameter array, may be null - * @return an int - */ - public int executeCall(Object[] params) { - if (params == null || params.length == 0) { - return executeCall(); - } - check(params); - return executeCall0(params); - } - - private native int executeCall0(Object[] params); - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/NativeCall.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/NativeCall.java deleted file mode 100644 index 482ca84..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/NativeCall.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * NativeCall.java - * - * Created on 07.09.2004. - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -import java.io.IOException; - -import sun.misc.ServiceConfigurationError; - -import com.eaio.util.lang.NativeLoader; - -/** - * NativeCall loads the native library and prepares the matching - * {@link com.eaio.nativecall.Verifier}. - *

    - * Before being able to use NativeCall, the {@link #init()} method must have - * been called: - *

    - * try {
    - *     NativeCall.init();
    - * }
    - * catch (IOException ex) { ... }
    - * catch (SecurityException ex) { ... }
    - * catch (UnsatisfiedLinkError er) { ... }
    - * catch (sun.misc.ServiceConfigurationError) { ... }
    - * catch (UnsupportedOperationException) { ... }
    - * 
    - * After usage, each NativeCall object must be destroyed to release - * resources. This is done by calling the {@link #destroy()} method. Failure - * to call this method might result in memory leaks. - * - * @see #destroy() - * @see #init() - * @author Johann Burkard - * @version $Id: NativeCall.java,v 1.3 2006/04/19 20:54:58 grnull Exp $ - */ -public abstract class NativeCall { - - /** - * The error code of the last call. - *

    - * Accessed by native code. DO NOT RENAME THIS FIELD. - */ - private int lastErrorCode; - - /** - * The internal handle to the function and the module. - *

    - * These are set in native code, so ignore any warnings. - *

    - * Accessed by native code. DO NOT RENAME THIS FIELD. - */ - private int functionHandle, moduleHandle; - - /** - * The name of the function to call. - *

    - * Accessed by native code. DO NOT RENAME THIS FIELD. - */ - private String function; - - /** - * The name of the module to call. - *

    - * Accessed by native code. DO NOT RENAME THIS FIELD. - */ - private String module; - - /** - * Initialize JNI field and method IDs - */ - private static native void initIDs(); - - /** - * Whether the class has been initialized properly. - */ - private static boolean initialized = false; - - /** - * Before NativeCall may be used, this method must be called. - * It loads the native library, prepares JNI field and method IDs and loads - * the matching {@link Verifier}. - *

    - * Multiple calls are ignored. - * - * @throws IOException if an IOException occured during unpacking of - * the native library - * @throws SecurityException if accessing system properties was forbidden - * by the {@link SecurityManager} - * @throws UnsatisfiedLinkError if the NativeCall.dll could - * not be found - * @throws sun.misc.ServiceConfigurationError - * @throws UnsupportedOperationException if no matching - * {@link Verifier} could be found - */ - public static synchronized void init() - throws - IOException, - SecurityException, - UnsatisfiedLinkError, - ServiceConfigurationError, - UnsupportedOperationException { - if (!initialized) { - Verifiers.init(); - if (Verifiers.getInstance() == null) { - throw new UnsupportedOperationException(); - } - new NativeLoader("NativeCall").load(); - initIDs(); - initialized = true; - } - } - - /** - * Constructor for NativeCall. - * - * @param function the name of the function to use, may not be - * null - * @throws IllegalArgumentException if the function could not be found - * @throws NullPointerException if function is null - * @see Verifier#getDefaultModule() - * @see NativeCall#NativeCall(String, String) - */ - public NativeCall(String function) - throws IllegalArgumentException, NullPointerException { - this(Verifiers.getInstance().getDefaultModule(), function); - } - - /** - * Constructor for NativeCall. - * - * @param module the name of the module the function is stored in, may be - * null - * @param function the name of the function to use, may not be - * null - * @throws IllegalArgumentException if the function could not be found - * @throws NullPointerException if function is null - */ - public NativeCall(String module, String function) - throws IllegalArgumentException, NullPointerException { - Verifier v = Verifiers.getInstance(); - this.function = v.verifyFunctionName(function); - this.module = v.verifyModuleName(module); - if (!initHandles()) { - if (lastErrorCode != 0) { - throw new IllegalArgumentException(getLastError()); - } - throw new IllegalArgumentException(); - } - } - - /** - * Attempts to acquire handles to the functions. Returns if these could be - * acquired. - * - * @return if the handles could be acquired - */ - private native boolean initHandles(); - - /** - * Returns the error code that was returned during the last method call or - * 0 if the last method call did not produce an error. - * - * @see #getLastError() - * @return the last error code or 0 - */ - public final int getLastErrorCode() { - return lastErrorCode; - } - - /** - * Returns a formatted String containing the last error code or - * null if the last call did not produce an error. - * - * @see #getLastErrorCode() - * @return a String or null if the last error code is 0 - */ - public final native String getLastError(); - - /** - * Releases acquired module handles. This method must be called if the - * instance is not used anymore. After this method is called, methods of this - * NativeCall Object cannot be called anymore. - *

    - * Failure to call this method might result in memory leaks. - *

    - * Updates the error code field. See {@link #getLastError()}. - */ - public native synchronized void destroy(); - - /** - * Checks the supplied Object array for illegal/unsupported types. - *

    - * During the verification, the contents of the array might be - * changed. - * - * @param params the Object array, may be null - * @throws ClassCastException if the type of one argument is not supported - */ - protected void check(Object[] params) throws ClassCastException { - if (params == null) { - return; - } - for (int i = 0; i < params.length; ++i) { - checkParam(params[i]); - if (params[i] instanceof String) { - params[i] = - Verifiers.getInstance().handleString( - (String) params[i], - module, - function); - } - } - } - - /** - * Checks one Object for illegal/unsupported types. - * - * @param o the Object, may be null - * @throws ClassCastException if the type of one argument is not supported - */ - protected void checkParam(Object o) throws ClassCastException { - if (o == null - || o instanceof Boolean - || o instanceof Integer - || o instanceof byte[] - || o instanceof char[] - || o instanceof String) { - return; - } - if (o instanceof Holder) { - checkParam(((Holder) o).get()); - return; - } - throw new ClassCastException(o.getClass().getName()); - } - - /** - * Returns if this Object is equal to another Object. The other Object must - * be an instance of the same type as this Object. Also, both the module - * and the function field must be equal. - * - * @param obj the other Object - * @return if this and the other Object are equal - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof NativeCall)) { - return false; - } - if (!getClass().getName().equals(obj.getClass().getName())) { - return false; - } - NativeCall c = (NativeCall) obj; - return module.equals(c.module) && function.equals(c.function); - } - - /** - * Returns the hashCode of this Object. The hashCode is computed by XOR'ing - * the hash codes of the function and the module names. - * - * @return the hashCode - * @see java.lang.Object#hashCode() - */ - public int hashCode() { - int out = function.hashCode(); - out ^= module.hashCode(); - return out; - } - - /** - * Calls {@link #destroy()}. - * - * @see java.lang.Object#finalize() - */ - protected void finalize() throws Throwable { - try { - destroy(); - } - finally { - super.finalize(); - // in case NativeCall is a subclass of a class other than Object - } - } - - /** - * Returns a String representation of this Object. - * - * @return a String, never null - * @see java.lang.Object#toString() - * @see #toStringBuffer(StringBuffer) - */ - public final String toString() { - return toStringBuffer(null).toString(); - } - - /** - * Appends a String representation of this Object to the given - * {@link StringBuffer} or creates a new one if none is given. - * - * @param in the StringBuffer to append to, may be null - * @return a StringBuffer, never null - */ - public StringBuffer toStringBuffer(StringBuffer in) { - if (in == null) { - in = new StringBuffer(64); - } - else { - in.ensureCapacity(in.length() + 64); - } - in.append("{ "); - int idx = getClass().getName().lastIndexOf("."); - if (idx > -1) { - in.append(getClass().getName().substring(++idx)); - } - else { - in.append(getClass().getName()); - } - in.append(": module = "); - in.append(module); - in.append(", function = "); - in.append(function); - in.append(" }"); - return in; - } - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Verifier.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Verifier.java deleted file mode 100644 index 085ae8b..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Verifier.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Verifier.java - * - * Created on 07.09.2004. - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -/** - * A Verifier implements method and module name checking for one given - * operating system. Classes implementing Verifier must be public and have - * a public no-argument constructor. - * - * @author Johann Burkard - * @version $Id: Verifier.java,v 1.1 2006/01/05 20:02:44 grnull Exp $ - */ -public interface Verifier { - - /** - * If there is a default module that system functions are stored in, the - * module's name may be returned here. - * - * @return the name of a default module or null - * @see NativeCall#NativeCall(String) - */ - String getDefaultModule(); - - /** - * Returns if this Verifier supports the given operating system. - * - * @return if this operating system is supported - * @throws SecurityException because {@link java.lang.System} properties - * may be queried - */ - boolean supports() throws SecurityException; - - /** - * Verifies that the given module name is correct. - * - * @param module the module name, may be null - * @return a module name, possibly modified, never null - * @throws NullPointerException if the module name is null - * and there is no default module defined - * @throws IllegalArgumentException if the module is illegal in the - * operating system - * @see #getDefaultModule() - */ - String verifyModuleName(String module) - throws NullPointerException, IllegalArgumentException; - - /** - * Verifies that the given function name is correct. - * - * @param function the function name, may be null - * @return a function name, possibly modified, never null - * @throws NullPointerException if the function name is null - * @throws IllegalArgumentException if the function is illegal in the - * operating system - */ - String verifyFunctionName(String function) - throws NullPointerException, IllegalArgumentException; - - /** - * Converts the given String to one of the following data types, based on the - * module and the function name: - *
    - *

      - *
    • a byte array
    • - *
    • a char array
    • - *
    - * - * @param val the String, never null - * @param module the module name, never null - * @param function the function name, never null - * @return the String converted, never null - */ - Object handleString(String val, String module, String function); - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Verifiers.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Verifiers.java deleted file mode 100644 index 6c86654..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Verifiers.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Verifiers.java - * - * Created on 07.09.2004. - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -import java.util.Iterator; - -import sun.misc.Service; -import sun.misc.ServiceConfigurationError; - -/** - * Verifiers instantiates the matching {@link com.eaio.nativecall.Verifier} for - * the current operating system. - * - * @author Johann Burkard - * @version $Id: Verifiers.java,v 1.2 2006/01/06 10:58:33 grnull Exp $ - */ -final class Verifiers { - - /** - * No instances needed. - */ - private Verifiers() {} - - /** - * The Verifier. - */ - private static Verifier v = null; - - /** - * Find the matching Verifier. - * - * @throws ServiceConfigurationError - * @throws SecurityException - */ - static void init() throws ServiceConfigurationError, SecurityException { - Iterator i = - Service.providers(Verifier.class, Verifier.class.getClassLoader()); - Verifier ver = null; - while (i.hasNext()) { - ver = (Verifier) i.next(); - if (ver.supports()) { - v = ver; - break; - } - } - } - - /** - * Returns the Verifier. - * - * @return a Verifier or null - */ - static Verifier getInstance() { - return v; - } - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/VoidCall.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/VoidCall.java deleted file mode 100644 index c3ce15e..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/VoidCall.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * VoidCall.java - * - * Created on 16.09.2004 - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -/** - * A VoidCall instance encapsulates an operating system method that returns - * nothing. - * - * @author Johann Burkard - * @version $Id: VoidCall.java,v 1.1 2006/01/05 20:02:44 grnull Exp $ - */ -public class VoidCall extends NativeCall { - - /** - * Constructor for VoidCall. - * - * @see NativeCall#NativeCall(String) - */ - public VoidCall(String function) throws SecurityException, - IllegalArgumentException, NullPointerException { - super(function); - } - - /** - * Constructor for VoidCall. - * - * @see NativeCall#NativeCall(String, String) - */ - public VoidCall(String module, String function) throws SecurityException, - IllegalArgumentException, NullPointerException { - super(module, function); - } - - /** - * Calls the function. - *

    - * Updates the error code field. See {@link #getLastError()}. - */ - public native void executeCall(); - - /** - * Calls the function using the given parameter. - *

    - * Updates the error code field. See {@link #getLastError()}. - * - * @param param the parameter, may be null - * @see #executeCall(Object[]) - */ - public void executeCall(Object param) { - executeCall(new Object[] { param }); - } - - /** - * Calls the function using the given parameters. - *

    - * Updates the error code field. See {@link #getLastError()}. - *

    - * During this operation, the contents of the array might be changed. - * - * @param params the parameter array, may be null - */ - public void executeCall(Object[] params) { - if (params == null || params.length == 0) { - executeCall(); - return; - } - check(params); - executeCall0(params); - } - - private native void executeCall0(Object[] params); - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Win32Verifier.java b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Win32Verifier.java deleted file mode 100644 index 85bd60a..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/Win32Verifier.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Win32Verifier.java - * - * Created on 08.09.2004. - * - * eaio: NativeCall - calling operating system methods from Java - * Copyright (c) 2004-2006 Johann Burkard () - * - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -package com.eaio.nativecall; - -/** - * A {@link com.eaio.nativecall.Verifier} for the Windows environment. - * - * @author Johann Burkard - * @version $Id: Win32Verifier.java,v 1.3 2006/04/19 20:54:58 grnull Exp $ - */ -public class Win32Verifier implements Verifier { - - /** - * Constructor for Win32Verifier. Does nothing. - */ - public Win32Verifier() {} - - /** - * Verifies that the {@link java.lang.System} property "os.name" starts - * with "Windows". - * - * @see Verifier#supports() - */ - public boolean supports() throws SecurityException { - return System.getProperty("os.name").startsWith("Windows"); - } - - /** - * Returns the default module name if the module name is null - * or an empty String. If the module name contains forward slashes (/), they - * are converted to backward slashes (\). - * - * @see - * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibrary.asp - * - * @see com.eaio.nativecall.Verifier#verifyModuleName(java.lang.String) - */ - public String verifyModuleName(String module) { - if (module == null || module.length() == 0) { - return getDefaultModule(); - } - if (module.indexOf('/') != -1) { - module = module.replace('/', '\\'); - } - return module; - } - - /** - * Throws a {@link java.lang.NullPointerException} if the function - * name is null or an empty String. No further processing is - * done. - * - * @see com.eaio.nativecall.Verifier#verifyFunctionName(java.lang.String) - */ - public String verifyFunctionName(String function) { - if (function == null || function.length() == 0) { - throw new NullPointerException(); - } - return function; - } - - /** - * Returns "kernel32". - * - * @return "kernel32" - * @see com.eaio.nativecall.Verifier#getDefaultModule() - */ - public String getDefaultModule() { - return "kernel32"; - } - - /** - * If the function name ends on 'W' (Windows' Unicode functions), a - * char array is returned, otherwise a byte array - * is returned. - *

    - * The arrays are always null-terminated. - * - * @see com.eaio.nativecall.Verifier#handleString(java.lang.String, - * java.lang.String, - * java.lang.String) - */ - public Object handleString(String val, String module, String function) { - if (function.charAt(function.length() - 1) == 'W') { - char[] buf = new char[val.length() + 1]; - val.getChars(0, val.length(), buf, 0); - return buf; - } - byte[] buf = new byte[val.length() + 1]; - val.getBytes(0, val.length(), buf, 0); - return buf; - } - -} diff --git a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/package.html b/vendor/nativecall/0.4.1/java/com/eaio/nativecall/package.html deleted file mode 100644 index 22b3abc..0000000 --- a/vendor/nativecall/0.4.1/java/com/eaio/nativecall/package.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -Untitled Document - - -

    Contains the main NativeCall classes.

    -

    For instant API information, see:

    -
      -
    • {@link com.eaio.nativecall.NativeCall}
    • -
    • {@link com.eaio.nativecall.IntCall}
    • -
    • {@link com.eaio.nativecall.VoidCall}
    • -
    - - diff --git a/vendor/nativecall/0.4.1/nativecall-0.4.1.jar b/vendor/nativecall/0.4.1/nativecall-0.4.1.jar deleted file mode 100644 index 7b89804..0000000 Binary files a/vendor/nativecall/0.4.1/nativecall-0.4.1.jar and /dev/null differ diff --git a/vendor/nativecall/0.4.1/nativeloader-200505172341.jar b/vendor/nativecall/0.4.1/nativeloader-200505172341.jar deleted file mode 100644 index b4aad60..0000000 Binary files a/vendor/nativecall/0.4.1/nativeloader-200505172341.jar and /dev/null differ