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