Changeset 1607 for trunk/src


Ignore:
Timestamp:
Nov 5, 1999, 10:19:27 AM (26 years ago)
Author:
sandervl
Message:

Jens Weissner's update

Location:
trunk/src
Files:
5 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/imm32/imm32.cpp

    r1012 r1607  
    1 /* $Id: imm32.cpp,v 1.2 1999-09-23 09:38:04 sandervl Exp $ */
     1/* $Id: imm32.cpp,v 1.3 1999-11-05 09:17:59 sandervl Exp $ */
    22/*
    33 *      IMM32 library
     
    324324    {
    325325    default:
    326 //      FIXME("%s not supported",GetVersionName());
     326        dprintf(("OS not supported"));
    327327    case WIN95:
    328328      return 0xffffffff;
     
    344344    {
    345345    default:
    346 //      FIXME("%s not supported",GetVersionName());
     346      dprintf(("OS not supported"));
    347347    case WIN95:
    348348      return 0xffffffff;
     
    651651    {
    652652    default:
    653 //      FIXME("%s not supported", GetVersionName());
     653      dprintf(("OS not supported"));
    654654    case WIN95:
    655655      return VK_PROCESSKEY;
  • trunk/src/imm32/makefile

    r1585 r1607  
    1 # $Id: makefile,v 1.3 1999-11-03 23:28:05 sandervl Exp $
     1# $Id: makefile,v 1.4 1999-11-05 09:17:59 sandervl Exp $
    22
    33#
     
    4242
    4343clean:
    44         $(RM) *.obj *.lib *.dll *~ *.map *.pch
     44        $(RM) *.obj *.lib *.dll *.map *.pch
    4545        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    4646        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • trunk/src/msacm32/internal.cpp

    r972 r1607  
    1 /* $Id: internal.cpp,v 1.2 1999-09-18 15:57:10 sandervl Exp $ */
     1/* -*- tab-width: 8; c-basic-offset: 4 -*- */
     2
    23/*
    34 *      MSACM32 library
    45 *
    56 *      Copyright 1998  Patrik Stridvall
    6  *      Copyright 1999  Jens Wiessner
     7 *                1999  Eric Pouech
    78 */
    89
    910#include <os2win.h>
    10 #include <stdio.h>
    11 #include <stdlib.h>
    1211#include <string.h>
    13 #include <odinwrap.h>
    1412
    1513#include "winbase.h"
     
    2119#include "msacm.h"
    2220#include "msacmdrv.h"
     21#include "wineacm.h"
    2322#include "debugtools.h"
     23
     24DEFAULT_DEBUG_CHANNEL(msacm)   
    2425
    2526/**********************************************************************/
     
    2829PWINE_ACMDRIVERID MSACM_pFirstACMDriverID = NULL;
    2930PWINE_ACMDRIVERID MSACM_pLastACMDriverID = NULL;
    30 INT         WINAPI lstrncmpiA(LPCSTR,LPCSTR,INT);
    31 
    3231
    3332/***********************************************************************
    3433 *           MSACM_RegisterDriver32()
    3534 */
    36 PWINE_ACMDRIVERID MSACM_RegisterDriver(
    37   LPSTR pszDriverAlias, LPSTR pszFileName,
    38   PWINE_ACMLOCALDRIVER pLocalDriver)
    39 {
    40   PWINE_ACMDRIVERID padid;
    41   padid = (PWINE_ACMDRIVERID) HeapAlloc(
    42     MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID)
    43   );
    44   padid->pszDriverAlias =
    45     HEAP_strdupA(MSACM_hHeap, 0, pszDriverAlias);
    46   padid->pszFileName =
    47     HEAP_strdupA(MSACM_hHeap, 0, pszFileName);
    48   padid->pACMLocalDriver = pLocalDriver;
    49   padid->bEnabled = TRUE;
    50   padid->pACMDriver = NULL;
    51   padid->pNextACMDriverID = NULL;
    52   padid->pPreviousACMDriverID =
    53     MSACM_pLastACMDriverID;
    54   MSACM_pLastACMDriverID = padid;
    55   if(!MSACM_pFirstACMDriverID)
    56     MSACM_pFirstACMDriverID = padid;
     35PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
     36                                       HINSTANCE hinstModule)
     37{
     38    PWINE_ACMDRIVERID padid;
    5739
    58   return padid;
     40    TRACE("('%s', '%s', 0x%08x)\n", pszDriverAlias, pszFileName, hinstModule);
     41
     42    padid = (PWINE_ACMDRIVERID) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID));
     43    padid->pszDriverAlias = HEAP_strdupA(MSACM_hHeap, 0, pszDriverAlias);
     44    padid->pszFileName = HEAP_strdupA(MSACM_hHeap, 0, pszFileName);
     45    padid->hInstModule = hinstModule;
     46    padid->bEnabled = TRUE;
     47    padid->pACMDriver = NULL;
     48    padid->pNextACMDriverID = NULL;
     49    padid->pPreviousACMDriverID = MSACM_pLastACMDriverID;
     50    if (MSACM_pLastACMDriverID)
     51        MSACM_pLastACMDriverID->pNextACMDriverID = padid;
     52    MSACM_pLastACMDriverID = padid;
     53    if (!MSACM_pFirstACMDriverID)
     54        MSACM_pFirstACMDriverID = padid;
     55   
     56    return padid;
    5957}
    6058
     
    6260 *           MSACM_RegisterAllDrivers32()
    6361 */
    64 void MSACM_RegisterAllDrivers()
     62void MSACM_RegisterAllDrivers(void)
    6563{
    66   PWINE_ACMBUILTINDRIVER pbd;
    67   LPSTR pszBuffer;
    68   DWORD dwBufferLength;
    69 
    70   /* FIXME
    71    *  What if the user edits system.ini while the program is running?
    72    *  Does Windows handle that?
    73    */
    74   if(!MSACM_pFirstACMDriverID)
    75     return;
    76 
    77   /* FIXME: Do not work! How do I determine the section length? */
    78   dwBufferLength =
    79     GetPrivateProfileSectionA("drivers32", NULL, 0, "system.ini");
    80 
    81   pszBuffer = (LPSTR) HeapAlloc(
    82     MSACM_hHeap, 0, dwBufferLength
    83   );
    84   if(GetPrivateProfileSectionA(
    85     "drivers32", pszBuffer, dwBufferLength, "system.ini"))
    86     {
    87       char *s = pszBuffer;
    88       while(*s)
    89         {
    90           if(!lstrncmpiA("MSACM.", s, 6))
    91             {
    92               char *s2 = s;
    93               while(*s2 != '\0' && *s2 != '=') s2++;
    94               if(*s2)
    95                 {
    96                   *s2++='\0';
    97                   MSACM_RegisterDriver(s, s2, NULL);
     64    LPSTR pszBuffer;
     65    DWORD dwBufferLength;
     66   
     67    /* FIXME
     68     *  What if the user edits system.ini while the program is running?
     69     *  Does Windows handle that?
     70     */
     71    if (MSACM_pFirstACMDriverID)
     72        return;
     73   
     74    /* FIXME: Do not work! How do I determine the section length? */
     75    dwBufferLength = 1024;
     76/* EPP  GetPrivateProfileSectionA("drivers32", NULL, 0, "system.ini"); */
     77   
     78    pszBuffer = (LPSTR) HeapAlloc(MSACM_hHeap, 0, dwBufferLength);
     79    if (GetPrivateProfileSectionA("drivers32", pszBuffer, dwBufferLength, "system.ini")) {
     80        char* s = pszBuffer;
     81        while (*s) {
     82            if (!lstrncmpiA("MSACM.", s, 6)) {
     83                char *s2 = s;
     84                while (*s2 != '\0' && *s2 != '=') s2++;
     85                if (*s2) {
     86                    *s2++ = '\0';
     87                    MSACM_RegisterDriver(s, s2, 0);
    9888                }
    9989            } 
    100           s += lstrlenA(s) + 1; /* Either next char or \0 */
     90            s += lstrlenA(s) + 1; /* Either next char or \0 */
    10191        }
    10292    }
    103 
    104   /* FIXME
    105    *   Check if any of the builtin driver was added
    106    *   when the external drivers was.
    107    */
    108 
    109   pbd = MSACM_BuiltinDrivers;
    110   while(pbd->pszDriverAlias)
    111     {
    112       PWINE_ACMLOCALDRIVER pld;
    113       pld = (PWINE_ACMLOCALDRIVER) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER));
    114       pld->pfnDriverProc = pbd->pfnDriverProc;
    115       MSACM_RegisterDriver(pbd->pszDriverAlias, NULL, pld);
    116       pbd++;
    117     }
    118    HeapFree(MSACM_hHeap, 0, pszBuffer);
     93   
     94    HeapFree(MSACM_hHeap, 0, pszBuffer);
    11995}
    12096
     
    124100PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
    125101{
    126   PWINE_ACMDRIVERID pNextACMDriverID;
     102    PWINE_ACMDRIVERID pNextACMDriverID;
     103   
     104    if (p->pACMDriver)
     105        acmDriverClose((HACMDRIVER) p->pACMDriver, 0);
     106   
     107    if (p->pszDriverAlias)
     108        HeapFree(MSACM_hHeap, 0, p->pszDriverAlias);
     109    if (p->pszFileName)
     110        HeapFree(MSACM_hHeap, 0, p->pszFileName);
     111   
     112    if (p == MSACM_pFirstACMDriverID)
     113        MSACM_pFirstACMDriverID = p->pNextACMDriverID;
     114    if (p == MSACM_pLastACMDriverID)
     115        MSACM_pLastACMDriverID = p->pPreviousACMDriverID;
    127116
    128   if(p->pACMDriver)
    129     acmDriverClose((HACMDRIVER) p->pACMDriver, 0);
    130 
    131   if(p->pszDriverAlias)
    132     HeapFree(MSACM_hHeap, 0, p->pszDriverAlias);
    133   if(p->pszFileName)
    134     HeapFree(MSACM_hHeap, 0, p->pszFileName);
    135   if(p->pACMLocalDriver)
    136     HeapFree(MSACM_hHeap, 0, p->pACMLocalDriver);
    137 
    138   if(p->pPreviousACMDriverID)
    139     p->pPreviousACMDriverID->pNextACMDriverID = p->pNextACMDriverID;
    140   if(p->pNextACMDriverID)
    141     p->pNextACMDriverID->pPreviousACMDriverID = p->pPreviousACMDriverID;
    142 
    143   pNextACMDriverID = p->pNextACMDriverID;
    144 
    145   HeapFree(MSACM_hHeap, 0, p);
    146 
    147   return pNextACMDriverID;
     117    if (p->pPreviousACMDriverID)
     118        p->pPreviousACMDriverID->pNextACMDriverID = p->pNextACMDriverID;
     119    if (p->pNextACMDriverID)
     120        p->pNextACMDriverID->pPreviousACMDriverID = p->pPreviousACMDriverID;
     121   
     122    pNextACMDriverID = p->pNextACMDriverID;
     123   
     124    HeapFree(MSACM_hHeap, 0, p);
     125   
     126    return pNextACMDriverID;
    148127}
    149128
     
    153132 *   Where should this function be called?
    154133 */
    155 void MSACM_UnregisterAllDrivers()
     134void MSACM_UnregisterAllDrivers(void)
    156135{
    157   PWINE_ACMDRIVERID p = MSACM_pFirstACMDriverID;
    158   while(p) p = MSACM_UnregisterDriver(p);
     136    PWINE_ACMDRIVERID p;
     137
     138    for (p = MSACM_pFirstACMDriverID; p; p = MSACM_UnregisterDriver(p));
    159139}
    160140
     
    164144PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
    165145{
    166   return (PWINE_ACMDRIVERID) hDriverID;
     146    return (PWINE_ACMDRIVERID)hDriverID;
    167147}
    168148
     
    172152PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
    173153{
    174   return (PWINE_ACMDRIVER) hDriver;
     154    return (PWINE_ACMDRIVER)hDriver;
    175155}
    176156
     
    180160PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj)
    181161{
    182   return (PWINE_ACMOBJ) hObj;
    183 }
    184 
    185 /***********************************************************************
    186  *           MSACM_OpenDriverProc32
    187  * FIXME
    188  *  This function should be integrated with OpenDriver,
    189  *  renamed and moved there.
    190  */
    191 HDRVR MSACM_OpenDriverProc(DRIVERPROC pfnDriverProc)
    192 {
    193 #if 0
    194   LPDRIVERITEMA pDrvr;
    195 
    196   /* FIXME: This is a very bad solution */
    197   pDrvr = (LPDRIVERITEMA) HeapAlloc(MSACM_hHeap, HEAP_ZERO_MEMORY, sizeof(DRIVERITEMA));
    198   pDrvr->count = 1;
    199   pDrvr->driverproc = pfnDriverProc;
    200  
    201   /* FIXME: Send DRV_OPEN among others to DriverProc */
    202 
    203   return (HDRVR) pDrvr;
    204 #else
    205   return (HDRVR) 0;
    206 #endif
     162    return (PWINE_ACMOBJ)hObj;
    207163}
    208164
  • trunk/src/msacm32/makefile

    r1585 r1607  
    1 # $Id: makefile,v 1.4 1999-11-03 23:28:05 sandervl Exp $
     1# $Id: makefile,v 1.5 1999-11-05 09:19:15 sandervl Exp $
    22
    33#
     
    2121TARGET = msacm32
    2222
    23 OBJS =  msacm32.obj builtin.obj internal.obj initterm.obj
     23OBJS =  msacm32.obj filter.obj format.obj internal.obj \
     24        stream.obj driver.obj  initterm.obj
    2425
    2526all: $(TARGET).dll $(TARGET).lib
     
    4041
    4142
     43msacm32.obj: msacm32.cpp
     44driver.obj: driver.cpp
     45filter.obj: filter.cpp
     46format.obj: format.cpp
     47internal.obj: internal.cpp
     48stream.obj: stream.cpp
    4249initterm.obj: initterm.cpp
    43 internal.obj: internal.cpp
    44 msacm32.obj: msacm32.cpp
    45 builtin.obj: builtin.cpp
     50
    4651
    4752clean:
    48         $(RM) *.obj *.lib *.dll *~ *.map *.pch
     53        $(RM) *.obj *.lib *.dll *.map *.pch
    4954        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    5055        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • trunk/src/msacm32/msacm32.cpp

    r1118 r1607  
    1 /* $Id: msacm32.cpp,v 1.3 1999-10-04 09:55:58 sandervl Exp $ */
     1/* -*- tab-width: 8; c-basic-offset: 4 -*- */
     2
    23/*
    34 *      MSACM32 library
    45 *
    56 *      Copyright 1998  Patrik Stridvall
    6  *      Copyright 1999  Jens Wiessner
     7 *                1999  Eric Pouech
    78 */
    89
    910#include <os2win.h>
    10 #include <winerror.h>
    11 #include <windef.h>
    12 #include <winuser.h>
    13 #include <misc.h>
    14 #include <odinwrap.h>
     11#include "winbase.h"
     12#include "winerror.h"
     13#include "windef.h"
     14#include "debugtools.h"
    1515#include "msacm.h"
    1616#include "msacmdrv.h"
     17#include "wineacm.h"
    1718#include "winversion.h"
    18 #include "winreg.h"
    19 #include "debugtools.h"
    20 #include <debugdefs.h>
    21 
    2219
    2320DEFAULT_DEBUG_CHANNEL(msacm)
    24 
     21       
    2522/**********************************************************************/
    26 
     23       
    2724static DWORD MSACM_dwProcessesAttached = 0;
    2825
     
    3027 *           MSACM_LibMain32 (MSACM32.init)
    3128 */
    32 BOOL WINAPI MSACM32_LibMain(
    33   HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     29BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
    3430{
    35   switch(fdwReason)
    36     {
     31    dprintf(("0x%x 0x%lx %p\n", hInstDLL, fdwReason, lpvReserved));
     32
     33    switch (fdwReason) {
    3734    case DLL_PROCESS_ATTACH:
    38       if(MSACM_dwProcessesAttached == 0)
    39         {
    40           MSACM_hHeap = HeapCreate(0, 0x10000, 0);
    41           MSACM_RegisterAllDrivers();
     35        if (MSACM_dwProcessesAttached == 0) {
     36            MSACM_hHeap = HeapCreate(0, 0x10000, 0);
     37            MSACM_RegisterAllDrivers();
    4238        }
    43       MSACM_dwProcessesAttached++;
    44       break;
     39        MSACM_dwProcessesAttached++;
     40        break;
    4541    case DLL_PROCESS_DETACH:
    46       MSACM_dwProcessesAttached--;
    47       if(MSACM_dwProcessesAttached == 0)
    48         {
    49           MSACM_UnregisterAllDrivers();
    50           HeapDestroy(MSACM_hHeap);
    51           MSACM_hHeap = (HANDLE) NULL;
     42        MSACM_dwProcessesAttached--;
     43        if (MSACM_dwProcessesAttached == 0) {
     44            MSACM_UnregisterAllDrivers();
     45            HeapDestroy(MSACM_hHeap);
     46            MSACM_hHeap = (HANDLE) NULL;
    5247        }
    53       break;
     48        break;
    5449    case DLL_THREAD_ATTACH:
    55       break;
     50        break;
    5651    case DLL_THREAD_DETACH:
    57       break;
     52        break;
    5853    default:
    59       break;
     54        break;
    6055    }
    61   return TRUE;
     56    return TRUE;
    6257}
    6358
     
    6964
    7065/***********************************************************************
    71  *           acmDriverAddA (MSACM32.2)
     66 *           acmGetVersion32 (MSACM32.34)
    7267 */
    73 MMRESULT WINAPI acmDriverAddA(
    74   PHACMDRIVERID phadid, HINSTANCE hinstModule,
    75   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
     68DWORD WINAPI acmGetVersion(void)
    7669{
    77 #ifdef DEBUG
    78   dprintf(("MSACM32: acmDriverAddA\n"));
    79 #endif
    80   PWINE_ACMLOCALDRIVER pld;
    81   if(!phadid)
    82     return MMSYSERR_INVALPARAM;
    83 
    84   /* Check if any unknown flags */
    85   if(fdwAdd &
    86      ~(ACM_DRIVERADDF_FUNCTION|ACM_DRIVERADDF_NOTIFYHWND|
    87        ACM_DRIVERADDF_GLOBAL))
    88     return MMSYSERR_INVALFLAG;
    89 
    90   /* Check if any incompatible flags */
    91   if((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
    92      (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND))
    93     return MMSYSERR_INVALFLAG;
    94 
    95   pld = (PWINE_ACMLOCALDRIVER) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER));
    96   pld->pfnDriverProc = (DRIVERPROC)
    97     GetProcAddress(hinstModule, "DriverProc");
    98   *phadid = (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, pld);
    99 
    100   /* FIXME: lParam, dwPriority and fdwAdd ignored */
    101 
    102   return MMSYSERR_NOERROR;
    103 }
    104 
    105 /***********************************************************************
    106  *           acmDriverAddW (MSACM32.3)
    107  * FIXME
    108  *   Not implemented
    109  */
    110 MMRESULT WINAPI acmDriverAddW(
    111   PHACMDRIVERID phadid, HINSTANCE hinstModule,
    112   LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
    113 {
    114 #ifdef DEBUG
    115   dprintf(("MSACM32: acmDriverAddW not implemented\n"));
    116 #endif
    117   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    118   return MMSYSERR_ERROR;
    119 }
    120 
    121 /***********************************************************************
    122  *           acmDriverClose (MSACM32.4)
    123  */
    124 MMRESULT WINAPI acmDriverClose(
    125   HACMDRIVER had, DWORD fdwClose)
    126 {
    127 #ifdef DEBUG
    128   dprintf(("MSACM32: acmDriverClose\n"));
    129 #endif
    130   PWINE_ACMDRIVER p;
    131 
    132   if(fdwClose)
    133     return MMSYSERR_INVALFLAG;
    134 
    135   p = MSACM_GetDriver(had);
    136   if(!p)
    137     return MMSYSERR_INVALHANDLE;
    138 
    139   p->obj.pACMDriverID->pACMDriver = NULL;
    140 
    141   if(p->hDrvr)
    142     CloseDriver(p->hDrvr, 0, 0);
    143 
    144   HeapFree(MSACM_hHeap, 0, p);
    145 
    146   return MMSYSERR_NOERROR;
    147 }
    148 
    149 /***********************************************************************
    150  *           acmDriverDetailsA (MSACM32.5)
    151  */
    152 MMRESULT WINAPI acmDriverDetailsA(
    153   HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails)
    154 {
    155 #ifdef DEBUG
    156   dprintf(("MSACM32: acmDriverDetailsA\n"));
    157 #endif
    158   PWINE_ACMDRIVERID p;
    159   MMRESULT mmr;
    160   BOOL bOpenTemporary;
    161 
    162   p = MSACM_GetDriverID(hadid);
    163   if(!p)
    164     return MMSYSERR_INVALHANDLE;
    165  
    166   if(fdwDetails)
    167     return MMSYSERR_INVALFLAG;
    168 
    169   bOpenTemporary = !p->pACMDriver;
    170   if(bOpenTemporary) {
    171     bOpenTemporary = TRUE;
    172     acmDriverOpen((PHACMDRIVER) &p->pACMDriver, hadid, 0);
    173   }
    174  
    175   /* FIXME
    176    *   How does the driver know if the ANSI or
    177    *   the UNICODE variant of PACMDRIVERDETAILS is used?
    178    *   It might check cbStruct or does it only accept ANSI.
    179    */
    180   mmr = (MMRESULT) acmDriverMessage(
    181     (HACMDRIVER) p->pACMDriver, ACMDM_DRIVER_DETAILS,
    182     (LPARAM) padd,  0
    183   );
    184 
    185   if(bOpenTemporary) {
    186     acmDriverClose((HACMDRIVER) p->pACMDriver, 0);
    187     p->pACMDriver = NULL;
    188   }
    189 
    190   return mmr;
    191 }
    192 
    193 /***********************************************************************
    194  *           acmDriverDetailsW (MSACM32.6)
    195  * FIXME
    196  *   Not implemented
    197  */
    198 MMRESULT WINAPI acmDriverDetailsW(
    199   HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
    200 {
    201 #ifdef DEBUG
    202   dprintf(("MSACM32: acmDriverDetailsW not implemented\n"));
    203 #endif
    204   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    205   return MMSYSERR_ERROR;
    206 }
    207 
    208 /***********************************************************************
    209  *           acmDriverEnum (MSACM32.7)
    210  */
    211 MMRESULT WINAPI acmDriverEnum(
    212   ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum)
    213 {
    214 #ifdef DEBUG
    215   dprintf(("MSACM32: acmDriverEnum\n"));
    216 #endif
    217   PWINE_ACMDRIVERID p;
    218 
    219   if(!fnCallback)
    220     {
    221       return MMSYSERR_INVALPARAM;
    222     }
    223 
    224   if(fdwEnum && ~(ACM_DRIVERENUMF_NOLOCAL|ACM_DRIVERENUMF_DISABLED))
    225     {
    226       return MMSYSERR_INVALFLAG;
    227     }
    228 
    229   p = MSACM_pFirstACMDriverID;
    230   while(p)
    231     {
    232       (*fnCallback)((HACMDRIVERID) p, dwInstance, ACMDRIVERDETAILS_SUPPORTF_CODEC);
    233       p = p->pNextACMDriverID;
    234     }
    235 
    236   return MMSYSERR_NOERROR;
    237 }
    238 
    239 /***********************************************************************
    240  *           acmDriverID (MSACM32.8)
    241  */
    242 MMRESULT WINAPI acmDriverID(
    243   HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
    244 {
    245 #ifdef DEBUG
    246   dprintf(("MSACM32: acmDriverID\n"));
    247 #endif
    248   PWINE_ACMOBJ pao;
    249 
    250   pao = MSACM_GetObj(hao);
    251   if(!pao)
    252     return MMSYSERR_INVALHANDLE;
    253 
    254   if(!phadid)
    255     return MMSYSERR_INVALPARAM;
    256 
    257   if(fdwDriverID)
    258     return MMSYSERR_INVALFLAG;
    259 
    260   *phadid = (HACMDRIVERID) pao->pACMDriverID;
    261 
    262   return MMSYSERR_NOERROR;
    263 }
    264 
    265 /***********************************************************************
    266  *           acmDriverMessage (MSACM32.9)
    267  * FIXME
    268  *   Not implemented
    269  */
    270 LRESULT WINAPI acmDriverMessage(
    271   HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
    272 {
    273 #ifdef DEBUG
    274   dprintf(("MSACM32: acmDriverMessage not implemented\n"));
    275 #endif
    276   PWINE_ACMDRIVER pad = MSACM_GetDriver(had);
    277   if(!pad)
    278     return MMSYSERR_INVALPARAM;
    279 
    280   /* FIXME: Check if uMsg legal */
    281 
    282   if(!SendDriverMessage(pad->hDrvr, uMsg, lParam1, lParam2))
    283     return MMSYSERR_NOTSUPPORTED;
    284 
    285   return MMSYSERR_NOERROR;
    286 }
    287 
    288 
    289 /***********************************************************************
    290  *           acmDriverOpen (MSACM32.10)
    291  */
    292 MMRESULT WINAPI acmDriverOpen(
    293   PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
    294 {
    295 #ifdef DEBUG
    296   dprintf(("MSACM32: acmDriverOpen\n"));
    297 #endif
    298   PWINE_ACMDRIVERID padid;
    299 
    300   if(!phad)
    301     return MMSYSERR_INVALPARAM;
    302 
    303   padid = MSACM_GetDriverID(hadid);
    304   if(!padid)
    305     return MMSYSERR_INVALHANDLE;
    306 
    307   if(fdwOpen)
    308     return MMSYSERR_INVALFLAG;
    309 
    310   if(padid->pACMDriver)
    311     {
    312       /* FIXME: Is it allowed? */
    313       return MMSYSERR_ERROR;
    314     }
    315 
    316   padid->pACMDriver = (PWINE_ACMDRIVER) HeapAlloc(
    317     MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER)
    318   );
    319   padid->pACMDriver->obj.pACMDriverID = padid;
    320  
    321   if(!padid->pACMLocalDriver)
    322       padid->pACMDriver->hDrvr =
    323         OpenDriverA(padid->pszDriverAlias, "drivers32", 0);
    324   else
    325     {
    326       padid->pACMDriver->hDrvr = MSACM_OpenDriverProc(
    327         padid->pACMLocalDriver->pfnDriverProc
    328       );
    329     }
    330 
    331   if(!padid->pACMDriver->hDrvr)
    332     return MMSYSERR_ERROR;
    333  
    334   /* FIXME: Create a WINE_ACMDRIVER32 */
    335   *phad = (HACMDRIVER) NULL;
    336 
    337   return MMSYSERR_ERROR;
    338 }
    339 
    340 /***********************************************************************
    341  *           acmDriverPriority (MSACM32.11)
    342  */
    343 MMRESULT WINAPI acmDriverPriority(
    344   HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority)
    345 {
    346 #ifdef DEBUG
    347   dprintf(("MSACM32: acmDriverPriority\n"));
    348 #endif
    349   PWINE_ACMDRIVERID padid;
    350   CHAR szSubKey[17];
    351   CHAR szBuffer[256];
    352   LONG lBufferLength = sizeof(szBuffer);
    353   LONG lError;
    354   HKEY hPriorityKey;
    355   DWORD dwPriorityCounter;
    356 
    357   padid = MSACM_GetDriverID(hadid);
    358   if(!padid)
    359     return MMSYSERR_INVALHANDLE;
    360 
    361   /* Check for unknown flags */
    362   if(fdwPriority &
    363      ~(ACM_DRIVERPRIORITYF_ENABLE|ACM_DRIVERPRIORITYF_DISABLE|
    364        ACM_DRIVERPRIORITYF_BEGIN|ACM_DRIVERPRIORITYF_END))
    365     return MMSYSERR_INVALFLAG;
    366 
    367   /* Check for incompatible flags */
    368   if((fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) &&
    369     (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE))
    370     return MMSYSERR_INVALFLAG;
    371 
    372   /* Check for incompatible flags */
    373   if((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) &&
    374     (fdwPriority & ACM_DRIVERPRIORITYF_END))
    375     return MMSYSERR_INVALFLAG;
    376 
    377   lError = RegOpenKeyA(HKEY_CURRENT_USER,
    378     "Software\\Microsoft\\Multimedia\\"
    379       "Audio Compression Manager\\Priority v4.00",
    380     &hPriorityKey
    381   );
    382   /* FIXME: Create key */
    383   if(lError != ERROR_SUCCESS)
    384     return MMSYSERR_ERROR;
    385 
    386   for(dwPriorityCounter = 1; ; dwPriorityCounter++)
    387   {
    388 //
    389 // FIXME ODIN   wsnprintfA(szSubKey, 17, "Priorty%ld", dwPriorityCounter);
    390 //
    391     lError = RegQueryValueA(hPriorityKey, szSubKey, szBuffer, &lBufferLength);
    392     if(lError != ERROR_SUCCESS)
    393       break;
    394 
    395     break;
    396   }
    397 
    398   RegCloseKey(hPriorityKey);
    399 
    400   return MMSYSERR_ERROR;
    401 }
    402 
    403 /***********************************************************************
    404  *           acmDriverRemove (MSACM32.12)
    405  */
    406 MMRESULT WINAPI acmDriverRemove(
    407   HACMDRIVERID hadid, DWORD fdwRemove)
    408 {
    409 #ifdef DEBUG
    410   dprintf(("MSACM32: acmDriverRemove\n"));
    411 #endif
    412   PWINE_ACMDRIVERID padid;
    413 
    414   padid = MSACM_GetDriverID(hadid);
    415   if(!padid)
    416     return MMSYSERR_INVALHANDLE;
    417 
    418   if(fdwRemove)
    419     return MMSYSERR_INVALFLAG;
    420 
    421   MSACM_UnregisterDriver(padid);
    422 
    423   return MMSYSERR_NOERROR;
    424 }
    425 
    426 /***********************************************************************
    427  *           acmFilterChooseA (MSACM32.13)
    428  */
    429 MMRESULT WINAPI acmFilterChooseA(
    430   PACMFILTERCHOOSEA pafltrc)
    431 {
    432 #ifdef DEBUG
    433   dprintf(("MSACM32: acmDriverChooseA not implemented\n"));
    434 #endif
    435   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    436   return MMSYSERR_ERROR;
    437 }
    438 
    439 /***********************************************************************
    440  *           acmFilterChooseW (MSACM32.14)
    441  */
    442 MMRESULT WINAPI acmFilterChooseW(
    443   PACMFILTERCHOOSEW pafltrc)
    444 {
    445 #ifdef DEBUG
    446   dprintf(("MSACM32: acmDriverChooseW not implemented\n"));
    447 #endif
    448   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    449   return MMSYSERR_ERROR;
    450 }
    451 
    452 /***********************************************************************
    453  *           acmFilterDetailsA (MSACM32.15)
    454  */
    455 MMRESULT WINAPI acmFilterDetailsA(
    456   HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails)
    457 {
    458 #ifdef DEBUG
    459   dprintf(("MSACM32: acmFilterDetailsA\n"));
    460 #endif
    461   if(fdwDetails & ~(ACM_FILTERDETAILSF_FILTER))
    462     return MMSYSERR_INVALFLAG;
    463 
    464   /* FIXME
    465    *   How does the driver know if the ANSI or
    466    *   the UNICODE variant of PACMFILTERDETAILS is used?
    467    *   It might check cbStruct or does it only accept ANSI.
    468    */
    469   return (MMRESULT) acmDriverMessage(
    470     had, ACMDM_FILTER_DETAILS,
    471     (LPARAM) pafd,  (LPARAM) fdwDetails
    472   );
    473 }
    474 
    475 /***********************************************************************
    476  *           acmFilterDetailsW (MSACM32.16)
    477  */
    478 MMRESULT WINAPI acmFilterDetailsW(
    479   HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
    480 {
    481 #ifdef DEBUG
    482   dprintf(("MSACM32: acmFilterDetailsW not implemented\n"));
    483 #endif
    484   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    485   return MMSYSERR_ERROR;
    486 }
    487 
    488 /***********************************************************************
    489  *           acmFilterEnumA (MSACM32.17)
    490  */
    491 MMRESULT WINAPI acmFilterEnumA(
    492   HACMDRIVER had, PACMFILTERDETAILSA pafd,
    493   ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
    494 {
    495 #ifdef DEBUG
    496   dprintf(("MSACM32: acmFilterEnumA not implemented\n"));
    497 #endif
    498   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    499   return MMSYSERR_ERROR;
    500 }
    501 
    502 /***********************************************************************
    503  *           acmFilterEnumW (MSACM32.18)
    504  */
    505 MMRESULT WINAPI acmFilterEnumW(
    506   HACMDRIVER had, PACMFILTERDETAILSW pafd,
    507   ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
    508 {
    509 #ifdef DEBUG
    510   dprintf(("MSACM32: acmFilterEnumW not implemented\n"));
    511 #endif
    512   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    513   return MMSYSERR_ERROR;
    514 }
    515 
    516 /***********************************************************************
    517  *           acmFilterTagDetailsA (MSACM32.19)
    518  */
    519 MMRESULT WINAPI acmFilterTagDetailsA(
    520   HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails)
    521 {
    522 #ifdef DEBUG
    523   dprintf(("MSACM32: acmFilterTagDetailsA\n"));
    524 #endif
    525   if(fdwDetails &
    526      ~(ACM_FILTERTAGDETAILSF_FILTERTAG|
    527        ACM_FILTERTAGDETAILSF_LARGESTSIZE))
    528     return MMSYSERR_INVALFLAG;
    529 
    530   /* FIXME
    531    *   How does the driver know if the ANSI or
    532    *   the UNICODE variant of PACMFILTERTAGDETAILS is used?
    533    *   It might check cbStruct or does it only accept ANSI.
    534    */
    535   return (MMRESULT) acmDriverMessage(
    536     had, ACMDM_FILTERTAG_DETAILS,
    537     (LPARAM) paftd,  (LPARAM) fdwDetails
    538   );
    539 }
    540 
    541 /***********************************************************************
    542  *           acmFilterTagDetailsW (MSACM32.20)
    543  */
    544 MMRESULT WINAPI acmFilterTagDetailsW(
    545   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
    546 {
    547 #ifdef DEBUG
    548   dprintf(("MSACM32: acmFilterTagDetailsW not implemented\n"));
    549 #endif
    550   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    551   return MMSYSERR_ERROR;
    552 }
    553 
    554 /***********************************************************************
    555  *           acmFilterTagEnumA (MSACM32.21)
    556  */
    557 MMRESULT WINAPI acmFilterTagEnumA(
    558   HACMDRIVER had, PACMFILTERTAGDETAILSA  paftd,
    559   ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
    560 {
    561 #ifdef DEBUG
    562   dprintf(("MSACM32: acmFilterTagEnumA not implemented\n"));
    563 #endif
    564   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    565   return MMSYSERR_ERROR;
    566 }
    567 
    568 /***********************************************************************
    569  *           acmFilterTagEnumW (MSACM32.22)
    570  */
    571 MMRESULT WINAPI acmFilterTagEnumW(
    572   HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
    573   ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
    574 {
    575 #ifdef DEBUG
    576   dprintf(("MSACM32: acmFilterTagEnumW not implemented\n"));
    577 #endif
    578   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    579   return MMSYSERR_ERROR;
    580 }
    581 
    582 /***********************************************************************
    583  *           acmFormatChooseA (MSACM32.23)
    584  */
    585 MMRESULT WINAPI acmFormatChooseA(
    586   PACMFORMATCHOOSEA pafmtc)
    587 {
    588 #ifdef DEBUG
    589   dprintf(("MSACM32: acmFormatChooseA not implemented\n"));
    590 #endif
    591   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    592   return MMSYSERR_ERROR;
    593 }
    594 
    595 /***********************************************************************
    596  *           acmFormatChooseW (MSACM32.24)
    597  */
    598 MMRESULT WINAPI acmFormatChooseW(
    599   PACMFORMATCHOOSEW pafmtc)
    600 {
    601 #ifdef DEBUG
    602   dprintf(("MSACM32: acmFormatChooseW not implemented\n"));
    603 #endif
    604   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    605   return MMSYSERR_ERROR;
    606 }
    607 
    608 /***********************************************************************
    609  *           acmFormatDetailsA (MSACM32.25)
    610  */
    611 MMRESULT WINAPI acmFormatDetailsA(
    612   HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails)
    613 {
    614 #ifdef DEBUG
    615   dprintf(("MSACM32: acmFormatDetailsA\n"));
    616 #endif
    617   if(fdwDetails & ~(ACM_FORMATDETAILSF_FORMAT))
    618     return MMSYSERR_INVALFLAG;
    619 
    620   /* FIXME
    621    *   How does the driver know if the ANSI or
    622    *   the UNICODE variant of PACMFORMATDETAILS is used?
    623    *   It might check cbStruct or does it only accept ANSI.
    624    */
    625   return (MMRESULT) acmDriverMessage(
    626     had, ACMDM_FORMAT_DETAILS,
    627     (LPARAM) pafd,  (LPARAM) fdwDetails
    628   );
    629 }
    630 
    631 /***********************************************************************
    632  *           acmFormatDetailsW (MSACM32.26)
    633  */
    634 MMRESULT WINAPI acmFormatDetailsW(
    635   HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
    636 {
    637 #ifdef DEBUG
    638   dprintf(("MSACM32: acmFormatDetailsW not implemented\n"));
    639 #endif
    640   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    641   return MMSYSERR_ERROR;
    642 }
    643 
    644 /***********************************************************************
    645  *           acmFormatEnumA (MSACM32.27)
    646  */
    647 MMRESULT WINAPI acmFormatEnumA(
    648   HACMDRIVER had, PACMFORMATDETAILSA pafd,
    649   ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
    650 {
    651 #ifdef DEBUG
    652   dprintf(("MSACM32: acmFormatEnumA not implemented\n"));
    653 #endif
    654   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    655   return MMSYSERR_ERROR;
    656 }
    657 
    658 /***********************************************************************
    659  *           acmFormatEnumW (MSACM32.28)
    660  */
    661 MMRESULT WINAPI acmFormatEnumW(
    662   HACMDRIVER had, PACMFORMATDETAILSW pafd,
    663   ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  DWORD fdwEnum)
    664 {
    665 #ifdef DEBUG
    666   dprintf(("MSACM32: acmFormatEnumW not implemented\n"));
    667 #endif
    668   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    669   return MMSYSERR_ERROR;
    670 }
    671 
    672 /***********************************************************************
    673  *           acmFormatSuggest (MSACM32.29)
    674  */
    675 MMRESULT WINAPI acmFormatSuggest(
    676   HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
    677   DWORD cbwfxDst, DWORD fdwSuggest)
    678 {
    679 #ifdef DEBUG
    680   dprintf(("MSACM32: acmFormatSuggest not implemented\n"));
    681 #endif
    682   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    683   return MMSYSERR_ERROR;
    684 }
    685 
    686 /***********************************************************************
    687  *           acmFormatTagDetailsA (MSACM32.30)
    688  */
    689 MMRESULT WINAPI acmFormatTagDetailsA(
    690   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails)
    691 {
    692 #ifdef DEBUG
    693   dprintf(("MSACM32: acmFormatTagDetailsA\n"));
    694 #endif
    695   if(fdwDetails &
    696      ~(ACM_FORMATTAGDETAILSF_FORMATTAG|ACM_FORMATTAGDETAILSF_LARGESTSIZE))
    697     return MMSYSERR_INVALFLAG;
    698 
    699   /* FIXME
    700    *   How does the driver know if the ANSI or
    701    *   the UNICODE variant of PACMFORMATTAGDETAILS is used?
    702    *   It might check cbStruct or does it only accept ANSI.
    703    */
    704   return (MMRESULT) acmDriverMessage(
    705     had, ACMDM_FORMATTAG_DETAILS,
    706     (LPARAM) paftd,  (LPARAM) fdwDetails
    707   );
    708 }
    709 
    710 /***********************************************************************
    711  *           acmFormatTagDetailsW (MSACM32.31)
    712  */
    713 MMRESULT WINAPI acmFormatTagDetailsW(
    714   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
    715 {
    716 #ifdef DEBUG
    717   dprintf(("MSACM32: acmFormatTagDetailsW not implemented\n"));
    718 #endif
    719   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    720   return MMSYSERR_ERROR;
    721 }
    722 
    723 /***********************************************************************
    724  *           acmFormatTagEnumA (MSACM32.32)
    725  */
    726 MMRESULT WINAPI acmFormatTagEnumA(
    727   HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
    728   ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
    729 {
    730 #ifdef DEBUG
    731   dprintf(("MSACM32: acmFormatTagEnumA not implemented\n"));
    732 #endif
    733   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    734   return MMSYSERR_ERROR;
    735 }
    736 
    737 /***********************************************************************
    738  *           acmFormatTagEnumW (MSACM32.33)
    739  */
    740 MMRESULT WINAPI acmFormatTagEnumW(
    741   HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
    742   ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
    743 {
    744 #ifdef DEBUG
    745   dprintf(("MSACM32: acmFormatTagEnumW not implemented\n"));
    746 #endif
    747   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    748   return MMSYSERR_ERROR;
    749 }
    750 
    751 /***********************************************************************
    752  *           acmGetVersion (MSACM32.34)
    753  */
    754 DWORD WINAPI acmGetVersion()
    755 {
    756 #ifdef DEBUG
    757   dprintf(("MSACM32: acmGetVersion\n"));
    758 #endif
    759   switch(GetVersion())
    760     {
     70    switch (GetVersion()) {
    76171    default:
    762 //
     72        dprintf(("OS not supported\n"));
    76373    case WIN95:
    764       return 0x04000000; /* 4.0.0 */
     74        return 0x04000000; /* 4.0.0 */
    76575    case NT40:
    766       return 0x04000565; /* 4.0.1381 */
     76        return 0x04000565; /* 4.0.1381 */
    76777    }
    76878}
    76979
    77080/***********************************************************************
    771  *           acmMessage (MSACM32.35)
     81 *           acmMessage32 (MSACM32.35)
    77282 * FIXME
    77383 *   No documentation found.
     
    77787 *           acmMetrics (MSACM32.36)
    77888 */
    779 MMRESULT WINAPI acmMetrics(
    780   HACMOBJ hao, UINT uMetric, LPVOID  pMetric)
     89MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID  pMetric)
    78190{
    782 #ifdef DEBUG
    783   dprintf(("MSACM32: acmMetrics\n"));
    784 #endif
    785   PWINE_ACMOBJ pao = MSACM_GetObj(hao);
    786   BOOL bLocal = TRUE;
    787 
    788   switch(uMetric)
    789     {
     91    PWINE_ACMOBJ pao = MSACM_GetObj(hao);
     92    BOOL bLocal = TRUE;
     93   
     94    dprintf(("(0x%08x, %d, %p): stub\n", hao, uMetric, pMetric));
     95   
     96    switch (uMetric) {
    79097    case ACM_METRIC_COUNT_DRIVERS:
    791       bLocal = FALSE;
     98        bLocal = FALSE;
    79299    case ACM_METRIC_COUNT_LOCAL_DRIVERS:
    793       if(!pao)
    794         return MMSYSERR_INVALHANDLE; 
    795       return MMSYSERR_NOTSUPPORTED;
     100        if (!pao)
     101            return MMSYSERR_INVALHANDLE; 
     102        return MMSYSERR_NOTSUPPORTED;
    796103    case ACM_METRIC_COUNT_CODECS:
    797       bLocal = FALSE;
     104        bLocal = FALSE;
    798105    case ACM_METRIC_COUNT_LOCAL_CODECS:
    799       return MMSYSERR_NOTSUPPORTED;
     106        return MMSYSERR_NOTSUPPORTED;
    800107    case ACM_METRIC_COUNT_CONVERTERS:
    801       bLocal = FALSE;
     108        bLocal = FALSE;
    802109    case ACM_METRIC_COUNT_LOCAL_CONVERTERS:
    803       return MMSYSERR_NOTSUPPORTED;
     110        return MMSYSERR_NOTSUPPORTED;
    804111    case ACM_METRIC_COUNT_FILTERS:
    805       bLocal = FALSE;
     112        bLocal = FALSE;
    806113    case ACM_METRIC_COUNT_LOCAL_FILTERS:
    807       return MMSYSERR_NOTSUPPORTED;
     114        return MMSYSERR_NOTSUPPORTED;
    808115    case ACM_METRIC_COUNT_DISABLED:
    809       bLocal = FALSE;
     116        bLocal = FALSE;
    810117    case ACM_METRIC_COUNT_LOCAL_DISABLED:
    811       if(!pao)
    812         return MMSYSERR_INVALHANDLE; 
    813       return MMSYSERR_NOTSUPPORTED;
     118        if (!pao)
     119            return MMSYSERR_INVALHANDLE; 
     120        return MMSYSERR_NOTSUPPORTED;
    814121    case ACM_METRIC_COUNT_HARDWARE:
    815122    case ACM_METRIC_HARDWARE_WAVE_INPUT:
     
    820127    case ACM_METRIC_DRIVER_PRIORITY:
    821128    default:
    822       return MMSYSERR_NOTSUPPORTED;
     129        return MMSYSERR_NOTSUPPORTED;
    823130    }
    824   return MMSYSERR_NOERROR;
     131    return MMSYSERR_NOERROR;
    825132}
    826 
    827 /***********************************************************************
    828  *           acmStreamClose (MSACM32.37)
    829  */
    830 MMRESULT WINAPI acmStreamClose(
    831   HACMSTREAM has, DWORD fdwClose)
    832 {
    833 #ifdef DEBUG
    834   dprintf(("MSACM32: acmStreamClose not implemented\n"));
    835 #endif
    836   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    837   return MMSYSERR_ERROR;
    838 }
    839 
    840 /***********************************************************************
    841  *           acmStreamConvert (MSACM32.38)
    842  */
    843 MMRESULT WINAPI acmStreamConvert(
    844   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert)
    845 {
    846 #ifdef DEBUG
    847   dprintf(("MSACM32: acmStreamConvert not implemented\n"));
    848 #endif
    849   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    850   return MMSYSERR_ERROR;
    851 }
    852 
    853 /***********************************************************************
    854  *           acmStreamMessage (MSACM32.39)
    855  */
    856 MMRESULT WINAPI acmStreamMessage(
    857   HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
    858 {
    859 #ifdef DEBUG
    860   dprintf(("MSACM32: acmStreamMessage not implemented\n"));
    861 #endif
    862   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    863   return MMSYSERR_ERROR;
    864 }
    865 
    866 /***********************************************************************
    867  *           acmStreamOpen (MSACM32.40)
    868  */
    869 MMRESULT WINAPI acmStreamOpen(
    870   PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
    871   PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
    872   DWORD dwInstance, DWORD fdwOpen)
    873 {
    874 #ifdef DEBUG
    875   dprintf(("MSACM32: acmStreamOpen not implemented\n"));
    876 #endif
    877   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    878   return MMSYSERR_ERROR;
    879 }
    880 
    881 
    882 /***********************************************************************
    883  *           acmStreamPrepareHeader (MSACM32.41)
    884  */
    885 MMRESULT WINAPI acmStreamPrepareHeader(
    886   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare)
    887 {
    888 #ifdef DEBUG
    889   dprintf(("MSACM32: acmStreamPrepareHeader not implemented\n"));
    890 #endif
    891   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    892   return MMSYSERR_ERROR;
    893 }
    894 
    895 /***********************************************************************
    896  *           acmStreamReset (MSACM32.42)
    897  */
    898 MMRESULT WINAPI acmStreamReset(
    899   HACMSTREAM has, DWORD fdwReset)
    900 {
    901 #ifdef DEBUG
    902   dprintf(("MSACM32: acmStreamReset not implemented\n"));
    903 #endif
    904   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    905   return MMSYSERR_ERROR;
    906 }
    907 
    908 /***********************************************************************
    909  *           acmStreamSize (MSACM32.43)
    910  */
    911 MMRESULT WINAPI acmStreamSize(
    912   HACMSTREAM has, DWORD cbInput,
    913   LPDWORD pdwOutputBytes, DWORD fdwSize)
    914 {
    915 #ifdef DEBUG
    916   dprintf(("MSACM32: acmStreamSize not implemented\n"));
    917 #endif
    918   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    919   return MMSYSERR_ERROR;
    920 }
    921 
    922 /***********************************************************************
    923  *           acmStreamUnprepareHeader (MSACM32.44)
    924  */
    925 MMRESULT WINAPI acmStreamUnprepareHeader(
    926   HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare)
    927 {
    928 #ifdef DEBUG
    929   dprintf(("MSACM32: acmStreamUnprepareHeader not implemented\n"));
    930 #endif
    931   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    932   return MMSYSERR_ERROR;
    933 }
  • trunk/src/msvfw32/makefile

    r1585 r1607  
    1 # $Id: makefile,v 1.2 1999-11-03 23:28:05 sandervl Exp $
     1# $Id: makefile,v 1.3 1999-11-05 09:18:36 sandervl Exp $
    22
    33#
     
    4444
    4545clean:
    46         $(RM) *.obj *.lib *.dll *~ *.map *.pch
     46        $(RM) *.obj *.lib *.dll *.map *.pch
    4747        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    4848        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • trunk/src/msvfw32/msvfw32.cpp

    r1012 r1607  
    1 /* $Id: msvfw32.cpp,v 1.3 1999-09-23 09:38:05 sandervl Exp $ */
    21/*
    32 * Copyright 1998 Marcus Meissner
     
    2423#include "vfw.h"
    2524#include "driver.h"
    26 #include "msvfw32.h"
     25// #include "msvfw32.h"
    2726
    2827#include "debugtools.h"
    2928#include <debugstr.h>
    30 
     29#include <heapstring.h>
    3130
    3231DEFAULT_DEBUG_CHANNEL(msvideo)
    3332
    34 
    35 /****************************************************************************
    36  *              VideoForWindowsVersion          [MSVFW.2]
     33/****************************************************************************
     34 *              VideoForWindowsVersion          [MSVFW.2][MSVIDEO.2]
    3735 * Returns the version in major.minor form.
    3836 * In Windows95 this returns 0x040003b6 (4.950)
    3937 */
    40 DWORD WINAPI VideoForWindowsVersion(void)
    41 {
    42 #ifdef DEBUG
    43     dprintf(("MSVFW32: VideoForWindowsVersion\n"));
    44 #endif
     38DWORD WINAPI
     39VideoForWindowsVersion(void) {
    4540        return 0x040003B6; /* 4.950 */
    4641}
    4742
    48 
    49 /****************************************************************************
    50  *              DrawDibBegin                    [MSVFW.3]
    51  */
    52 BOOL VFWAPI DrawDibBegin(HANDLE /*HDRAWDIB*/ hdd,
    53                                     HDC      hdc,
    54                                     INT      dxDst,
    55                                     INT      dyDst,
    56                                     LPBITMAPINFOHEADER lpbi,
    57                                     INT      dxSrc,
    58                                     INT      dySrc,
    59                                     UINT     wFlags)
    60 {
    61 #ifdef DEBUG
    62     dprintf(("MSVFW32: DrawDibBegin not implemented\n"));
    63 #endif
    64         return TRUE;
    65 }
    66 
    67 
    68 /****************************************************************************
    69  *              DrawDibChangePalette            [MSVFW.4]
    70  */
    71 
    72 BOOL VFWAPI DrawDibChangePalette(HANDLE /*HDRAWDIB*/ hdd, int iStart, int iLen, LPPALETTEENTRY lppe)
    73 {
    74 #ifdef DEBUG
    75     dprintf(("MSVFW32: DrawDibChangePalette not implemented\n"));
    76 #endif
    77         return TRUE;
    78 }
    79 
    80 
    81 /****************************************************************************
    82  *              DrawDibClose                    [MSVFW.5]
    83  */
    84 BOOL WINAPI DrawDibClose( HANDLE /*HDRAWDIB*/ hDib )
    85 {
    86 #ifdef DEBUG
    87     dprintf(("MSVFW32: DrawDibClose not implemented\n"));
    88 #endif
    89        return TRUE;
    90 }
    91 
    92 
    93 /****************************************************************************
    94  *              DrawDibDraw                     [MSVFW.6]
    95  */
    96 BOOL VFWAPI DrawDibDraw(HANDLE /*HDRAWDIB*/ hdd,
    97                                    HDC      hdc,
    98                                    int      xDst,
    99                                    int      yDst,
    100                                    int      dxDst,
    101                                    int      dyDst,
    102                                    LPBITMAPINFOHEADER lpbi,
    103                                    LPVOID   lpBits,
    104                                    int      xSrc,
    105                                    int      ySrc,
    106                                    int      dxSrc,
    107                                    int      dySrc,
    108                                    UINT     wFlags)
    109 {
    110 #ifdef DEBUG
    111     dprintf(("MSVFW32: DrawDibDraw not implemented\n"));
    112 #endif
    113        return TRUE;
    114 }
    115 
    116 
    117 /****************************************************************************
    118  *              DrawDibEnd                      [MSVFW.7]
    119  */
    120 BOOL VFWAPI DrawDibEnd(HANDLE /*HDRAWDIB*/ hdd)
    121 {
    122 #ifdef DEBUG
    123     dprintf(("MSVFW32: DrawDibEnd not implemented\n"));
    124 #endif
    125        return TRUE;
    126 }
    127 
    128 
    129 /****************************************************************************
    130  *              DrawDibGetBuffer                [MSVFW.8]
    131  */
    132 LPVOID VFWAPI DrawDibGetBuffer(HANDLE /*HDRAWDIB*/ hdd, LPBITMAPINFOHEADER lpbi, DWORD dwSize, DWORD dwFlags)
    133 {
    134 #ifdef DEBUG
    135     dprintf(("MSVFW32: DrawDibGetBuffer not implemented\n"));
    136 #endif
    137        return 0;
    138 }
    139 
    140 
    141 /****************************************************************************
    142  *              DrawDibGetPalette               [MSVFW.9]
    143  */
    144 HPALETTE VFWAPI DrawDibGetPalette(HANDLE /*HDRAWDIB*/ hdd)
    145 {
    146 #ifdef DEBUG
    147     dprintf(("MSVFW32: DrawDibGetPalette not implemented\n"));
    148 #endif
    149        return TRUE;
    150 }
    151 
    152 
    153 /****************************************************************************
    154  *              DrawDibOpen                     [MSVFW.10]
    155  */
    156 HANDLE /* HDRAWDIB */ WINAPI DrawDibOpen( void )
    157 {
    158 #ifdef DEBUG
    159     dprintf(("MSVFW32: DrawDibOpen not implemented\n"));
    160 #endif
    161         return 0xdead;
    162 }
    163 
    164 
    165 /****************************************************************************
    166  *              DrawDibProfileDisplay           [MSVFW.11]
    167  */
    168 DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi)
    169 {
    170 #ifdef DEBUG
    171     dprintf(("MSVFW32: DrawDibProfileDisplay not implemented\n"));
    172 #endif
    173        return TRUE;
    174 }
    175 
    176 
    177 /****************************************************************************
    178  *              DrawDibRealize                  [MSVFW.12]
    179  */
    180 UINT VFWAPI DrawDibRealize(HANDLE /*HDRAWDIB*/ hdd, HDC hdc, BOOL fBackground)
    181 {
    182 #ifdef DEBUG
    183     dprintf(("MSVFW32: DrawDibRealize not implemented\n"));
    184 #endif
    185         return 0;
    186 }
    187 
    188 
    189 /****************************************************************************
    190  *              DrawDibSetPalette               [MSVFW.13]
    191  */
    192 BOOL VFWAPI DrawDibSetPalette(HANDLE /*HDRAWDIB*/ hdd, HPALETTE hpal)
    193 {
    194 #ifdef DEBUG
    195     dprintf(("MSVFW32: DrawDibSetPalette not implemented\n"));
    196 #endif
    197         return TRUE;
    198 }
    199 
    200 
    201 /****************************************************************************
    202  *              DrawDibStart                    [MSVFW.14]
    203  */
    204 BOOL VFWAPI DrawDibStart(HANDLE /*HDRAWDIB*/ hdd, DWORD rate)
    205 {
    206 #ifdef DEBUG
    207     dprintf(("MSVFW32: DrawDibStart not implemented\n"));
    208 #endif
    209         return TRUE;
    210 }
    211 
    212 
    213 /****************************************************************************
    214  *              DrawDibStop                     [MSVFW.15]
    215  */
    216 BOOL VFWAPI DrawDibStop(HANDLE /*HDRAWDIB*/ hdd)
    217 {
    218 #ifdef DEBUG
    219     dprintf(("MSVFW32: DrawDibStop not implemented\n"));
    220 #endif
    221         return TRUE;
    222 }
    223 
    224 
    225 /****************************************************************************
    226  *              DrawDibTime                     [MSVFW.16]
    227  */
    228 BOOL VFWAPI DrawDibTime(HANDLE /*HDRAWDIB*/ hdd, LPDRAWDIBTIME lpddtime)
    229 {
    230 #ifdef DEBUG
    231     dprintf(("MSVFW32: DrawDibTime not implemented\n"));
    232 #endif
    233         return TRUE;
    234 }
    235 
    236 
    237 /****************************************************************************
    238  *              GetOpenFileNamePreview          [MSVFW.17]
    239  */
    240 
    241 /* NO */
    242 
    243 
    244 /****************************************************************************
    245  *              GetOpenFileNamePreviewA         [MSVFW.18]
    246  */
    247 BOOL VFWAPI GetOpenFileNamePreviewA(LPOPENFILENAMEA lpofn)
    248 {
    249 #ifdef DEBUG
    250     dprintf(("MSVFW32: GetOpenFileNamePreviewA not implemented\n"));
    251 #endif
    252         return TRUE;
    253 }
    254 
    255 
    256 /****************************************************************************
    257  *              GetOpenFileNamePreviewW         [MSVFW.19]
    258  */
    259 BOOL VFWAPI GetOpenFileNamePreviewW(LPOPENFILENAMEW lpofn)
    260 {
    261 #ifdef DEBUG
    262     dprintf(("MSVFW32: GetOpenFileNamePreviewW not implemented\n"));
    263 #endif
    264         return TRUE;
    265 }
    266 
    267 
    268 /****************************************************************************
    269  *              GetSaveFileNamePreviewA         [MSVFW.20]
    270  */
    271 BOOL VFWAPI GetSaveFileNamePreviewA(LPOPENFILENAMEA lpofn)
    272 {
    273 #ifdef DEBUG
    274     dprintf(("MSVFW32: GetSaveFileNamePreviewA not implemented\n"));
    275 #endif
    276         return TRUE;
    277 }
    278 
    279 
    280 /****************************************************************************
    281  *              GetSaveFileNamePreviewW         [MSVFW.21]
    282  */
    283 BOOL VFWAPI GetSaveFileNamePreviewW(LPOPENFILENAMEW lpofn)
    284 {
    285 #ifdef DEBUG
    286     dprintf(("MSVFW32: GetSaveFileNamePreviewW not implemented\n"));
    287 #endif
    288         return TRUE;
    289 }
    290 
    291 
    292 /****************************************************************************
    293  *              ICClose                         [MSVFW.22]
    294  */
    295 LRESULT WINAPI ICClose(HIC hic)
    296 {
    297 #ifdef DEBUG
    298     dprintf(("MSVFW32: ICClose\n"));
    299 #endif
    300         WINE_HIC        *whic = (WINE_HIC*)hic;
    301         /* FIXME: correct? */
    302         CloseDriver(whic->hdrv,0,0);
    303         HeapFree(GetProcessHeap(),0,whic);
    304         return 0;
    305 }
    306 
    307 
    308 /****************************************************************************
    309  *              ICCompress                      [MSVFW.23]
    310  */
    311 DWORD VFWAPIV ICCompress(
    312         HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiOutput,LPVOID lpData,
    313         LPBITMAPINFOHEADER lpbiInput,LPVOID lpBits,LPDWORD lpckid,
    314         LPDWORD lpdwFlags,LONG lFrameNum,DWORD dwFrameSize,DWORD dwQuality,
    315         LPBITMAPINFOHEADER lpbiPrev,LPVOID lpPrev)
    316 {
    317 #ifdef DEBUG
    318     dprintf(("MSVFW32: ICCompress\n"));
    319 #endif
    320         ICCOMPRESS      iccmp;
    321 
    322         iccmp.dwFlags           = dwFlags;
    323 
    324         iccmp.lpbiOutput        = lpbiOutput;
    325         iccmp.lpOutput          = lpData;
    326         iccmp.lpbiInput         = lpbiInput;
    327         iccmp.lpInput           = lpBits;
    328 
    329         iccmp.lpckid            = lpckid;
    330         iccmp.lpdwFlags         = lpdwFlags;
    331         iccmp.lFrameNum         = lFrameNum;
    332         iccmp.dwFrameSize       = dwFrameSize;
    333         iccmp.dwQuality         = dwQuality;
    334         iccmp.lpbiPrev          = lpbiPrev;
    335         iccmp.lpPrev            = lpPrev;
    336         return ICSendMessage(hic,ICM_COMPRESS,(LPARAM)&iccmp,sizeof(iccmp));
    337 }
    338 
    339 
    340 /****************************************************************************
    341  *              ICCompressorChoose              [MSVFW.24]
    342  */
    343 BOOL VFWAPI ICCompressorChoose(
    344         HWND        hwnd,               // parent window for dialog
    345         UINT        uiFlags,            // flags
    346         LPVOID      pvIn,               // input format (optional)
    347         LPVOID      lpData,             // input data (optional)
    348         PCOMPVARS   pc,                 // data about the compressor/dlg
    349         LPSTR       lpszTitle)          // dialog title (optional)
    350 {
    351 #ifdef DEBUG
    352     dprintf(("MSVFW32: ICCompressorChoose not implemented\n"));
    353 #endif
    354         return TRUE;
    355 }
    356 
    357 
    358 /****************************************************************************
    359  *              ICCompressorFree                [MSVFW.25]
    360  */
    361 void VFWAPI ICCompressorFree(PCOMPVARS pc)
    362 {
    363 #ifdef DEBUG
    364     dprintf(("MSVFW32: ICCompressorFree not implemented\n"));
    365 #endif
    366         return;
    367 }
    368 
    369 
    370 /****************************************************************************
    371  *              ICDecompress                    [MSVFW.26]
    372  */
    373 DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,
    374                 LPVOID lpData,LPBITMAPINFOHEADER  lpbi,LPVOID lpBits)
    375 {
    376 #ifdef DEBUG
    377     dprintf(("MSVFW32: ICDecompress\n"));
    378 #endif
    379         ICDECOMPRESS    icd;
    380 
    381         icd.dwFlags     = dwFlags;
    382         icd.lpbiInput   = lpbiFormat;
    383         icd.lpInput     = lpData;
    384 
    385         icd.lpbiOutput  = lpbi;
    386         icd.lpOutput    = lpBits;
    387         icd.ckid        = 0;
    388         return ICSendMessage(hic,ICM_DECOMPRESS,(LPARAM)&icd,sizeof(icd));
    389 }
    390 
    391 
    392 /****************************************************************************
    393  *              ICDraw                          [MSVFW.27]
    394  */
    395 DWORD VFWAPIV ICDraw(HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,
    396         DWORD cbData, LONG lTime)
    397 {
    398 #ifdef DEBUG
    399     dprintf(("MSVFW32: ICDraw\n"));
    400 #endif
    401         ICDRAW  icd;
    402 
    403         icd.dwFlags = dwFlags;
    404         icd.lpFormat = lpFormat;
    405         icd.lpData = lpData;
    406         icd.cbData = cbData;
    407         icd.lTime = lTime;
    408         return ICSendMessage(hic,ICM_DRAW,(LPARAM)&icd,sizeof(icd));
    409 }
    410 
    411 
    412 /****************************************************************************
    413  *              ICDrawBegin                     [MSVFW.28]
    414  */
    415 DWORD   VFWAPIV ICDrawBegin(
    416         HIC                     hic,
    417         DWORD                   dwFlags,/* flags */
    418         HPALETTE                hpal,   /* palette to draw with */
    419         HWND                    hwnd,   /* window to draw to */
    420         HDC                     hdc,    /* HDC to draw to */
    421         INT                     xDst,   /* destination rectangle */
    422         INT                     yDst,
    423         INT                     dxDst,
    424         INT                     dyDst,
    425         LPBITMAPINFOHEADER      lpbi,   /* format of frame to draw */
    426         INT                     xSrc,   /* source rectangle */
    427         INT                     ySrc,
    428         INT                     dxSrc,
    429         INT                     dySrc,
    430         DWORD                   dwRate, /* frames/second = (dwRate/dwScale) */
    431         DWORD                   dwScale)
    432 {
    433 #ifdef DEBUG
    434     dprintf(("MSVFW32: ICDrawBegin\n"));
    435 #endif
    436         ICDRAWBEGIN     icdb;
    437 
    438         icdb.dwFlags = dwFlags;
    439         icdb.hpal = hpal;
    440         icdb.hwnd = hwnd;
    441         icdb.hdc = hdc;
    442         icdb.xDst = xDst;
    443         icdb.yDst = yDst;
    444         icdb.dxDst = dxDst;
    445         icdb.dyDst = dyDst;
    446         icdb.lpbi = lpbi;
    447         icdb.xSrc = xSrc;
    448         icdb.ySrc = ySrc;
    449         icdb.dxSrc = dxSrc;
    450         icdb.dySrc = dySrc;
    451         icdb.dwRate = dwRate;
    452         icdb.dwScale = dwScale;
    453         return ICSendMessage(hic,ICM_DRAW_BEGIN,(LPARAM)&icdb,sizeof(icdb));
    454 }
    455 
    456 
    457 /****************************************************************************
    458  *              ICGetDisplayFormat              [MSVFW.29]
    459  */
    460 HIC VFWAPI ICGetDisplayFormat(HIC hic,LPBITMAPINFOHEADER lpbiIn,
    461         LPBITMAPINFOHEADER lpbiOut, INT depth,INT dx,INT dy)
    462 {
    463 #ifdef DEBUG
    464     dprintf(("MSVFW32: ICGetDisplayFormat\n"));
    465 #endif
    466         HIC     tmphic = hic;
    467         LRESULT lres;
    468 
    469         if (!tmphic) {
    470                 tmphic=ICLocate(ICTYPE_VIDEO,0,lpbiIn,NULL,ICMODE_DECOMPRESS);
    471                 if (!tmphic)
    472                         return tmphic;
    473         }
    474         if ((dy == lpbiIn->biHeight) || (dx == lpbiIn->biWidth))
    475                 dy = dx = 0; /* no resize needed */
    476         /* Can we decompress it ? */
    477         lres = ICDecompressQuery(tmphic,lpbiIn,NULL);
    478         if (lres)
    479                 goto errout; /* no, sorry */
    480         ICDecompressGetFormat(hic,lpbiIn,lpbiOut);
    481         *lpbiOut=*lpbiIn;
    482         lpbiOut->biCompression = 0;
    483         lpbiOut->biSize = sizeof(*lpbiOut);
    484         if (!depth) {
    485                 HDC     hdc;
    486 
    487                 hdc = GetDC(0);
    488                 depth = GetDeviceCaps(hdc,12)*GetDeviceCaps(hdc,14);
    489                 ReleaseDC(0,hdc);
    490                 if (depth==15)  depth = 16;
    491                 if (depth<8)    depth =  8;
    492                 /* more constraints and tests */
    493         }
    494         if (lpbiIn->biBitCount == 8)
    495                 depth = 8;
    496        
    497         return hic;
    498 errout:
    499         if (hic!=tmphic)
    500                 ICClose(tmphic);
    501         return 0;
    502 }
    503 
    504 
    505 /****************************************************************************
    506  *              ICGetInfo                       [MSVFW.30]
    507  */
    508 LRESULT WINAPI ICGetInfo(HIC hic,ICINFO *picinfo,DWORD cb)
    509 {
    510 #ifdef DEBUG
    511     dprintf(("MSVFW32: ICGetInfo\n"));
    512 #endif
    513         LRESULT         ret;
    514 
    515         ret = ICSendMessage(hic,ICM_GETINFO,(DWORD)picinfo,cb);
    516         return ret;
    517 }
    518 
    519 
    520 /****************************************************************************
    521  *              ICImageCompress                 [MSVFW.31]
    522  */
    523 HANDLE VFWAPI ICImageCompress(
    524         HIC                 hic,        // compressor to use
    525         UINT                uiFlags,    // flags (none yet)
    526         LPBITMAPINFO        lpbiIn,     // format to compress from
    527         LPVOID              lpBits,     // data to compress
    528         LPBITMAPINFO        lpbiOut,    // compress to this (NULL ==> default)
    529         LONG                lQuality,   // quality to use
    530         LONG                plSize)     // compress to this size (0=whatever)
    531 {       
    532 #ifdef DEBUG
    533     dprintf(("MSVFW32: ICImageCompress not implemented\n"));
    534 #endif
    535         return 0;
    536 }
    537 
    538 
    539 /****************************************************************************
    540  *              ICImageDecompress               [MSVFW.32]
    541  */
    542 HANDLE VFWAPI ICImageDecompress(
    543         HIC                 hic,        // compressor to use
    544         UINT                uiFlags,    // flags (none yet)
    545         LPBITMAPINFO        lpbiIn,     // format to decompress from
    546         LPVOID              lpBits,     // data to decompress
    547         LPBITMAPINFO        lpbiOut)    // decompress to this (NULL ==> default)
    548 {       
    549 #ifdef DEBUG
    550     dprintf(("MSVFW32: ICImageDecompress not implemented\n"));
    551 #endif
    552         return 0;
    553 }
    554 
     43/* system.ini: [drivers] */
    55544
    55645/**************************************************************************
     
    55948 * is one.
    56049 */
    561 BOOL WINAPI ICInfo(DWORD fccType,DWORD fccHandler,ICINFO *lpicinfo)
    562 {
    563 #ifdef DEBUG
    564     dprintf(("MSVFW32: ICInfo\n"));
    565 #endif
    566 
     50BOOL WINAPI
     51ICInfo(
     52        DWORD fccType,          /* [in] type of compressor ('vidc') */
     53        DWORD fccHandler,       /* [in] <n>th compressor */
     54        ICINFO *lpicinfo        /* [out] information about compressor */
     55) {
    56756        char    type[5],buf[2000];
    56857
    56958        memcpy(type,&fccType,4);type[4]=0;
     59        TRACE("(%s,%ld,%p).\n",type,fccHandler,lpicinfo);
    57060        /* does OpenDriver/CloseDriver */
    57161        lpicinfo->dwSize = sizeof(ICINFO);
     
    58777}
    58878
    589 
    590 /****************************************************************************
    591  *              ICInstall                       [MSVFW.34]
    592  */
    593 BOOL    VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, UINT wFlags)
    594 {       
    595 #ifdef DEBUG
    596     dprintf(("MSVFW32: ICInstall not implemented\n"));
    597 #endif
    598         return TRUE;
    599 }
    600 
    601 
    602 /****************************************************************************
    603  *              ICLocate                        [MSVFW.35]
    604  */
    605 HIC  VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn,
    606         LPBITMAPINFOHEADER lpbiOut, WORD wMode)
    607 {
    608 #ifdef DEBUG
    609     dprintf(("MSVFW32: ICLocate\n"));
    610 #endif
    611         char    type[5],handler[5];
    612         HIC     hic;
    613         DWORD   querymsg;
    614 
    615         switch (wMode) {
    616         case ICMODE_FASTCOMPRESS:
    617         case ICMODE_COMPRESS:
    618                 querymsg = ICM_COMPRESS_QUERY;
    619                 break;
    620         case ICMODE_DECOMPRESS:
    621         case ICMODE_FASTDECOMPRESS:
    622                 querymsg = ICM_DECOMPRESS_QUERY;
    623                 break;
    624         case ICMODE_DRAW:
    625                 querymsg = ICM_DRAW_QUERY;
    626                 break;
    627         default:
    628                 return 0;
    629         }
    630 
    631         /* Easy case: handler/type match, we just fire a query and return */
    632         hic = ICOpen(fccType,fccHandler,wMode);
    633         if (hic) {
    634                 if (!ICSendMessage(hic,querymsg,(DWORD)lpbiIn,(DWORD)lpbiOut))
    635                         return hic;
    636                 ICClose(hic);
    637         }
    638         type[4]='\0';memcpy(type,&fccType,4);
    639         handler[4]='\0';memcpy(handler,&fccHandler,4);
    640         if (fccType==streamtypeVIDEO) {
    641                 hic = ICLocate(ICTYPE_VIDEO,fccHandler,lpbiIn,lpbiOut,wMode);
    642                 if (hic)
    643                         return hic;
    644         }
    645         return 0;
    646 }
    647 
    648 
    64979/**************************************************************************
    65080 *              ICOpen                          [MSVFW.37]
    65181 * Opens an installable compressor. Return special handle.
    65282 */
    653 HIC WINAPI ICOpen(DWORD fccType,DWORD fccHandler,UINT wMode)
    654 {
    655 #ifdef DEBUG
    656     dprintf(("MSVFW32: ICOpen\n"));
    657 #endif
     83HIC WINAPI
     84ICOpen(DWORD fccType,DWORD fccHandler,UINT wMode) {
    65885        char            type[5],handler[5],codecname[20];
    65986        ICOPEN          icopen;
     
    66390        memcpy(type,&fccType,4);type[4]=0;
    66491        memcpy(handler,&fccHandler,4);handler[4]=0;
     92        TRACE("(%s,%s,0x%08lx)\n",type,handler,(DWORD)wMode);
    66593        sprintf(codecname,"%s.%s",type,handler);
    66694
     
    683111                    return 0;
    684112        }
    685         whic = (PWINE_HIC)HeapAlloc(GetProcessHeap(),0,sizeof(WINE_HIC));
     113        whic = PWINE_HIC(HeapAlloc(GetProcessHeap(),0,sizeof(WINE_HIC)));
    686114        whic->hdrv      = hdrv;
    687115        whic->driverproc= NULL;
     
    689117        return (HIC)whic;
    690118}
    691 
    692 
    693 /**************************************************************************
    694  *              ICOpenFunction                  [MSVFW.38]
    695  */
    696119HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode,
    697 FARPROC lpfnHandler)
    698 {
    699 #ifdef DEBUG
    700     dprintf(("MSVFW32: ICOpenFunction\n"));
    701 #endif
     120FARPROC lpfnHandler) {
    702121        char            type[5],handler[5];
    703122        HIC             hic;
     
    706125        memcpy(type,&fccType,4);type[4]=0;
    707126        memcpy(handler,&fccHandler,4);handler[4]=0;
     127        dprintf(("(%s,%s,%d,%p), stub!\n",type,handler,wMode,lpfnHandler));
    708128        hic = ICOpen(fccType,fccHandler,wMode);
    709129        if (!hic)
     
    715135
    716136
    717 /**************************************************************************
    718  *              ICRemove                        [MSVFW.39]
    719  */
    720 BOOL    VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags)
    721 {       
    722 #ifdef DEBUG
    723     dprintf(("MSVFW32: ICRemove not implemented\n"));
    724 #endif
    725         return TRUE;
    726 }
    727 
    728 
    729 /**************************************************************************
    730  *              ICSendMessage                   [MSVFW.40]
    731  */
    732 LRESULT VFWAPI ICSendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2)
    733 
    734 {
    735 #ifdef DEBUG
    736     dprintf(("MSVFW32: ICSendMessage\n"));
    737 #endif
     137LRESULT WINAPI ICGetInfo(HIC hic,ICINFO *picinfo,DWORD cb) {
     138        LRESULT         ret;
     139
     140        TRACE("(0x%08lx,%p,%ld)\n",(DWORD)hic,picinfo,cb);
     141        ret = ICSendMessage(hic,ICM_GETINFO,(DWORD)picinfo,cb);
     142        TRACE(" -> 0x%08lx\n",ret);
     143        return ret;
     144}
     145
     146HIC  VFWAPI
     147ICLocate(
     148        DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn,
     149        LPBITMAPINFOHEADER lpbiOut, WORD wMode
     150) {
     151        char    type[5],handler[5];
     152        HIC     hic;
     153        DWORD   querymsg;
     154
     155        switch (wMode) {
     156        case ICMODE_FASTCOMPRESS:
     157        case ICMODE_COMPRESS:
     158                querymsg = ICM_COMPRESS_QUERY;
     159                break;
     160        case ICMODE_DECOMPRESS:
     161        case ICMODE_FASTDECOMPRESS:
     162                querymsg = ICM_DECOMPRESS_QUERY;
     163                break;
     164        case ICMODE_DRAW:
     165                querymsg = ICM_DRAW_QUERY;
     166                break;
     167        default:
     168                dprintf(("Unknown mode (%d)\n",wMode));
     169                return 0;
     170        }
     171
     172        /* Easy case: handler/type match, we just fire a query and return */
     173        hic = ICOpen(fccType,fccHandler,wMode);
     174        if (hic) {
     175                if (!ICSendMessage(hic,querymsg,(DWORD)lpbiIn,(DWORD)lpbiOut))
     176                        return hic;
     177                ICClose(hic);
     178        }
     179        type[4]='\0';memcpy(type,&fccType,4);
     180        handler[4]='\0';memcpy(handler,&fccHandler,4);
     181        if (fccType==streamtypeVIDEO) {
     182                hic = ICLocate(ICTYPE_VIDEO,fccHandler,lpbiIn,lpbiOut,wMode);
     183                if (hic)
     184                        return hic;
     185        }
     186        dprintf(("(%s,%s,%p,%p,0x%04x),unhandled!\n",type,handler,lpbiIn,lpbiOut,wMode));
     187        return 0;
     188}
     189
     190HIC VFWAPI ICGetDisplayFormat(
     191        HIC hic,LPBITMAPINFOHEADER lpbiIn,LPBITMAPINFOHEADER lpbiOut,
     192        INT depth,INT dx,INT dy
     193) {
     194        HIC     tmphic = hic;
     195        LRESULT lres;
     196
     197        dprintf(("(0x%08lx,%p,%p,%d,%d,%d),stub!\n",(DWORD)hic,lpbiIn,lpbiOut,depth,dx,dy));
     198        if (!tmphic) {
     199                tmphic=ICLocate(ICTYPE_VIDEO,0,lpbiIn,NULL,ICMODE_DECOMPRESS);
     200                if (!tmphic)
     201                        return tmphic;
     202        }
     203        if ((dy == lpbiIn->biHeight) || (dx == lpbiIn->biWidth))
     204                dy = dx = 0; /* no resize needed */
     205        /* Can we decompress it ? */
     206        lres = ICDecompressQuery(tmphic,lpbiIn,NULL);
     207        if (lres)
     208                goto errout; /* no, sorry */
     209        ICDecompressGetFormat(hic,lpbiIn,lpbiOut);
     210        *lpbiOut=*lpbiIn;
     211        lpbiOut->biCompression = 0;
     212        lpbiOut->biSize = sizeof(*lpbiOut);
     213        if (!depth) {
     214                HDC     hdc;
     215
     216                hdc = GetDC(0);
     217                depth = GetDeviceCaps(hdc,12)*GetDeviceCaps(hdc,14);
     218                ReleaseDC(0,hdc);
     219                if (depth==15)  depth = 16;
     220                if (depth<8)    depth =  8;
     221                /* more constraints and tests */
     222        }
     223        if (lpbiIn->biBitCount == 8)
     224                depth = 8;
     225       
     226        return hic;
     227errout:
     228        if (hic!=tmphic)
     229                ICClose(tmphic);
     230        return 0;
     231}
     232
     233DWORD VFWAPIV
     234ICCompress(
     235        HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiOutput,LPVOID lpData,
     236        LPBITMAPINFOHEADER lpbiInput,LPVOID lpBits,LPDWORD lpckid,
     237        LPDWORD lpdwFlags,LONG lFrameNum,DWORD dwFrameSize,DWORD dwQuality,
     238        LPBITMAPINFOHEADER lpbiPrev,LPVOID lpPrev
     239) {
     240        ICCOMPRESS      iccmp;
     241
     242        iccmp.dwFlags           = dwFlags;
     243
     244        iccmp.lpbiOutput        = lpbiOutput;
     245        iccmp.lpOutput          = lpData;
     246        iccmp.lpbiInput         = lpbiInput;
     247        iccmp.lpInput           = lpBits;
     248
     249        iccmp.lpckid            = lpckid;
     250        iccmp.lpdwFlags         = lpdwFlags;
     251        iccmp.lFrameNum         = lFrameNum;
     252        iccmp.dwFrameSize       = dwFrameSize;
     253        iccmp.dwQuality         = dwQuality;
     254        iccmp.lpbiPrev          = lpbiPrev;
     255        iccmp.lpPrev            = lpPrev;
     256        return ICSendMessage(hic,ICM_COMPRESS,(LPARAM)&iccmp,sizeof(iccmp));
     257}
     258
     259DWORD VFWAPIV
     260ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER  lpbi,LPVOID lpBits) {
     261        ICDECOMPRESS    icd;
     262
     263        icd.dwFlags     = dwFlags;
     264        icd.lpbiInput   = lpbiFormat;
     265        icd.lpInput     = lpData;
     266
     267        icd.lpbiOutput  = lpbi;
     268        icd.lpOutput    = lpBits;
     269        icd.ckid        = 0;
     270        return ICSendMessage(hic,ICM_DECOMPRESS,(LPARAM)&icd,sizeof(icd));
     271}
     272
     273LRESULT VFWAPI
     274ICSendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2) {
    738275        LRESULT         ret;
    739276        WINE_HIC        *whic = (WINE_HIC*)hic;
    740         INT             tvfw;
    741 
    742 #define XX(x) case x:
    743 
    744         switch (msg)
    745         {
    746 
     277
     278#define XX(x) case x: TRACE("(0x%08lx,"#x",0x%08lx,0x%08lx)\n",(DWORD)hic,lParam1,lParam2);break;
     279
     280        switch (msg) {
    747281        XX(ICM_ABOUT)
    748282        XX(ICM_GETINFO)
     
    786320        XX(ICM_SET_STATUS_PROC)
    787321        default:
    788           tvfw = 0;
     322                dprintf(("(0x%08lx,0x%08lx,0x%08lx,0x%08lx)\n",(DWORD)hic,(DWORD)msg,lParam1,lParam2));
    789323        }
    790324#if 0
    791325        if (whic->driverproc) {
     326                dprintf(("(0x%08lx,0x%08lx,0x%08lx,0x%08lx), calling %p\n",(DWORD)hic,(DWORD)msg,lParam1,lParam2,whic->driverproc));
    792327                ret = whic->driverproc(whic->hdrv,1,msg,lParam1,lParam2);
    793328        } else
    794329#endif
    795         ret = SendDriverMessage(whic->hdrv,msg,lParam1,lParam2);
     330                ret = SendDriverMessage(whic->hdrv,msg,lParam1,lParam2);
     331        TRACE(" -> 0x%08lx\n",ret);
    796332        return ret;
     333}
     334
     335DWORD   VFWAPIV ICDrawBegin(
     336        HIC                     hic,
     337        DWORD                   dwFlags,/* flags */
     338        HPALETTE                hpal,   /* palette to draw with */
     339        HWND                    hwnd,   /* window to draw to */
     340        HDC                     hdc,    /* HDC to draw to */
     341        INT                     xDst,   /* destination rectangle */
     342        INT                     yDst,
     343        INT                     dxDst,
     344        INT                     dyDst,
     345        LPBITMAPINFOHEADER      lpbi,   /* format of frame to draw */
     346        INT                     xSrc,   /* source rectangle */
     347        INT                     ySrc,
     348        INT                     dxSrc,
     349        INT                     dySrc,
     350        DWORD                   dwRate, /* frames/second = (dwRate/dwScale) */
     351        DWORD                   dwScale) {
     352        ICDRAWBEGIN     icdb;
     353
     354        icdb.dwFlags = dwFlags;
     355        icdb.hpal = hpal;
     356        icdb.hwnd = hwnd;
     357        icdb.hdc = hdc;
     358        icdb.xDst = xDst;
     359        icdb.yDst = yDst;
     360        icdb.dxDst = dxDst;
     361        icdb.dyDst = dyDst;
     362        icdb.lpbi = lpbi;
     363        icdb.xSrc = xSrc;
     364        icdb.ySrc = ySrc;
     365        icdb.dxSrc = dxSrc;
     366        icdb.dySrc = dySrc;
     367        icdb.dwRate = dwRate;
     368        icdb.dwScale = dwScale;
     369        return ICSendMessage(hic,ICM_DRAW_BEGIN,(LPARAM)&icdb,sizeof(icdb));
     370}
     371
     372DWORD VFWAPIV ICDraw(
     373        HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,DWORD cbData,
     374        LONG lTime
     375) {
     376        ICDRAW  icd;
     377
     378        icd.dwFlags = dwFlags;
     379        icd.lpFormat = lpFormat;
     380        icd.lpData = lpData;
     381        icd.cbData = cbData;
     382        icd.lTime = lTime;
     383        return ICSendMessage(hic,ICM_DRAW,(LPARAM)&icd,sizeof(icd));
     384}
     385
     386LRESULT WINAPI ICClose(HIC hic) {
     387        WINE_HIC        *whic = (WINE_HIC*)hic;
     388        TRACE("(%d).\n",hic);
     389        /* FIXME: correct? */
     390        CloseDriver(whic->hdrv,0,0);
     391        HeapFree(GetProcessHeap(),0,whic);
     392        return 0;
     393}
     394
     395HANDLE /* HDRAWDIB */ WINAPI
     396DrawDibOpen( void ) {
     397        dprintf(("stub!\n"));
     398        return 0xdead;
     399}
     400
     401BOOL WINAPI
     402DrawDibClose( HANDLE /*HDRAWDIB*/ hDib ) {
     403       dprintf(("stub!\n"));
     404       return TRUE;
     405}
     406
     407BOOL VFWAPI DrawDibBegin(HANDLE /*HDRAWDIB*/ hdd,
     408                                    HDC      hdc,
     409                                    INT      dxDst,
     410                                    INT      dyDst,
     411                                    LPBITMAPINFOHEADER lpbi,
     412                                    INT      dxSrc,
     413                                    INT      dySrc,
     414                                    UINT     wFlags) {
     415        dprintf(("(%d,0x%lx,%d,%d,%p,%d,%d,0x%08lx), stub!\n",
     416                hdd,(DWORD)hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,(DWORD)wFlags
     417        ));
     418        return TRUE;
     419}
     420
     421
     422BOOL VFWAPI
     423DrawDibSetPalette(HANDLE /*HDRAWDIB*/ hdd, HPALETTE hpal) {
     424        dprintf(("(%d,%d),stub!\n",hdd,hpal));
     425        return TRUE;
     426}
     427
     428UINT VFWAPI DrawDibRealize(HANDLE /*HDRAWDIB*/ hdd, HDC hdc, BOOL fBackground) {
     429        dprintf(("(0x%08lx,0x%08lx,%d),stub!\n",(DWORD)hdd,(DWORD)hdc,fBackground));
     430        return 0;
     431}
     432
     433
     434HWND VFWAPIV MCIWndCreate (HWND hwndParent, HINSTANCE hInstance,
     435                      DWORD dwStyle,LPVOID szFile)
     436{       dprintf(("%x %x %lx %p\n",hwndParent, hInstance, dwStyle, szFile));
     437        return 0;
     438}
     439HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance,
     440                      DWORD dwStyle,LPCSTR szFile)
     441{       dprintf(("%x %x %lx %s\n",hwndParent, hInstance, dwStyle, szFile));
     442        return 0;
     443}
     444HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance,
     445                      DWORD dwStyle,LPCWSTR szFile)
     446{       dprintf(("%x %x %lx %s\n",hwndParent, hInstance, dwStyle, debugstr_w(szFile)));
     447        return 0;
     448}
     449
     450/* Stubs not included in Wine-Code*/
     451
     452
     453/****************************************************************************
     454 *              DrawDibChangePalette            [MSVFW.4]
     455 */
     456
     457BOOL VFWAPI DrawDibChangePalette(HANDLE /*HDRAWDIB*/ hdd, int iStart, int iLen, LPPALETTEENTRY lppe)
     458{
     459#ifdef DEBUG
     460    dprintf(("MSVFW32: DrawDibChangePalette not implemented\n"));
     461#endif
     462        return TRUE;
     463}
     464
     465
     466/****************************************************************************
     467 *              DrawDibDraw                     [MSVFW.6]
     468 */
     469BOOL VFWAPI DrawDibDraw(HANDLE /*HDRAWDIB*/ hdd,
     470                                   HDC      hdc,
     471                                   int      xDst,
     472                                   int      yDst,
     473                                   int      dxDst,
     474                                   int      dyDst,
     475                                   LPBITMAPINFOHEADER lpbi,
     476                                   LPVOID   lpBits,
     477                                   int      xSrc,
     478                                   int      ySrc,
     479                                   int      dxSrc,
     480                                   int      dySrc,
     481                                   UINT     wFlags)
     482{
     483#ifdef DEBUG
     484    dprintf(("MSVFW32: DrawDibDraw not implemented\n"));
     485#endif
     486       return TRUE;
     487}
     488
     489
     490/****************************************************************************
     491 *              DrawDibEnd                      [MSVFW.7]
     492 */
     493BOOL VFWAPI DrawDibEnd(HANDLE /*HDRAWDIB*/ hdd)
     494{
     495#ifdef DEBUG
     496    dprintf(("MSVFW32: DrawDibEnd not implemented\n"));
     497#endif
     498       return TRUE;
     499}
     500
     501
     502/****************************************************************************
     503 *              DrawDibGetBuffer                [MSVFW.8]
     504 */
     505LPVOID VFWAPI DrawDibGetBuffer(HANDLE /*HDRAWDIB*/ hdd, LPBITMAPINFOHEADER lpbi, DWORD dwSize, DWORD dwFlags)
     506{
     507#ifdef DEBUG
     508    dprintf(("MSVFW32: DrawDibGetBuffer not implemented\n"));
     509#endif
     510       return 0;
     511}
     512
     513
     514/****************************************************************************
     515 *              DrawDibGetPalette               [MSVFW.9]
     516 */
     517HPALETTE VFWAPI DrawDibGetPalette(HANDLE /*HDRAWDIB*/ hdd)
     518{
     519#ifdef DEBUG
     520    dprintf(("MSVFW32: DrawDibGetPalette not implemented\n"));
     521#endif
     522       return TRUE;
     523}
     524
     525
     526/****************************************************************************
     527 *              DrawDibProfileDisplay           [MSVFW.11]
     528 */
     529DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi)
     530{
     531#ifdef DEBUG
     532    dprintf(("MSVFW32: DrawDibProfileDisplay not implemented\n"));
     533#endif
     534       return TRUE;
     535}
     536
     537
     538/****************************************************************************
     539 *              DrawDibStart                    [MSVFW.14]
     540 */
     541BOOL VFWAPI DrawDibStart(HANDLE /*HDRAWDIB*/ hdd, DWORD rate)
     542{
     543#ifdef DEBUG
     544    dprintf(("MSVFW32: DrawDibStart not implemented\n"));
     545#endif
     546        return TRUE;
     547}
     548
     549
     550/****************************************************************************
     551 *              DrawDibStop                     [MSVFW.15]
     552 */
     553BOOL VFWAPI DrawDibStop(HANDLE /*HDRAWDIB*/ hdd)
     554{
     555#ifdef DEBUG
     556    dprintf(("MSVFW32: DrawDibStop not implemented\n"));
     557#endif
     558        return TRUE;
     559}
     560
     561
     562/****************************************************************************
     563 *              DrawDibTime                     [MSVFW.16]
     564 */
     565BOOL VFWAPI DrawDibTime(HANDLE /*HDRAWDIB*/ hdd, DWORD lpddtime)
     566{
     567#ifdef DEBUG
     568    dprintf(("MSVFW32: DrawDibTime not implemented\n"));
     569#endif
     570        return TRUE;
     571}
     572
     573
     574/****************************************************************************
     575 *              GetOpenFileNamePreview          [MSVFW.17]
     576 */
     577
     578/* NO */
     579
     580
     581/****************************************************************************
     582 *              GetOpenFileNamePreviewA         [MSVFW.18]
     583 */
     584BOOL VFWAPI GetOpenFileNamePreviewA(LPOPENFILENAMEA lpofn)
     585{
     586#ifdef DEBUG
     587    dprintf(("MSVFW32: GetOpenFileNamePreviewA not implemented\n"));
     588#endif
     589        return TRUE;
     590}
     591
     592
     593/****************************************************************************
     594 *              GetOpenFileNamePreviewW         [MSVFW.19]
     595 */
     596BOOL VFWAPI GetOpenFileNamePreviewW(LPOPENFILENAMEW lpofn)
     597{
     598#ifdef DEBUG
     599    dprintf(("MSVFW32: GetOpenFileNamePreviewW not implemented\n"));
     600#endif
     601        return TRUE;
     602}
     603
     604
     605/****************************************************************************
     606 *              GetSaveFileNamePreviewA         [MSVFW.20]
     607 */
     608BOOL VFWAPI GetSaveFileNamePreviewA(LPOPENFILENAMEA lpofn)
     609{
     610#ifdef DEBUG
     611    dprintf(("MSVFW32: GetSaveFileNamePreviewA not implemented\n"));
     612#endif
     613        return TRUE;
     614}
     615
     616
     617/****************************************************************************
     618 *              GetSaveFileNamePreviewW         [MSVFW.21]
     619 */
     620BOOL VFWAPI GetSaveFileNamePreviewW(LPOPENFILENAMEW lpofn)
     621{
     622#ifdef DEBUG
     623    dprintf(("MSVFW32: GetSaveFileNamePreviewW not implemented\n"));
     624#endif
     625        return TRUE;
     626}
     627
     628
     629/****************************************************************************
     630 *              ICCompressorChoose              [MSVFW.24]
     631 */
     632BOOL VFWAPI ICCompressorChoose(
     633        HWND        hwnd,               // parent window for dialog
     634        UINT        uiFlags,            // flags
     635        LPVOID      pvIn,               // input format (optional)
     636        LPVOID      lpData,             // input data (optional)
     637        PCOMPVARS   pc,                 // data about the compressor/dlg
     638        LPSTR       lpszTitle)          // dialog title (optional)
     639{
     640#ifdef DEBUG
     641    dprintf(("MSVFW32: ICCompressorChoose not implemented\n"));
     642#endif
     643        return TRUE;
     644}
     645
     646
     647/****************************************************************************
     648 *              ICCompressorFree                [MSVFW.25]
     649 */
     650void VFWAPI ICCompressorFree(PCOMPVARS pc)
     651{
     652#ifdef DEBUG
     653    dprintf(("MSVFW32: ICCompressorFree not implemented\n"));
     654#endif
     655        return;
     656}
     657
     658
     659/****************************************************************************
     660 *              ICImageCompress                 [MSVFW.31]
     661 */
     662HANDLE VFWAPI ICImageCompress(
     663        HIC                 hic,        // compressor to use
     664        UINT                uiFlags,    // flags (none yet)
     665        LPBITMAPINFO        lpbiIn,     // format to compress from
     666        LPVOID              lpBits,     // data to compress
     667        LPBITMAPINFO        lpbiOut,    // compress to this (NULL ==> default)
     668        LONG                lQuality,   // quality to use
     669        LONG                plSize)     // compress to this size (0=whatever)
     670{       
     671#ifdef DEBUG
     672    dprintf(("MSVFW32: ICImageCompress not implemented\n"));
     673#endif
     674        return 0;
     675}
     676
     677
     678/****************************************************************************
     679 *              ICImageDecompress               [MSVFW.32]
     680 */
     681HANDLE VFWAPI ICImageDecompress(
     682        HIC                 hic,        // compressor to use
     683        UINT                uiFlags,    // flags (none yet)
     684        LPBITMAPINFO        lpbiIn,     // format to decompress from
     685        LPVOID              lpBits,     // data to decompress
     686        LPBITMAPINFO        lpbiOut)    // decompress to this (NULL ==> default)
     687{       
     688#ifdef DEBUG
     689    dprintf(("MSVFW32: ICImageDecompress not implemented\n"));
     690#endif
     691        return 0;
     692}
     693
     694
     695/****************************************************************************
     696 *              ICInstall                       [MSVFW.34]
     697 */
     698BOOL    VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, UINT wFlags)
     699{       
     700#ifdef DEBUG
     701    dprintf(("MSVFW32: ICInstall not implemented\n"));
     702#endif
     703        return TRUE;
     704}
     705
     706
     707/**************************************************************************
     708 *              ICRemove                        [MSVFW.39]
     709 */
     710BOOL    VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags)
     711{       
     712#ifdef DEBUG
     713    dprintf(("MSVFW32: ICRemove not implemented\n"));
     714#endif
     715        return TRUE;
    797716}
    798717
     
    840759
    841760/**************************************************************************
    842  *              MCIWndCreate                    [MSVFW.44]
    843  */
    844 HWND VFWAPIV MCIWndCreate (HWND hwndParent, HINSTANCE hInstance,
    845                       DWORD dwStyle,LPVOID szFile)
    846 {       
    847 #ifdef DEBUG
    848     dprintf(("MSVFW32: MCIWndCreate not implemented\n"));
    849 #endif
    850         return 0;
    851 }
    852 
    853 
    854 /**************************************************************************
    855  *              MCIWndCreateA                   [MSVFW.45]
    856  */
    857 HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance,
    858                       DWORD dwStyle,LPCSTR szFile)
    859 {       
    860 #ifdef DEBUG
    861     dprintf(("MSVFW32: MCIWndCreateA not implemented\n"));
    862 #endif
    863         return 0;
    864 }
    865 
    866 
    867 /**************************************************************************
    868  *              MCIWndCreateW                   [MSVFW.46]
    869  */
    870 HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance,
    871                       DWORD dwStyle,LPCWSTR szFile)
    872 {       
    873 #ifdef DEBUG
    874     dprintf(("MSVFW32: MCIWndCreateW not implemented\n"));
    875 #endif
    876         return 0;
    877 }
    878 
    879 
    880 /**************************************************************************
    881761 *              MCIWndRegisterClass             [MSVFW.47]
    882762 */
     
    888768        return TRUE;
    889769}
    890 
    891 
    892 /**************************************************************************
    893  *              StretchDIB                      [MSVFW.48]
    894  */
    895 
    896 /* NO */
Note: See TracChangeset for help on using the changeset viewer.