forked from extremecoders-re/ghidra-jni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jni-ghidra.h
920 lines (818 loc) · 44.4 KB
/
jni-ghidra.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
typedef long jint;
typedef __int64 jlong;
typedef signed char jbyte;
typedef unsigned char jboolean;
typedef unsigned short jchar;
typedef short jshort;
typedef float jfloat;
typedef double jdouble;
typedef jint jsize;
struct _jobject;
typedef struct _jobject *jobject;
typedef jobject jclass;
typedef jobject jthrowable;
typedef jobject jstring;
typedef jobject jarray;
typedef jarray jbooleanArray;
typedef jarray jbyteArray;
typedef jarray jcharArray;
typedef jarray jshortArray;
typedef jarray jintArray;
typedef jarray jlongArray;
typedef jarray jfloatArray;
typedef jarray jdoubleArray;
typedef jarray jobjectArray;
typedef jobject jweak;
typedef jobject jweak;
typedef union jvalue {
jboolean z;
jbyte b;
jchar c;
jshort s;
jint i;
jlong j;
jfloat f;
jdouble d;
jobject l;
} jvalue;
struct _jfieldID;
typedef struct _jfieldID *jfieldID;
struct _jmethodID;
typedef struct _jmethodID *jmethodID;
typedef enum _jobjectType {
JNIInvalidRefType = 0,
JNILocalRefType = 1,
JNIGlobalRefType = 2,
JNIWeakGlobalRefType = 3
} jobjectRefType;
typedef struct {
char *name;
char *signature;
void *fnPtr;
} JNINativeMethod;
struct JNINativeInterface_;
struct JNIEnv_;
typedef const struct JNINativeInterface_ *JNIEnv;
struct JNIInvokeInterface_;
struct JavaVM_;
typedef const struct JNIInvokeInterface_ *JavaVM;
jint GetVersion(JNIEnv* env);
jclass DefineClass(JNIEnv *env, char *name, jobject loader, jbyte *buf, jsize len);
jclass FindClass(JNIEnv *env, char *name);
jmethodID FromReflectedMethod(JNIEnv *env, jobject method);
jfieldID FromReflectedField(JNIEnv *env, jobject field);
jobject ToReflectedMethod(JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
jclass GetSuperclass(JNIEnv *env, jclass sub);
jboolean IsAssignableFrom(JNIEnv *env, jclass sub, jclass sup);
jobject ToReflectedField(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
jint Throw(JNIEnv *env, jthrowable obj);
jint ThrowNew(JNIEnv *env, jclass clazz, char *msg);
jthrowable ExceptionOccurred(JNIEnv *env);
void ExceptionDescribe(JNIEnv *env);
void ExceptionClear(JNIEnv *env);
void FatalError(JNIEnv *env, char *msg);
jint PushLocalFrame(JNIEnv *env, jint capacity);
jobject PopLocalFrame(JNIEnv *env, jobject result);
jobject NewGlobalRef(JNIEnv *env, jobject lobj);
void DeleteGlobalRef(JNIEnv *env, jobject gref);
void DeleteLocalRef(JNIEnv *env, jobject obj);
jboolean IsSameObject(JNIEnv *env, jobject obj1, jobject obj2);
jobject NewLocalRef(JNIEnv *env, jobject ref);
jint EnsureLocalCapacity(JNIEnv *env, jint capacity);
jobject AllocObject(JNIEnv *env, jclass clazz);
jobject NewObject(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jobject NewObjectV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jobject NewObjectA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jclass GetObjectClass(JNIEnv *env, jobject obj);
jboolean IsInstanceOf(JNIEnv *env, jobject obj, jclass clazz);
jmethodID GetMethodID(JNIEnv *env, jclass clazz, char *name, char *sig);
jobject CallObjectMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jobject CallObjectMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jobject CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
jboolean CallBooleanMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jboolean CallBooleanMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jboolean CallBooleanMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
jbyte CallByteMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jbyte CallByteMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jbyte CallByteMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
jchar CallCharMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jchar CallCharMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jchar CallCharMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
jshort CallShortMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jshort CallShortMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jshort CallShortMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
jint CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jint CallIntMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jint CallIntMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
jlong CallLongMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jlong CallLongMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jlong CallLongMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
jfloat CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jfloat CallFloatMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jfloat CallFloatMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
jdouble CallDoubleMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jdouble CallDoubleMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jdouble CallDoubleMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
void CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...);
void CallVoidMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
void CallVoidMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
jobject CallNonvirtualObjectMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jobject CallNonvirtualObjectMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jobject CallNonvirtualObjectMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args);
jboolean CallNonvirtualBooleanMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jboolean CallNonvirtualBooleanMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jboolean CallNonvirtualBooleanMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args);
jbyte CallNonvirtualByteMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jbyte CallNonvirtualByteMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jbyte CallNonvirtualByteMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
jchar CallNonvirtualCharMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jchar CallNonvirtualCharMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jchar CallNonvirtualCharMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
jshort CallNonvirtualShortMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jshort CallNonvirtualShortMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jshort CallNonvirtualShortMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
jint CallNonvirtualIntMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jint CallNonvirtualIntMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jint CallNonvirtualIntMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
jlong CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jlong CallNonvirtualLongMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jlong CallNonvirtualLongMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
jfloat CallNonvirtualFloatMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jfloat CallNonvirtualFloatMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jfloat CallNonvirtualFloatMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
jdouble CallNonvirtualDoubleMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jdouble CallNonvirtualDoubleMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
jdouble CallNonvirtualDoubleMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue *args);
void CallNonvirtualVoidMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
void CallNonvirtualVoidMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, void * args);
void CallNonvirtualVoidMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, jvalue * args);
jfieldID GetFieldID(JNIEnv *env, jclass clazz, char *name, char *sig);
jobject GetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID);
jboolean GetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID);
jbyte GetByteField(JNIEnv *env, jobject obj, jfieldID fieldID);
jchar GetCharField(JNIEnv *env, jobject obj, jfieldID fieldID);
jshort GetShortField(JNIEnv *env, jobject obj, jfieldID fieldID);
jint GetIntField(JNIEnv *env, jobject obj, jfieldID fieldID);
jlong GetLongField(JNIEnv *env, jobject obj, jfieldID fieldID);
jfloat GetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID);
jdouble GetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID);
void SetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
void SetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
void SetByteField(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
void SetCharField(JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
void SetShortField(JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
void SetIntField(JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
void SetLongField(JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
void SetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
void SetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
jmethodID GetStaticMethodID(JNIEnv *env, jclass clazz, char *name, char *sig);
jobject CallStaticObjectMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jobject CallStaticObjectMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jobject CallStaticObjectMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jboolean CallStaticBooleanMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jboolean CallStaticBooleanMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jboolean CallStaticBooleanMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jbyte CallStaticByteMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jbyte CallStaticByteMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jbyte CallStaticByteMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jchar CallStaticCharMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jchar CallStaticCharMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jchar CallStaticCharMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jshort CallStaticShortMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jshort CallStaticShortMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jshort CallStaticShortMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jint CallStaticIntMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jint CallStaticIntMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jint CallStaticIntMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jlong CallStaticLongMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jlong CallStaticLongMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jlong CallStaticLongMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jfloat CallStaticFloatMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jfloat CallStaticFloatMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jfloat CallStaticFloatMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
jdouble CallStaticDoubleMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jdouble CallStaticDoubleMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jdouble CallStaticDoubleMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
void CallStaticVoidMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...);
void CallStaticVoidMethodV(JNIEnv *env, jclass cls, jmethodID methodID, void * args);
void CallStaticVoidMethodA(JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args);
jfieldID GetStaticFieldID(JNIEnv *env, jclass clazz, char *name, char *sig);
jobject GetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jboolean GetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jbyte GetStaticByteField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jchar GetStaticCharField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jshort GetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jint GetStaticIntField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jlong GetStaticLongField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jfloat GetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID);
jdouble GetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID);
void SetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
void SetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
void SetStaticByteField(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
void SetStaticCharField(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
void SetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
void SetStaticIntField(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
void SetStaticLongField(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
void SetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
void SetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
jstring NewString(JNIEnv *env, jchar *unicode, jsize len);
jsize GetStringLength(JNIEnv *env, jstring str);
jchar GetStringChars(JNIEnv *env, jstring str, jboolean *isCopy);
void ReleaseStringChars(JNIEnv *env, jstring str, jchar *chars);
jstring NewStringUTF(JNIEnv *env, char *utf);
jsize GetStringUTFLength(JNIEnv *env, jstring str);
char GetStringUTFChars(JNIEnv *env, jstring str, jboolean *isCopy);
void ReleaseStringUTFChars(JNIEnv *env, jstring str, char* chars);
jsize GetArrayLength(JNIEnv *env, jarray array);
jobjectArray NewObjectArray(JNIEnv *env, jsize len, jclass clazz, jobject init);
jobject GetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index);
void SetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index, jobject val);
jbooleanArray NewBooleanArray(JNIEnv *env, jsize len);
jbyteArray NewByteArray(JNIEnv *env, jsize len);
jcharArray NewCharArray(JNIEnv *env, jsize len);
jshortArray NewShortArray(JNIEnv *env, jsize len);
jintArray NewIntArray(JNIEnv *env, jsize len);
jlongArray NewLongArray(JNIEnv *env, jsize len);
jfloatArray NewFloatArray(JNIEnv *env, jsize len);
jdoubleArray NewDoubleArray(JNIEnv *env, jsize len);
jboolean GetBooleanArrayElements(JNIEnv *env, jbooleanArray array, jboolean *isCopy);
jbyte GetByteArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy);
jchar GetCharArrayElements(JNIEnv *env, jcharArray array, jboolean *isCopy);
jshort GetShortArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy);
jint GetIntArrayElements(JNIEnv *env, jintArray array, jboolean *isCopy);
jlong GetLongArrayElements(JNIEnv *env, jlongArray array, jboolean *isCopy);
jfloat GetFloatArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy);
jdouble GetDoubleArrayElements(JNIEnv *env, jdoubleArray array, jboolean *isCopy);
void ReleaseBooleanArrayElements(JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
void ReleaseByteArrayElements(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
void ReleaseCharArrayElements(JNIEnv *env, jcharArray array, jchar *elems, jint mode);
void ReleaseShortArrayElements(JNIEnv *env, jshortArray array, jshort *elems, jint mode);
void ReleaseIntArrayElements(JNIEnv *env, jintArray array, jint *elems, jint mode);
void ReleaseLongArrayElements(JNIEnv *env, jlongArray array, jlong *elems, jint mode);
void ReleaseFloatArrayElements(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
void ReleaseDoubleArrayElements(JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
void GetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
void GetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
void GetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
void GetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
void GetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
void GetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
void GetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
void GetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
void SetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
void SetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
void SetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
void SetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
void SetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
void SetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
void SetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
void SetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
jint RegisterNatives(JNIEnv *env, jclass clazz, JNINativeMethod *methods, jint nMethods);
jint UnregisterNatives(JNIEnv *env, jclass clazz);
jint MonitorEnter(JNIEnv *env, jobject obj);
jint MonitorExit(JNIEnv *env, jobject obj);
jint GetJavaVM(JNIEnv *env, JavaVM **vm);
void GetStringRegion(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
void GetStringUTFRegion(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
void GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy);
void ReleasePrimitiveArrayCritical(JNIEnv *env, jarray array, void *carray, jint mode);
jchar GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy);
void ReleaseStringCritical(JNIEnv *env, jstring string, jchar *cstring);
jweak NewWeakGlobalRef (JNIEnv *env, jobject obj);
void DeleteWeakGlobalRef (JNIEnv *env, jweak ref);
jboolean ExceptionCheck (JNIEnv *env);
jobject NewDirectByteBuffer(JNIEnv* env, void* address, jlong capacity);
void *etDirectBufferAddress(JNIEnv* env, jobject buf);
jlong GetDirectBufferCapacity (JNIEnv* env, jobject buf);
jobjectRefType GetObjectRefType (JNIEnv* env, jobject obj);
struct JNINativeInterface_ {
void *reserved0;
void *reserved1;
void *reserved2;
void *reserved3;
jint (__stdcall *GetVersion)(JNIEnv *env);
jclass (__stdcall *DefineClass)
(JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
jsize len);
jclass (__stdcall *FindClass)
(JNIEnv *env, const char *name);
jmethodID (__stdcall *FromReflectedMethod)
(JNIEnv *env, jobject method);
jfieldID (__stdcall *FromReflectedField)
(JNIEnv *env, jobject field);
jobject (__stdcall *ToReflectedMethod)
(JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
jclass (__stdcall *GetSuperclass)
(JNIEnv *env, jclass sub);
jboolean (__stdcall *IsAssignableFrom)
(JNIEnv *env, jclass sub, jclass sup);
jobject (__stdcall *ToReflectedField)
(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
jint (__stdcall *Throw)
(JNIEnv *env, jthrowable obj);
jint (__stdcall *ThrowNew)
(JNIEnv *env, jclass clazz, const char *msg);
jthrowable (__stdcall *ExceptionOccurred)
(JNIEnv *env);
void (__stdcall *ExceptionDescribe)
(JNIEnv *env);
void (__stdcall *ExceptionClear)
(JNIEnv *env);
void (__stdcall *FatalError)
(JNIEnv *env, const char *msg);
jint (__stdcall *PushLocalFrame)
(JNIEnv *env, jint capacity);
jobject (__stdcall *PopLocalFrame)
(JNIEnv *env, jobject result);
jobject (__stdcall *NewGlobalRef)
(JNIEnv *env, jobject lobj);
void (__stdcall *DeleteGlobalRef)
(JNIEnv *env, jobject gref);
void (__stdcall *DeleteLocalRef)
(JNIEnv *env, jobject obj);
jboolean (__stdcall *IsSameObject)
(JNIEnv *env, jobject obj1, jobject obj2);
jobject (__stdcall *NewLocalRef)
(JNIEnv *env, jobject ref);
jint (__stdcall *EnsureLocalCapacity)
(JNIEnv *env, jint capacity);
jobject (__stdcall *AllocObject)
(JNIEnv *env, jclass clazz);
jobject (__stdcall *NewObject)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jobject (__stdcall *NewObjectV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jobject (__stdcall *NewObjectA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jclass (__stdcall *GetObjectClass)
(JNIEnv *env, jobject obj);
jboolean (__stdcall *IsInstanceOf)
(JNIEnv *env, jobject obj, jclass clazz);
jmethodID (__stdcall *GetMethodID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (__stdcall *CallObjectMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jobject (__stdcall *CallObjectMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jobject (__stdcall *CallObjectMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
jboolean (__stdcall *CallBooleanMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jboolean (__stdcall *CallBooleanMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jboolean (__stdcall *CallBooleanMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
jbyte (__stdcall *CallByteMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jbyte (__stdcall *CallByteMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jbyte (__stdcall *CallByteMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jchar (__stdcall *CallCharMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jchar (__stdcall *CallCharMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jchar (__stdcall *CallCharMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jshort (__stdcall *CallShortMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jshort (__stdcall *CallShortMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jshort (__stdcall *CallShortMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jint (__stdcall *CallIntMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jint (__stdcall *CallIntMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jint (__stdcall *CallIntMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jlong (__stdcall *CallLongMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jlong (__stdcall *CallLongMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jlong (__stdcall *CallLongMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jfloat (__stdcall *CallFloatMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jfloat (__stdcall *CallFloatMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jfloat (__stdcall *CallFloatMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jdouble (__stdcall *CallDoubleMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jdouble (__stdcall *CallDoubleMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
jdouble (__stdcall *CallDoubleMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
void (__stdcall *CallVoidMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
void (__stdcall *CallVoidMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, void * args);
void (__stdcall *CallVoidMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
jobject (__stdcall *CallNonvirtualObjectMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jobject (__stdcall *CallNonvirtualObjectMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jobject (__stdcall *CallNonvirtualObjectMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue * args);
jboolean (__stdcall *CallNonvirtualBooleanMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jboolean (__stdcall *CallNonvirtualBooleanMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jboolean (__stdcall *CallNonvirtualBooleanMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue * args);
jbyte (__stdcall *CallNonvirtualByteMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jbyte (__stdcall *CallNonvirtualByteMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jbyte (__stdcall *CallNonvirtualByteMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jchar (__stdcall *CallNonvirtualCharMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jchar (__stdcall *CallNonvirtualCharMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jchar (__stdcall *CallNonvirtualCharMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jshort (__stdcall *CallNonvirtualShortMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jshort (__stdcall *CallNonvirtualShortMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jshort (__stdcall *CallNonvirtualShortMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jint (__stdcall *CallNonvirtualIntMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jint (__stdcall *CallNonvirtualIntMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jint (__stdcall *CallNonvirtualIntMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jlong (__stdcall *CallNonvirtualLongMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jlong (__stdcall *CallNonvirtualLongMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jlong (__stdcall *CallNonvirtualLongMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jfloat (__stdcall *CallNonvirtualFloatMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jfloat (__stdcall *CallNonvirtualFloatMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jfloat (__stdcall *CallNonvirtualFloatMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jdouble (__stdcall *CallNonvirtualDoubleMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jdouble (__stdcall *CallNonvirtualDoubleMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
jdouble (__stdcall *CallNonvirtualDoubleMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
void (__stdcall *CallNonvirtualVoidMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
void (__stdcall *CallNonvirtualVoidMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
void * args);
void (__stdcall *CallNonvirtualVoidMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue * args);
jfieldID (__stdcall *GetFieldID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (__stdcall *GetObjectField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jboolean (__stdcall *GetBooleanField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jbyte (__stdcall *GetByteField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jchar (__stdcall *GetCharField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jshort (__stdcall *GetShortField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jint (__stdcall *GetIntField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jlong (__stdcall *GetLongField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jfloat (__stdcall *GetFloatField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jdouble (__stdcall *GetDoubleField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
void (__stdcall *SetObjectField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
void (__stdcall *SetBooleanField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
void (__stdcall *SetByteField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
void (__stdcall *SetCharField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
void (__stdcall *SetShortField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
void (__stdcall *SetIntField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
void (__stdcall *SetLongField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
void (__stdcall *SetFloatField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
void (__stdcall *SetDoubleField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
jmethodID (__stdcall *GetStaticMethodID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (__stdcall *CallStaticObjectMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jobject (__stdcall *CallStaticObjectMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jobject (__stdcall *CallStaticObjectMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jboolean (__stdcall *CallStaticBooleanMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jboolean (__stdcall *CallStaticBooleanMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jboolean (__stdcall *CallStaticBooleanMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jbyte (__stdcall *CallStaticByteMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jbyte (__stdcall *CallStaticByteMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jbyte (__stdcall *CallStaticByteMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jchar (__stdcall *CallStaticCharMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jchar (__stdcall *CallStaticCharMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jchar (__stdcall *CallStaticCharMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jshort (__stdcall *CallStaticShortMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jshort (__stdcall *CallStaticShortMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jshort (__stdcall *CallStaticShortMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jint (__stdcall *CallStaticIntMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jint (__stdcall *CallStaticIntMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jint (__stdcall *CallStaticIntMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jlong (__stdcall *CallStaticLongMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jlong (__stdcall *CallStaticLongMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jlong (__stdcall *CallStaticLongMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jfloat (__stdcall *CallStaticFloatMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jfloat (__stdcall *CallStaticFloatMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jfloat (__stdcall *CallStaticFloatMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jdouble (__stdcall *CallStaticDoubleMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jdouble (__stdcall *CallStaticDoubleMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, void * args);
jdouble (__stdcall *CallStaticDoubleMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
void (__stdcall *CallStaticVoidMethod)
(JNIEnv *env, jclass cls, jmethodID methodID, ...);
void (__stdcall *CallStaticVoidMethodV)
(JNIEnv *env, jclass cls, jmethodID methodID, void * args);
void (__stdcall *CallStaticVoidMethodA)
(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
jfieldID (__stdcall *GetStaticFieldID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (__stdcall *GetStaticObjectField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jboolean (__stdcall *GetStaticBooleanField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jbyte (__stdcall *GetStaticByteField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jchar (__stdcall *GetStaticCharField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jshort (__stdcall *GetStaticShortField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jint (__stdcall *GetStaticIntField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jlong (__stdcall *GetStaticLongField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jfloat (__stdcall *GetStaticFloatField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jdouble (__stdcall *GetStaticDoubleField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
void (__stdcall *SetStaticObjectField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
void (__stdcall *SetStaticBooleanField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
void (__stdcall *SetStaticByteField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
void (__stdcall *SetStaticCharField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
void (__stdcall *SetStaticShortField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
void (__stdcall *SetStaticIntField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
void (__stdcall *SetStaticLongField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
void (__stdcall *SetStaticFloatField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
void (__stdcall *SetStaticDoubleField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
jstring (__stdcall *NewString)
(JNIEnv *env, const jchar *unicode, jsize len);
jsize (__stdcall *GetStringLength)
(JNIEnv *env, jstring str);
const jchar *(__stdcall *GetStringChars)
(JNIEnv *env, jstring str, jboolean *isCopy);
void (__stdcall *ReleaseStringChars)
(JNIEnv *env, jstring str, const jchar *chars);
jstring (__stdcall *NewStringUTF)
(JNIEnv *env, const char *utf);
jsize (__stdcall *GetStringUTFLength)
(JNIEnv *env, jstring str);
const char* (__stdcall *GetStringUTFChars )
(JNIEnv *env, jstring str, jboolean *isCopy);
void (__stdcall *ReleaseStringUTFChars)
(JNIEnv *env, jstring str, const char* chars);
jsize (__stdcall *GetArrayLength)
(JNIEnv *env, jarray array);
jobjectArray (__stdcall *NewObjectArray)
(JNIEnv *env, jsize len, jclass clazz, jobject init);
jobject (__stdcall *GetObjectArrayElement)
(JNIEnv *env, jobjectArray array, jsize index);
void (__stdcall *SetObjectArrayElement)
(JNIEnv *env, jobjectArray array, jsize index, jobject val);
jbooleanArray (__stdcall *NewBooleanArray)
(JNIEnv *env, jsize len);
jbyteArray (__stdcall *NewByteArray)
(JNIEnv *env, jsize len);
jcharArray (__stdcall *NewCharArray)
(JNIEnv *env, jsize len);
jshortArray (__stdcall *NewShortArray)
(JNIEnv *env, jsize len);
jintArray (__stdcall *NewIntArray)
(JNIEnv *env, jsize len);
jlongArray (__stdcall *NewLongArray)
(JNIEnv *env, jsize len);
jfloatArray (__stdcall *NewFloatArray)
(JNIEnv *env, jsize len);
jdoubleArray (__stdcall *NewDoubleArray)
(JNIEnv *env, jsize len);
jboolean * (__stdcall *GetBooleanArrayElements)
(JNIEnv *env, jbooleanArray array, jboolean *isCopy);
jbyte * (__stdcall *GetByteArrayElements)
(JNIEnv *env, jbyteArray array, jboolean *isCopy);
jchar * (__stdcall *GetCharArrayElements)
(JNIEnv *env, jcharArray array, jboolean *isCopy);
jshort * (__stdcall *GetShortArrayElements)
(JNIEnv *env, jshortArray array, jboolean *isCopy);
jint * (__stdcall *GetIntArrayElements)
(JNIEnv *env, jintArray array, jboolean *isCopy);
jlong * (__stdcall *GetLongArrayElements)
(JNIEnv *env, jlongArray array, jboolean *isCopy);
jfloat * (__stdcall *GetFloatArrayElements)
(JNIEnv *env, jfloatArray array, jboolean *isCopy);
jdouble * (__stdcall *GetDoubleArrayElements)
(JNIEnv *env, jdoubleArray array, jboolean *isCopy);
void (__stdcall *ReleaseBooleanArrayElements)
(JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
void (__stdcall *ReleaseByteArrayElements)
(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
void (__stdcall *ReleaseCharArrayElements)
(JNIEnv *env, jcharArray array, jchar *elems, jint mode);
void (__stdcall *ReleaseShortArrayElements)
(JNIEnv *env, jshortArray array, jshort *elems, jint mode);
void (__stdcall *ReleaseIntArrayElements)
(JNIEnv *env, jintArray array, jint *elems, jint mode);
void (__stdcall *ReleaseLongArrayElements)
(JNIEnv *env, jlongArray array, jlong *elems, jint mode);
void (__stdcall *ReleaseFloatArrayElements)
(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
void (__stdcall *ReleaseDoubleArrayElements)
(JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
void (__stdcall *GetBooleanArrayRegion)
(JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
void (__stdcall *GetByteArrayRegion)
(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
void (__stdcall *GetCharArrayRegion)
(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
void (__stdcall *GetShortArrayRegion)
(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
void (__stdcall *GetIntArrayRegion)
(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
void (__stdcall *GetLongArrayRegion)
(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
void (__stdcall *GetFloatArrayRegion)
(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
void (__stdcall *GetDoubleArrayRegion)
(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
void (__stdcall *SetBooleanArrayRegion)
(JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
void (__stdcall *SetByteArrayRegion)
(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
void (__stdcall *SetCharArrayRegion)
(JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
void (__stdcall *SetShortArrayRegion)
(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
void (__stdcall *SetIntArrayRegion)
(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
void (__stdcall *SetLongArrayRegion)
(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
void (__stdcall *SetFloatArrayRegion)
(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
void (__stdcall *SetDoubleArrayRegion)
(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
jint (__stdcall *RegisterNatives)
(JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
jint nMethods);
jint (__stdcall *UnregisterNatives)
(JNIEnv *env, jclass clazz);
jint (__stdcall *MonitorEnter)
(JNIEnv *env, jobject obj);
jint (__stdcall *MonitorExit)
(JNIEnv *env, jobject obj);
jint (__stdcall *GetJavaVM)
(JNIEnv *env, JavaVM **vm);
void (__stdcall *GetStringRegion)
(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
void (__stdcall *GetStringUTFRegion)
(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
void * (__stdcall *GetPrimitiveArrayCritical)
(JNIEnv *env, jarray array, jboolean *isCopy);
void (__stdcall *ReleasePrimitiveArrayCritical)
(JNIEnv *env, jarray array, void *carray, jint mode);
const jchar * (__stdcall *GetStringCritical)
(JNIEnv *env, jstring string, jboolean *isCopy);
void (__stdcall *ReleaseStringCritical)
(JNIEnv *env, jstring string, const jchar *cstring);
jweak (__stdcall *NewWeakGlobalRef)
(JNIEnv *env, jobject obj);
void (__stdcall *DeleteWeakGlobalRef)
(JNIEnv *env, jweak ref);
jboolean (__stdcall *ExceptionCheck)
(JNIEnv *env);
jobject (__stdcall *NewDirectByteBuffer)
(JNIEnv* env, void* address, jlong capacity);
void* (__stdcall *GetDirectBufferAddress)
(JNIEnv* env, jobject buf);
jlong (__stdcall *GetDirectBufferCapacity)
(JNIEnv* env, jobject buf);
jobjectRefType (__stdcall *GetObjectRefType)
(JNIEnv* env, jobject obj);
};
struct JNIEnv_ {
const struct JNINativeInterface_ *functions;
};
typedef struct JavaVMOption {
char *optionString;
void *extraInfo;
} JavaVMOption;
typedef struct JavaVMInitArgs {
jint version;
jint nOptions;
JavaVMOption *options;
jboolean ignoreUnrecognized;
} JavaVMInitArgs;
typedef struct JavaVMAttachArgs {
jint version;
char *name;
jobject group;
} JavaVMAttachArgs;
jint DestroyJavaVM(JavaVM *vm);
jint AttachCurrentThread(JavaVM *vm, void **penv, void *args);
jint DetachCurrentThread(JavaVM *vm);
jint GetEnv(JavaVM *vm, void **penv, jint version);
jint AttachCurrentThreadAsDaemon(JavaVM *vm, void **penv, void *args);
struct JNIInvokeInterface_ {
void *reserved0;
void *reserved1;
void *reserved2;
jint (__stdcall *DestroyJavaVM)(JavaVM *vm);
jint (__stdcall *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
jint (__stdcall *DetachCurrentThread)(JavaVM *vm);
jint (__stdcall *GetEnv)(JavaVM *vm, void **penv, jint version);
jint (__stdcall *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
};
struct JavaVM_ {
const struct JNIInvokeInterface_ *functions;
};
__declspec(dllimport) jint __stdcall
JNI_GetDefaultJavaVMInitArgs(void *args);
__declspec(dllimport) jint __stdcall
JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
__declspec(dllimport) jint __stdcall
JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
__declspec(dllexport) jint __stdcall
JNI_OnLoad(JavaVM *vm, void *reserved);
__declspec(dllexport) void __stdcall
JNI_OnUnload(JavaVM *vm, void *reserved);