CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: notverybright

Search: Search took 0.05 seconds; generated 22 minute(s) ago.

  1. How to run WndProc and pcap_loop callbacks

    After writing a console based app that uses Npcap libs to process packets, I've started on a Windows desktop app using VS 2022 C++ Win32 API which, at the moment, just displays packet source and...
  2. Re: Custom images not appearing in Toolbar buttons

    Hi Victor, Sorry, was there an imagein your reply ? Clicking the image to open it gives a 404 error
  3. Custom images not appearing in Toolbar buttons

    Hi,
    I'm trying to get my own images in Toolbar buttons but the buttons just have the text. I added the images as resources in the project. Any idea what I am missing? Here is the function (IDB_PNG1...
  4. Re: Using npcap libs to save packet causes memory fault

    shortTTL = ntohs(*((u_short*)ptrCurrent_Field));

    ...worked and it looks neater than the workaround I used. Thanks a lot to all who replied. It gives me a pointer (pun intended) for something to...
  5. Re: Using npcap libs to save packet causes memory fault

    Thanks 2kaud. I tried that, but unfortunately I didn't get the right result. *ptrCurrent_Field points to a byte with value 0x0f, the next byte is d3, but after the command "shortTTL =...
  6. Re: Using npcap libs to save packet causes memory fault

    ptrCurrent_Field is type u_char* I was using that as a general pointer as a reference to the next field in the packet to decode and casting it to be a pointer to a short int. I got it from a forum...
  7. Re: Using npcap libs to save packet causes memory fault

    I allocated memory to a byte array and copied the packet data to the array which worked no problem and referenced the byte array instead when decoding the packet, but the same error occurred.
    I've...
  8. Re: Using npcap libs to save packet causes memory fault

    Thanks for the reply salem_c. I'm teaching myself C++ using Visual Studio in Windows and looking at your sample code, do I need to allocate memory for the captured packet? The sample Npcap code...
  9. Re: Using npcap libs to save packet causes memory fault

    UPDATE: I commented out the line "pcap_dump(dumpfile, header, pkt_data);" which left the lines to open the file "dumpfile = pcap_dump_open(adhandle, argv[2]);" and close the file...
  10. [RESOLVED] Using npcap libs to save packet causes memory fault

    Hi,
    I'm writing a command line utility to process a particular type of packet using a filter. The utility has worked every time, no problem at all but when I added code to save the packet to a .pcap...
  11. Re: Compiler error when using "#include " and/or "#include "

    Sorry, my mistake, I did use "#include" rather than just "include".

    @2kaud - you were right, I had my code in a file with a .c extension. I changed it to a .cpp and it works now. I was using...
  12. Compiler error when using "#include " and/or "#include "

    Hi,
    I'm teaching myself C++ using MS Visual Studio Community 2022, so I'm a newbie. I've written some code and I've decided to write the output of the application to text file, so I added these...
Results 1 to 12 of 12





Click Here to Expand Forum to Full Width

Featured