Maikl Korleone Posted April 6, 2009 Report Share Posted April 6, 2009 Пишу на с++ в Visual Studio 2005. При компиляции выдает ошибку error C2664: 'pcap_loop' : cannot convert parameter 3 from 'int (__cdecl *)(u_char *,const pcap_pkthdr *,const u_char *)' to 'pcap_handler' None of the functions with this name in scope match the target type на вызов функции: pcap_loop(fp, 0, got_packet, NULL);...int got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packet) Собственно, что делать? Link to comment Share on other sites More sharing options...
Darhazer Posted April 8, 2009 Report Share Posted April 8, 2009 got_packet должна быт void, а не int Link to comment Share on other sites More sharing options...
Maikl Korleone Posted April 9, 2009 Author Report Share Posted April 9, 2009 Да, спасибо, вчера уже сам дошел, прочитал, что callback функция должна иметь определенный прототип и менять его нельзя Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now