winecoreaudio: Remove GetAudioSessionWrapper.
[wine.git] / dlls / capi2032 / cap20wxx.c
blobc8c008d7c5fd0b421a5510578408346c9f6a46a2
1 /*
2 * cap20wxx.c
4 * Copyright 2002-2003 AVM Computersysteme Vertriebs GmbH
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * 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
22 #define __NO_CAPIUTILS__
24 #include <stdio.h>
25 #include <sys/types.h>
27 #include "unixlib.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(capi);
32 #define CAPI_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
35 BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, LPVOID reserved )
37 switch (reason)
39 case DLL_PROCESS_ATTACH:
40 DisableThreadLibraryCalls( instance );
41 return !__wine_init_unix_call();
43 return TRUE;
46 /*===========================================================================* \
47 \*===========================================================================*/
49 DWORD WINAPI CAPI_REGISTER (DWORD MessageBufferSize, DWORD maxLogicalConnection, DWORD maxBDataBlocks, DWORD maxBDataLen, DWORD *pApplID) {
50 struct register_params params = { MessageBufferSize, maxLogicalConnection,
51 maxBDataBlocks, maxBDataLen, pApplID };
52 DWORD fret;
54 fret = CAPI_CALL( register, &params );
55 TRACE ( "(%lx) -> %lx\n", *pApplID, fret);
56 return fret;
59 /*---------------------------------------------------------------------------*\
60 \*---------------------------------------------------------------------------*/
61 DWORD WINAPI CAPI_RELEASE (DWORD ApplID) {
62 struct release_params params = { ApplID };
63 DWORD fret;
65 fret = CAPI_CALL( release, &params );
66 TRACE ("(%lx) -> %lx\n", ApplID, fret);
67 return fret;
70 /*---------------------------------------------------------------------------*\
71 \*---------------------------------------------------------------------------*/
72 DWORD WINAPI CAPI_PUT_MESSAGE (DWORD ApplID, PVOID pCAPIMessage) {
73 struct put_message_params params = { ApplID, pCAPIMessage };
74 DWORD fret;
76 fret = CAPI_CALL( put_message, &params );
77 TRACE ("(%lx) -> %lx\n", ApplID, fret);
78 return fret;
81 /*---------------------------------------------------------------------------*\
82 \*---------------------------------------------------------------------------*/
83 DWORD WINAPI CAPI_GET_MESSAGE (DWORD ApplID, PVOID *ppCAPIMessage) {
84 struct get_message_params params = { ApplID, ppCAPIMessage };
85 DWORD fret;
87 fret = CAPI_CALL( get_message, &params );
88 TRACE ("(%lx) -> %lx\n", ApplID, fret);
89 return fret;
92 /*---------------------------------------------------------------------------*\
93 \*---------------------------------------------------------------------------*/
94 DWORD WINAPI CAPI_WAIT_FOR_SIGNAL (DWORD ApplID) {
95 struct waitformessage_params params = { ApplID };
96 TRACE ("(%lx)\n", ApplID);
98 return CAPI_CALL( waitformessage, &params );
101 /*---------------------------------------------------------------------------*\
102 \*---------------------------------------------------------------------------*/
103 DWORD WINAPI CAPI_GET_MANUFACTURER (char *SzBuffer) {
104 struct get_manufacturer_params params = { SzBuffer };
105 DWORD fret;
107 fret = CAPI_CALL( get_manufacturer, &params );
108 if (!strncmp (SzBuffer, "AVM", 3)) {
109 strcpy (SzBuffer, "AVM-GmbH");
111 TRACE ("(%s) -> %lx\n", SzBuffer, fret);
112 return fret;
115 /*---------------------------------------------------------------------------*\
116 \*---------------------------------------------------------------------------*/
117 DWORD WINAPI CAPI_GET_VERSION (DWORD *pCAPIMajor, DWORD *pCAPIMinor, DWORD *pManufacturerMajor, DWORD *pManufacturerMinor) {
118 struct get_version_params params = { pCAPIMajor, pCAPIMinor, pManufacturerMajor, pManufacturerMinor };
119 DWORD fret;
121 fret = CAPI_CALL( get_version, &params );
122 TRACE ("(%lx.%lx,%lx.%lx) -> %lx\n", *pCAPIMajor, *pCAPIMinor, *pManufacturerMajor,
123 *pManufacturerMinor, fret);
124 return fret;
127 /*---------------------------------------------------------------------------*\
128 \*---------------------------------------------------------------------------*/
129 DWORD WINAPI CAPI_GET_SERIAL_NUMBER (char *SzBuffer) {
130 struct get_serial_number_params params = { SzBuffer };
131 DWORD fret;
133 fret = CAPI_CALL( get_serial_number, &params );
134 TRACE ("(%s) -> %lx\n", SzBuffer, fret);
135 return fret;
138 /*---------------------------------------------------------------------------*\
139 \*---------------------------------------------------------------------------*/
140 DWORD WINAPI CAPI_GET_PROFILE (PVOID SzBuffer, DWORD CtlrNr) {
141 struct get_profile_params params = { SzBuffer, CtlrNr };
142 DWORD fret;
144 fret = CAPI_CALL( get_profile, &params );
145 TRACE ("(%lx,%x) -> %lx\n", CtlrNr, *(unsigned short *)SzBuffer, fret);
146 return fret;
149 /*---------------------------------------------------------------------------*\
150 \*---------------------------------------------------------------------------*/
151 DWORD WINAPI CAPI_INSTALLED (void) {
152 DWORD fret;
154 fret = CAPI_CALL( isinstalled, NULL );
155 TRACE ("() -> %lx\n", fret);
156 return fret;
159 /*---------------------------------------------------------------------------*\
160 \*---------------------------------------------------------------------------*/
161 DWORD WINAPI CAPI_MANUFACTURER (DWORD Class, DWORD Function, DWORD Ctlr, PVOID pParams, DWORD ParamsLen) {
162 FIXME ("(), not supported!\n");
163 return 0x1109;
166 /*---------------------------------------------------------------------------*\
167 \*---------------------------------------------------------------------------*/