2 * Copyright 1999 Marcus Meissner
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
28 int n=0,doabout=0,doconfigure=0;
29 char buf[128],type[5],handler[5];
30 HMODULE msvfw32 = LoadLibrary("msvfw32.dll");
32 BOOL (VFWAPI *fnICInfo)(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
33 LRESULT (VFWAPI *fnICClose)(HIC hic);
34 HIC (VFWAPI *fnICOpen)(DWORD fccType, DWORD fccHandler, UINT wMode);
35 LRESULT (VFWAPI *fnICGetInfo)(HIC hic,ICINFO *picinfo, DWORD cb);
36 LRESULT (VFWAPI *fnICSendMessage)(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
38 #define XX(x) fn##x = (void*)GetProcAddress(msvfw32,#x);
46 if (strstr(cmdline,"-about"))
48 if (strstr(cmdline,"-configure"))
51 printf("Currently installed Video Compressors:\n");
56 ii.dwSize = sizeof(ii);
57 if (!fnICInfo(ICTYPE_VIDEO,n++,&ii))
59 if (!(hic=fnICOpen(ii.fccType,ii.fccHandler,ICMODE_QUERY)))
61 if (!fnICGetInfo(hic,&ii,sizeof(ii))) {
65 #define w2s(w,s) WideCharToMultiByte(0,0,w,-1,s,128,0,NULL)
68 memcpy(type,&(ii.fccType),4);type[4]='\0';
69 memcpy(handler,&(ii.fccHandler),4);handler[4]='\0';
70 printf("%s.%s: %s\n",type,handler,buf);
71 printf("\tdwFlags: 0x%08lx (",ii.dwFlags);
72 #define XX(x) if (ii.dwFlags & x) printf(#x" ");
76 XX(VIDCF_COMPRESSFRAMES);
78 XX(VIDCF_FASTTEMPORALC);
79 XX(VIDCF_FASTTEMPORALD);
80 XX(VIDCF_QUALITYTIME);
83 printf("\tdwVersion: 0x%08lx\n",ii.dwVersion);
84 printf("\tdwVersionICM: 0x%08lx\n",ii.dwVersionICM);
85 w2s(ii.szDescription,buf);
86 printf("\tszDescription: %s\n",buf);
87 if (doabout) ICAbout(hic,0);
88 if (doconfigure && ICQueryConfigure(hic))