Release 1.5.29.
[wine] / dlls / dnsapi / main.c
1 /*
2  * DNS support
3  *
4  * Copyright (C) 2006 Matthew Kehrer
5  * Copyright (C) 2006 Hans Leidekker
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 #include <stdarg.h>
23
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winerror.h"
27 #include "windns.h"
28
29 #include "wine/debug.h"
30
31 WINE_DEFAULT_DEBUG_CHANNEL(dnsapi);
32
33 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
34 {
35     TRACE( "(%p, %d, %p)\n", hinst, reason, reserved );
36
37     switch (reason)
38     {
39     case DLL_WINE_PREATTACH:
40         return FALSE;  /* prefer native version */
41     case DLL_PROCESS_ATTACH:
42         DisableThreadLibraryCalls( hinst );
43         break;
44     }
45     return TRUE;
46 }
47
48 /******************************************************************************
49  * DnsAcquireContextHandle_A              [DNSAPI.@]
50  *
51  */
52 DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, PVOID cred,
53                                              PHANDLE context )
54 {
55     FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
56
57     *context = (HANDLE)0xdeadbeef;
58     return ERROR_SUCCESS;
59 }
60
61 /******************************************************************************
62  * DnsAcquireContextHandle_UTF8              [DNSAPI.@]
63  *
64  */
65 DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, PVOID cred,
66                                                 PHANDLE context )
67 {
68     FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
69
70     *context = (HANDLE)0xdeadbeef;
71     return ERROR_SUCCESS;
72 }
73
74 /******************************************************************************
75  * DnsAcquireContextHandle_W              [DNSAPI.@]
76  *
77  */
78 DNS_STATUS WINAPI DnsAcquireContextHandle_W( DWORD flags, PVOID cred,
79                                              PHANDLE context )
80 {
81     FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
82
83     *context = (HANDLE)0xdeadbeef;
84     return ERROR_SUCCESS;
85 }
86
87 /******************************************************************************
88  * DnsFlushResolverCache               [DNSAPI.@]
89  *
90  */
91 VOID WINAPI DnsFlushResolverCache(void)
92 {
93     FIXME(": stub\n");
94 }
95
96
97 /******************************************************************************
98  * DnsReleaseContextHandle                [DNSAPI.@]
99  *
100  */
101 VOID WINAPI DnsReleaseContextHandle( HANDLE context )
102 {
103     FIXME( "(%p) stub\n", context );
104 }
105
106 /******************************************************************************
107  * DnsExtractRecordsFromMessage_UTF8       [DNSAPI.@]
108  *
109  */
110 DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8( PDNS_MESSAGE_BUFFER buffer,
111                                                      WORD len, PDNS_RECORDA *record )
112 {
113     FIXME( "(%p,%d,%p) stub\n", buffer, len, record );
114
115     *record = NULL;
116     return ERROR_SUCCESS;
117 }
118
119 /******************************************************************************
120  * DnsExtractRecordsFromMessage_W          [DNSAPI.@]
121  *
122  */
123 DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W( PDNS_MESSAGE_BUFFER buffer,
124                                                   WORD len, PDNS_RECORDW *record )
125 {
126     FIXME( "(%p,%d,%p) stub\n", buffer, len, record );
127
128     *record = NULL;
129     return ERROR_SUCCESS;
130 }
131
132 /******************************************************************************
133  * DnsModifyRecordsInSet_A                 [DNSAPI.@]
134  *
135  */
136 DNS_STATUS WINAPI DnsModifyRecordsInSet_A( PDNS_RECORDA add, PDNS_RECORDA delete,
137                                            DWORD options, HANDLE context,
138                                            PVOID servers, PVOID reserved )
139 {
140     FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
141            context, servers, reserved );
142     return ERROR_SUCCESS;
143 }
144
145 /******************************************************************************
146  * DnsModifyRecordsInSet_UTF8              [DNSAPI.@]
147  *
148  */
149 DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( PDNS_RECORDA add, PDNS_RECORDA delete,
150                                               DWORD options, HANDLE context,
151                                               PVOID servers, PVOID reserved )
152 {
153     FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
154            context, servers, reserved );
155     return ERROR_SUCCESS;
156 }
157
158 /******************************************************************************
159  * DnsModifyRecordsInSet_W                 [DNSAPI.@]
160  *
161  */
162 DNS_STATUS WINAPI DnsModifyRecordsInSet_W( PDNS_RECORDW add, PDNS_RECORDW delete,
163                                            DWORD options, HANDLE context,
164                                            PVOID servers, PVOID reserved )
165 {
166     FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
167            context, servers, reserved );
168     return ERROR_SUCCESS;
169 }
170
171 /******************************************************************************
172  * DnsWriteQuestionToBuffer_UTF8          [DNSAPI.@]
173  *
174  */
175 BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
176                                            PCSTR name, WORD type, WORD xid,
177                                            BOOL recurse )
178 {
179     FIXME( "(%p,%p,%s,%d,%d,%d) stub\n", buffer, size, debugstr_a(name),
180            type, xid, recurse );
181     return FALSE;
182 }
183
184 /******************************************************************************
185  * DnsWriteQuestionToBuffer_W              [DNSAPI.@]
186  *
187  */
188 BOOL WINAPI DnsWriteQuestionToBuffer_W( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
189                                         PCWSTR name, WORD type, WORD xid,
190                                         BOOL recurse )
191 {
192     FIXME( "(%p,%p,%s,%d,%d,%d) stub\n", buffer, size, debugstr_w(name),
193            type, xid, recurse );
194     return FALSE;
195 }
196
197 /******************************************************************************
198  * DnsReplaceRecordSetA                    [DNSAPI.@]
199  *
200  */
201 DNS_STATUS WINAPI DnsReplaceRecordSetA( PDNS_RECORDA set, DWORD options,
202                                         HANDLE context, PVOID servers,
203                                         PVOID reserved )
204 {
205     FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
206            servers, reserved );
207     return ERROR_SUCCESS;
208 }
209
210 /******************************************************************************
211  * DnsReplaceRecordSetUTF8                 [DNSAPI.@]
212  *
213  */
214 DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( PDNS_RECORDA set, DWORD options,
215                                            HANDLE context, PVOID servers,
216                                            PVOID reserved )
217 {
218     FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
219            servers, reserved );
220     return ERROR_SUCCESS;
221 }
222
223 /******************************************************************************
224  * DnsReplaceRecordSetW                    [DNSAPI.@]
225  *
226  */
227 DNS_STATUS WINAPI DnsReplaceRecordSetW( PDNS_RECORDW set, DWORD options,
228                                         HANDLE context, PVOID servers,
229                                         PVOID reserved )
230 {
231     FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
232            servers, reserved );
233     return ERROR_SUCCESS;
234 }