DirectShow (DirectX) question

From: ET (
Date: 12/14/03

Date: Mon, 15 Dec 2003 03:42:22 +0800

Hi, I am exploring the use of DirectShow (from DirectX 9.0 SDK)
Here is a task I want to perform:
Step 1: Connect to my web cam
Step 2: When I hit a button in the GUI or press a key, a function
(self-written) is called which takes the current view from the cam and
stores the data in memory (NOT in a file) for further processing

I achieved Step 1, but I don't know how to write the function in Step 2.
Please help me to find out if you are interested. Thanks