Advertisement
test12333

Untitled

Nov 12th, 2023
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.59 KB | None | 0 0
  1.  
  2. class JNIEnvCrystalix {
  3. public:
  4.     auto FindClass( const std::string_view& class_name ) {
  5.         return ( *( jclass ( __fastcall** )( JNIEnvCrystalix*, const char* ) )( *(uintptr_t*)this + 1864 ) )( this, class_name.data( ) ); //233 index
  6.     }
  7.    
  8.     auto DeleteLocalRef( const jobject obj ) {
  9.         return ( *( void ( __fastcall** )( JNIEnvCrystalix*, jobject ) )( *(uintptr_t*)this + 1472 ) )( this, obj ); //233 index
  10.     }
  11.  
  12.     auto GetObjectClass( const jobject clazz_obj ) {
  13.         return ( *( jclass( __fastcall** )( JNIEnvCrystalix*, jobject ) )( *(uintptr_t*)this + 1312 ) )( this, clazz_obj );
  14.     }
  15.  
  16.     auto GetFieldID( const jclass clazz, const char* name, const char* sig ) {
  17.         return ( *( jfieldID( __fastcall** )( JNIEnvCrystalix*, jclass, const char*, const char* ) )( *(uintptr_t*)this + 304 ) )( this, clazz,name,sig );
  18.     }
  19.  
  20.     auto GetStaticFieldID( const jclass clazz, const char* name, const char* sig ) {
  21.         return ( *( jfieldID( __fastcall** )( JNIEnvCrystalix*, jclass, const char*, const char* ) )( *(uintptr_t*)this + 1880 ) )( this, clazz,name,sig );
  22.     }
  23.  
  24.     auto GetStaticIntField( const jclass clazz, const jfieldID fid ) {
  25.         return ( *( jint( __fastcall** )( JNIEnvCrystalix*, jclass, jfieldID ) )( *(uintptr_t*)this + 744 ) )( this, clazz,fid );
  26.     }
  27.  
  28.     auto SetDoubleField( const jobject clazz_obj, const jfieldID fldid, const jdouble val ) {
  29.         return ( *( jobject( __fastcall** )( JNIEnvCrystalix*, jobject, jfieldID, jdouble ) )( *(uintptr_t*)this + 488 ) )( this, clazz_obj, fldid, val );
  30.     }
  31.  
  32.     auto GetObjectField( const jobject clazz_obj, const jfieldID fldid ) {
  33.         return ( *( jobject( __fastcall** )( JNIEnvCrystalix*, jobject, jfieldID ) )( *(uintptr_t*)this + 896 ) )( this, clazz_obj, fldid );
  34.     }
  35.  
  36.     auto GetMethodID( const jclass clazz, const char* name, const char* sig ) {
  37.         return ( *( jmethodID( __fastcall** )( JNIEnvCrystalix*, jclass, const char*, const char* ) )( *(uintptr_t*)this + 976 ) )( this, clazz, name, sig );
  38.     }
  39.  
  40.     auto GetStaticMethodID( const jclass clazz, const char* name, const char* sig ) {
  41.         return ( *( jmethodID( __fastcall** )( JNIEnvCrystalix*, jclass, const char*, const char* ) )( *(uintptr_t*)this + 1128 ) )( this, clazz, name, sig );
  42.     }
  43.  
  44.     auto CallObjectMethod( const jobject clazz_obj, jmethodID methodID ) {
  45.         return ( *( jobject( __fastcall** )( JNIEnvCrystalix*, jobject, jmethodID ) )( *(uintptr_t*)this + 872 ) )( this, clazz_obj, methodID );
  46.     }
  47.  
  48.     auto CallStaticObjectMethod( const jclass clazz, jmethodID methodID ) {
  49.          return ( *( jobject( __fastcall** )( JNIEnvCrystalix*, jclass, jmethodID ) )( *(uintptr_t*)this + 344 ) )( this, clazz, methodID );
  50.     }
  51. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement