Pointers returned from dll function when called from rebol -
i trying ascertain weather can use rebol few programming tasks. have written small program loads external library , calls function returns pointers in of arguments. when run program crashes rebol.exe. hoping can me out. dll function follows:
void xxx swe_utc_time_zone(int32 iyear, int32 imonth, int32 iday, int32 ihour, int32 imin, double dsec, double dtimezone, int32 *iyear_utc, int32 *imonth_utc, int32 *iday_utc, int32 *ihour_utc, int32 *imin_utc, double *dsec_utc)
and small test program:
rebol [] astrology-lib: load/library %/c/sweph/bin/swedll32.dll swe-utc-time-zone: make routine! [ iyear [integer!] imonth [integer!] iday [integer!] ihour [integer!] iminute [integer!] dsec [decimal!] dtimezone [decimal!] iyear-utc [char*] imonth-utc [char*] iday-utc [char*] ihour-utc [char*] iminute-utc [char*] dsec-utc [char*] ] astrology-lib "_swe_utc_time_zone@60" swe-utc-time-zone 2015 6 20 0 19 0 -4.5 none none none none none none
the program crashes on last line attempt call function. error message "rebol/view system has stopped working"
you have provide memory @ least same size pointer want call.
so instead of none should use words initialized along line of
iyear-utc: make struct! [ point [integer!] ] none
maybe these links give more adress, conversions, more conversions
Comments
Post a Comment