1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

help needed with streams

Discussion in 'C' started by tootypegs, Apr 1, 2008.

  1. tootypegs

    tootypegs New Member

    Joined:
    Nov 25, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    hello, i am completelt stuck and i have no idea how to proceed and hoping that you guys may help. using memcmp i loop through my file finding every instance of a search criteria and return its byte position in 'pos'.

    Everytime i get a return for pos, i want to start at that byte and stream the data into another file until i hit another search criteria. An example of my file could be


    blahblahblahblahblahblahSTART datadatadatadatadatadatadatadata STOPblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah
    blahblahblahblahblahblahblahblahblah START datadatadatadatadatadatadatadata STOP blah

    so far i loop through my file and return the byte position of each start fine. Could anyone help me to contruct a stream that starts at this position and streams the data until it reaches the end criteria

    I am using memcmp because the end criteria for each stop position is a hex string
    0xFF, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00


    i would be EXTREMELY greatful for any help and can post the code i have if it will be of help?
     

Share This Page