{
BYTE hStream; // stream handle
WPARAM wSubMsg; // sub message
} VF_CALLBACK_STRUCT, *PVF_CALLBACK_STRUCT, *LPVF_CALLBACK_STRUCT;
#pragma pack(4)
typedef struct tagVF_BUFWRITE_STRUCT
{
VF_CALLBACK_STRUCT vfcallback;
BYTE *lpBuffer; // pointer to the driver buffer
DWORD dwBufferSize; // size of the buffer in bytes
DWORD dwBufferWrite; // encoded data length in bytes
} VF_BUFWRITE_STRUCT, *PVF_BUFWRITE_STRUCT, *LPVF_BUFWRITE_STRUCT;
typedef struct tagVF_TRANSCODE
{
WORD wAlgorithm;
WORD wChannel;
DWORD dwSampleRate;
DWORD dwBitRate;
WORD wMode;
} VF_TRANSCODE;
#pragma pack()
// rke: definition of VF_CALLBACK (prototype for callback functions)
typedef WORD (CALLBACK *VF_CALLBACK)(HANDLE hDriver, UINT msg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
/*
// C sample callback function
WORD CALLBACK MyCallback(HANDLE hDriver, UINT msg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
// hDriver unused
// dwUser unused
//
PVF_BUFWRITE_STRUCT pbw = (PVF_BUFWRITE_STRUCT)dwParam1;
PVOID pvRefData = (PVOID)dwParam2;
switch (msg) {
case VF_MSG_BUF_CREATE + WM_USER:
break;
case VF_MSG_BUF_WRITE + WM_USER:
break;
case VF_MSG_BUF_CLOSE + WM_USER:
break;
default:;
}