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
25 #include "wine/port.h"
29 #ifdef HAVE_SYS_TIME_H
30 # include <sys/time.h>
36 #define NONAMELESSUNION
37 #define NONAMELESSSTRUCT
42 #include "wine/debug.h"
44 WINE_DEFAULT_DEBUG_CHANNEL(win32
);
45 WINE_DECLARE_DEBUG_CHANNEL(debug
);
48 /****************************************************************************
49 * FlushInstructionCache (KERNEL32.@)
51 BOOL WINAPI
FlushInstructionCache(HANDLE hProcess
, LPCVOID lpBaseAddress
, SIZE_T dwSize
)
53 if (GetVersion() & 0x80000000) return TRUE
; /* not NT, always TRUE */
54 FIXME_(debug
)("(0x%08lx,%p,0x%08lx): stub\n",(DWORD
)hProcess
, lpBaseAddress
, dwSize
);
58 /***********************************************************************
59 * GetSystemPowerStatus (KERNEL32.@)
61 BOOL WINAPI
GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr
)
63 return FALSE
; /* no power management support */
67 /***********************************************************************
68 * SetSystemPowerState (KERNEL32.@)
70 BOOL WINAPI
SetSystemPowerState(BOOL suspend_or_hibernate
,
73 /* suspend_or_hibernate flag: w95 does not support
74 this feature anyway */
89 /******************************************************************************
90 * CreateMailslotA [KERNEL32.@]
92 HANDLE WINAPI
CreateMailslotA( LPCSTR lpName
, DWORD nMaxMessageSize
,
93 DWORD lReadTimeout
, LPSECURITY_ATTRIBUTES sa
)
95 FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName
),
96 nMaxMessageSize
, lReadTimeout
, sa
);
101 /******************************************************************************
102 * CreateMailslotW [KERNEL32.@] Creates a mailslot with specified name
105 * lpName [I] Pointer to string for mailslot name
106 * nMaxMessageSize [I] Maximum message size
107 * lReadTimeout [I] Milliseconds before read time-out
108 * sa [I] Pointer to security structure
111 * Success: Handle to mailslot
112 * Failure: INVALID_HANDLE_VALUE
114 HANDLE WINAPI
CreateMailslotW( LPCWSTR lpName
, DWORD nMaxMessageSize
,
115 DWORD lReadTimeout
, LPSECURITY_ATTRIBUTES sa
)
117 FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName
),
118 nMaxMessageSize
, lReadTimeout
, sa
);
123 /******************************************************************************
124 * GetMailslotInfo [KERNEL32.@] Retrieves info about specified mailslot
127 * hMailslot [I] Mailslot handle
128 * lpMaxMessageSize [O] Address of maximum message size
129 * lpNextSize [O] Address of size of next message
130 * lpMessageCount [O] Address of number of messages
131 * lpReadTimeout [O] Address of read time-out
137 BOOL WINAPI
GetMailslotInfo( HANDLE hMailslot
, LPDWORD lpMaxMessageSize
,
138 LPDWORD lpNextSize
, LPDWORD lpMessageCount
,
139 LPDWORD lpReadTimeout
)
141 FIXME("(%p): stub\n",hMailslot
);
142 if (lpMaxMessageSize
) *lpMaxMessageSize
= (DWORD
)NULL
;
143 if (lpNextSize
) *lpNextSize
= (DWORD
)NULL
;
144 if (lpMessageCount
) *lpMessageCount
= (DWORD
)NULL
;
145 if (lpReadTimeout
) *lpReadTimeout
= (DWORD
)NULL
;
150 /******************************************************************************
151 * GetCompressedFileSizeA [KERNEL32.@]
154 * This should call the W function below
156 DWORD WINAPI
GetCompressedFileSizeA(
158 LPDWORD lpFileSizeHigh
)
160 FIXME("(...): stub\n");
165 /******************************************************************************
166 * GetCompressedFileSizeW [KERNEL32.@]
169 * Success: Low-order doubleword of number of bytes
170 * Failure: 0xffffffff
172 DWORD WINAPI
GetCompressedFileSizeW(
173 LPCWSTR lpFileName
, /* [in] Pointer to name of file */
174 LPDWORD lpFileSizeHigh
) /* [out] Receives high-order doubleword of size */
176 FIXME("(%s,%p): stub\n",debugstr_w(lpFileName
),lpFileSizeHigh
);
181 /******************************************************************************
182 * CreateIoCompletionPort (KERNEL32.@)
184 HANDLE WINAPI
CreateIoCompletionPort(HANDLE hFileHandle
,
185 HANDLE hExistingCompletionPort
, DWORD dwCompletionKey
,
186 DWORD dwNumberOfConcurrentThreads
)
188 FIXME("(%p, %p, %08lx, %08lx): stub.\n", hFileHandle
, hExistingCompletionPort
, dwCompletionKey
, dwNumberOfConcurrentThreads
);
192 /******************************************************************************
193 * GetQueuedCompletionStatus (KERNEL32.@)
195 BOOL WINAPI
GetQueuedCompletionStatus(
196 HANDLE CompletionPort
, LPDWORD lpNumberOfBytesTransferred
,
197 LPDWORD lpCompletionKey
, LPOVERLAPPED
*lpOverlapped
, DWORD dwMilliseconds
199 FIXME("(%p,%p,%p,%p,%ld), stub!\n",CompletionPort
,lpNumberOfBytesTransferred
,lpCompletionKey
,lpOverlapped
,dwMilliseconds
);
200 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
204 /******************************************************************************
205 * GetDevicePowerState (KERNEL32.@)
207 BOOL WINAPI
GetDevicePowerState(HANDLE hDevice
, BOOL
* pfOn
)
209 FIXME("(hDevice %p pfOn %p): stub\n", hDevice
, pfOn
);
210 return TRUE
; /* no information */
213 /***********************************************************************
216 BOOL WINAPI
Beep( DWORD dwFreq
, DWORD dwDur
)
218 static const char beep
= '\a';
219 /* dwFreq and dwDur are ignored by Win95 */
220 if (isatty(2)) write( 2, &beep
, 1 );