The ParserTemporaryLockFrame function locks a frame when it enters a parser, and unlocks the frame when it exits.
LPBYTE ParserTemporaryLockFrame(
HFRAME hFrame
);
A pointer to the first byte of data in the frame.
Parsers should not call LockFrame. If a parser takes a lock and then gets faulted or returns without unlocking, it leaves the system in a state where it cannot change protocols or cut/copy frames. Parsers should use ParserTemporaryLockFrame, which grants a lock only during the context of the API entry into the parser. The lock is released on exit from the parser for that frame. This means that the pointer will be valid only after the parser returns from the AttachProperties or RecognizeFrame call.