I'm reading the source code of AVChat. It's a video chat program using UDP and DirectShow. In the header file GlobalDef.h, however, I find some definitions as below:
// Messages
const long msg_FilterGraphError = 'avct' + 1;
const long msg_MediaTypeReceived = 'avct' + 2;
const long msg_TCPSocketAccepted = 'avct' + 3;
const long msg_UDPCommandReceived = 'avct' + 4;
const long msg_ModifyFilterGraph = 'avct' + 5;
// Let the main thread modify filter graph
#define WM_ModifyFilterGraph (WM_USER+123)
// UDP command defines
const long MAX_COMMAND_SIZE = 100;
const long cmd_ClientCalling = 'avct' + 100;
const long cmd_DeviceConfig = 'avct' + 101;
const long cmd_BuildFilterGraph = 'avct' + 102;
const long cmd_DisconnectRequest = 'avct' + 103;
I thought ''
is used to surround a single char, so why this code runs without problem on my VS2010? These long consts are used as commands sent from client to server. I've set a breakpoint to watch the value, and VS tells me 'avct' = 1635148660
. I've also tried to search for 'avct' in the entire solution and find no match except these. So please someone tell me how is the value of 'avct'
is generated.
EDIT:
I find that if you put multiple characters between ''
and feed it to a char variable, only the last character is transferred. That can explain why 'avct'
won't report an error, but I still don't know how the value is generated.