The correct syntax is: int ei_get_type(const char *buf, const int *index, int *type, int *size) It appears in the documentation(*) as: int ei_get_type(const ei_x_buff* x, int *type, int *size) -Vance (*) ~/lib/erlang/lib/erl_interface-3.3.2/doc/html/ei.html