devinst16.c 4.39 KB
Newer Older
1 2 3
/*
 * SetupAPI device installer
 *
4
 * Copyright 2000 Andreas Mohr for CodeWeavers
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 20
 */

21 22
#include <stdarg.h>

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
#include "windef.h"
#include "winbase.h"
#include "setupx16.h"
#include "wine/debug.h"

WINE_DEFAULT_DEBUG_CHANNEL(setupapi);

/***********************************************************************
 *		DiGetClassDevs (SETUPX.304)
 * Return a list of installed system devices.
 * Uses HKLM\\ENUM to list devices.
 */
RETERR16 WINAPI DiGetClassDevs16(LPLPDEVICE_INFO16 lplpdi,
                                 LPCSTR lpszClassName, HWND16 hwndParent, INT16 iFlags)
{
    LPDEVICE_INFO16 lpdi;

    FIXME("(%p, '%s', %04x, %04x), semi-stub.\n",
          lplpdi, lpszClassName, hwndParent, iFlags);
    lpdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DEVICE_INFO16));
    lpdi->cbSize = sizeof(DEVICE_INFO16);
    *lplpdi = (LPDEVICE_INFO16)MapLS(lpdi);
    return OK;
}

/***********************************************************************
 *		DiBuildCompatDrvList (SETUPX.300)
 */
RETERR16 WINAPI DiBuildCompatDrvList16(LPDEVICE_INFO16 lpdi)
{
    FIXME("(%p): stub\n", lpdi);
    lpdi->lpCompatDrvList = NULL;
    return FALSE;
}

58 59 60 61 62 63 64 65 66 67
/***********************************************************************
 *	        DiBuildClassDrvList (SETUPX.301)
 */
RETERR16 WINAPI DiBuildClassDrvList16(LPDEVICE_INFO16 lpdi)
{
    FIXME("(%p): stub\n", lpdi);
    lpdi->lpCompatDrvList = NULL;
    return FALSE;
}

68 69 70
/***********************************************************************
 *		DiCallClassInstaller (SETUPX.308)
 */
71
RETERR16 WINAPI DiCallClassInstaller16(DI_FUNCTION16 diFctn, LPDEVICE_INFO16 lpdi)
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
{
    FIXME("(%x, %p): stub\n", diFctn, lpdi);
    return FALSE;
}

/***********************************************************************
 *		DiCreateDevRegKey (SETUPX.318)
 */
RETERR16 WINAPI DiCreateDevRegKey16(LPDEVICE_INFO16 lpdi,
                                    VOID* p2, WORD w3,
                                    LPCSTR s4, WORD w5)
{
    FIXME("(%p, %p, %x, %s, %x): stub\n", lpdi, p2, w3, debugstr_a(s4), w5);
    return FALSE;
}

/***********************************************************************
 *		DiDeleteDevRegKey (SETUPX.344)
 */
RETERR16 WINAPI DiDeleteDevRegKey16(LPDEVICE_INFO16 lpdi, INT16 iFlags)
{
    FIXME("(%p, %x): stub\n", lpdi, iFlags);
    return FALSE;
}

/***********************************************************************
 *		DiCreateDeviceInfo (SETUPX.303)
 */
RETERR16 WINAPI DiCreateDeviceInfo16(LPLPDEVICE_INFO16 lplpdi,
                                     LPCSTR lpszDescription, DWORD dnDevnode,
                                     HKEY16 hkey, LPCSTR lpszRegsubkey,
                                     LPCSTR lpszClassName, HWND16 hwndParent)
{
    LPDEVICE_INFO16 lpdi;
106
    FIXME("(%p %s %08x %x %s %s %x): stub\n", lplpdi,
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
          debugstr_a(lpszDescription), dnDevnode, hkey,
          debugstr_a(lpszRegsubkey), debugstr_a(lpszClassName), hwndParent);
    lpdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DEVICE_INFO16));
    lpdi->cbSize = sizeof(DEVICE_INFO16);
    strcpy(lpdi->szClassName, lpszClassName);
    lpdi->hwndParent = hwndParent;
    *lplpdi = (LPDEVICE_INFO16)MapLS(lpdi);
    return OK;
}

/***********************************************************************
 *		DiDestroyDeviceInfoList (SETUPX.305)
 */
RETERR16 WINAPI DiDestroyDeviceInfoList16(LPDEVICE_INFO16 lpdi)
{
    FIXME("(%p): stub\n", lpdi);
    return FALSE;
}

/***********************************************************************
 *		DiOpenDevRegKey (SETUPX.319)
 */
RETERR16 WINAPI DiOpenDevRegKey16(LPDEVICE_INFO16 lpdi,
                                  LPHKEY16 lphk,INT16 iFlags)
{
    FIXME("(%p %p %d): stub\n", lpdi, lphk, iFlags);
    return FALSE;
}