2018-11-14 18:15:58 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2018-11-14 22:00:25 +00:00
|
|
|
typedef long long int lli;
|
|
|
|
|
|
|
|
void* image=NULL;
|
|
|
|
|
|
|
|
void setSource(lli address) {
|
|
|
|
image=(void*)address;
|
|
|
|
}
|
|
|
|
|
2018-11-14 18:15:58 +00:00
|
|
|
int convert(int px[], int *out[]) {
|
|
|
|
printf("convert...\n");
|
2018-11-14 22:00:25 +00:00
|
|
|
printf("px0: %d\n", px[0]);
|
|
|
|
*out[0]=19;
|
2018-11-14 18:15:58 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void __attribute__ ((constructor)) initLibrary(void) {
|
|
|
|
//
|
|
|
|
// Function that is called when the library is loaded
|
|
|
|
//
|
|
|
|
printf("Library is initialized\n");
|
|
|
|
}
|
|
|
|
void __attribute__ ((destructor)) cleanUpLibrary(void) {
|
|
|
|
//
|
|
|
|
// Function that is called when the library is »closed«.
|
|
|
|
//
|
|
|
|
printf("Library is exited\n");
|
|
|
|
}
|