msado15: Implement Dispatch functions in Field.
[wine.git] / dlls / msado15 / msado15_private.h
blob9db82c8bd9a4beb6b6140449781dac7c6fb0377f
1 /*
2 * Copyright 2019 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _WINE_MSADO15_PRIVATE_H_
20 #define _WINE_MSADO15_PRIVATE_H_
22 #define MAKE_ADO_HRESULT( err ) MAKE_HRESULT( SEVERITY_ERROR, FACILITY_CONTROL, err )
24 HRESULT Command_create( void ** ) DECLSPEC_HIDDEN;
25 HRESULT Connection_create( void ** ) DECLSPEC_HIDDEN;
26 HRESULT Recordset_create( void ** ) DECLSPEC_HIDDEN;
27 HRESULT Stream_create( void ** ) DECLSPEC_HIDDEN;
29 HRESULT create_command_text(IUnknown *session, BSTR command, ICommandText **cmd_text) DECLSPEC_HIDDEN;
31 static inline void *heap_realloc_zero( void *mem, SIZE_T len )
33 if (!mem) return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len );
34 return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len );
37 static inline WCHAR *strdupW( const WCHAR *src )
39 WCHAR *dst;
40 if (!src) return NULL;
41 if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(*dst) ))) lstrcpyW( dst, src );
42 return dst;
45 typedef enum tid_t {
46 Command_tid,
47 Connection_tid,
48 Field_tid,
49 Stream_tid,
50 LAST_tid
51 } tid_t;
53 HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) DECLSPEC_HIDDEN;
55 #endif /* _WINE_MSADO15_PRIVATE_H_ */