Fix the case of product and company names.
[wine] / win32 / newfns.c
1 /*
2  * Win32 miscellaneous functions
3  *
4  * Copyright 1995 Thomas Sandford (tdgsandf@prds-grn.demon.co.uk)
5  *
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.
10  *
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.
15  *
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 /* Misc. new functions - they should be moved into appropriate files
22 at a later date. */
23
24 #include "config.h"
25 #include "wine/port.h"
26
27 #include <stdarg.h>
28 #include <stdio.h>
29 #include <string.h>
30 #ifdef HAVE_SYS_TIME_H
31 # include <sys/time.h>
32 #endif
33 #ifdef HAVE_UNISTD_H
34 # include <unistd.h>
35 #endif
36
37 #define NONAMELESSUNION
38 #define NONAMELESSSTRUCT
39 #include "windef.h"
40 #include "winbase.h"
41 #include "winnls.h"
42 #include "winerror.h"
43 #include "wine/debug.h"
44
45 WINE_DEFAULT_DEBUG_CHANNEL(win32);
46
47
48 /****************************************************************************
49  *              FlushInstructionCache (KERNEL32.@)
50  */
51 BOOL WINAPI FlushInstructionCache(HANDLE hProcess, LPCVOID lpBaseAddress, SIZE_T dwSize)
52 {
53     if (GetVersion() & 0x80000000) return TRUE; /* not NT, always TRUE */
54     FIXME("(%p,%p,0x%08lx): stub\n",hProcess, lpBaseAddress, dwSize);
55     return TRUE;
56 }
57
58
59 /******************************************************************************
60  * CreateMailslotA [KERNEL32.@]
61  */
62 HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize,
63                                    DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa)
64 {
65     FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName),
66           nMaxMessageSize, lReadTimeout, sa);
67     return (HANDLE)1;
68 }
69
70
71 /******************************************************************************
72  * CreateMailslotW [KERNEL32.@]  Creates a mailslot with specified name
73  *
74  * PARAMS
75  *    lpName          [I] Pointer to string for mailslot name
76  *    nMaxMessageSize [I] Maximum message size
77  *    lReadTimeout    [I] Milliseconds before read time-out
78  *    sa              [I] Pointer to security structure
79  *
80  * RETURNS
81  *    Success: Handle to mailslot
82  *    Failure: INVALID_HANDLE_VALUE
83  */
84 HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize,
85                                    DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa )
86 {
87     FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName),
88           nMaxMessageSize, lReadTimeout, sa);
89     return (HANDLE)1;
90 }
91
92
93 /******************************************************************************
94  * GetMailslotInfo [KERNEL32.@]  Retrieves info about specified mailslot
95  *
96  * PARAMS
97  *    hMailslot        [I] Mailslot handle
98  *    lpMaxMessageSize [O] Address of maximum message size
99  *    lpNextSize       [O] Address of size of next message
100  *    lpMessageCount   [O] Address of number of messages
101  *    lpReadTimeout    [O] Address of read time-out
102  *
103  * RETURNS
104  *    Success: TRUE
105  *    Failure: FALSE
106  */
107 BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
108                                LPDWORD lpNextSize, LPDWORD lpMessageCount,
109                                LPDWORD lpReadTimeout )
110 {
111     FIXME("(%p): stub\n",hMailslot);
112     if (lpMaxMessageSize) *lpMaxMessageSize = (DWORD)NULL;
113     if (lpNextSize) *lpNextSize = (DWORD)NULL;
114     if (lpMessageCount) *lpMessageCount = (DWORD)NULL;
115     if (lpReadTimeout) *lpReadTimeout = (DWORD)NULL;
116     return TRUE;
117 }
118
119
120 /******************************************************************************
121  * GetCompressedFileSizeA [KERNEL32.@]
122  *
123  * NOTES
124  *    This should call the W function below
125  */
126 DWORD WINAPI GetCompressedFileSizeA(
127     LPCSTR lpFileName,
128     LPDWORD lpFileSizeHigh)
129 {
130     FIXME("(...): stub\n");
131     return 0xffffffff;
132 }
133
134
135 /******************************************************************************
136  * GetCompressedFileSizeW [KERNEL32.@]
137  *
138  * RETURNS
139  *    Success: Low-order doubleword of number of bytes
140  *    Failure: 0xffffffff
141  */
142 DWORD WINAPI GetCompressedFileSizeW(
143     LPCWSTR lpFileName,     /* [in]  Pointer to name of file */
144     LPDWORD lpFileSizeHigh) /* [out] Receives high-order doubleword of size */
145 {
146     FIXME("(%s,%p): stub\n",debugstr_w(lpFileName),lpFileSizeHigh);
147     return 0xffffffff;
148 }
149
150
151 /******************************************************************************
152  *              CreateIoCompletionPort (KERNEL32.@)
153  */
154 HANDLE WINAPI CreateIoCompletionPort(HANDLE hFileHandle,
155 HANDLE hExistingCompletionPort, DWORD dwCompletionKey,
156 DWORD dwNumberOfConcurrentThreads)
157 {
158     FIXME("(%p, %p, %08lx, %08lx): stub.\n", hFileHandle, hExistingCompletionPort, dwCompletionKey, dwNumberOfConcurrentThreads);
159     return NULL;
160 }
161
162 /******************************************************************************
163  *              GetQueuedCompletionStatus (KERNEL32.@)
164  */
165 BOOL WINAPI GetQueuedCompletionStatus(
166     HANDLE CompletionPort, LPDWORD lpNumberOfBytesTransferred,
167     LPDWORD lpCompletionKey, LPOVERLAPPED *lpOverlapped, DWORD dwMilliseconds
168 ) {
169     FIXME("(%p,%p,%p,%p,%ld), stub!\n",CompletionPort,lpNumberOfBytesTransferred,lpCompletionKey,lpOverlapped,dwMilliseconds);
170     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
171     return FALSE;
172 }
173
174 /***********************************************************************
175  *           Beep   (KERNEL32.@)
176  */
177 BOOL WINAPI Beep( DWORD dwFreq, DWORD dwDur )
178 {
179     static const char beep = '\a';
180     /* dwFreq and dwDur are ignored by Win95 */
181     if (isatty(2)) write( 2, &beep, 1 );
182     return TRUE;
183 }