This is sketchy.  Can you really guarantee that sizeof(std::vector<KFS::KfsFileAttr>::iterator) == sizeof(void *)?  Why does the structure need to be exposed to C?  The vector is heap-allocated anyway; the entire struct could be replaced by a void * opaque handle.