2 * Win32 miscellaneous functions
4 * Copyright 1995 Thomas Sandford (tdgsandf@prds-grn.demon.co.uk)
7 /* Misc. new functions - they should be moved into appropriate files
16 #include "debugtools.h"
18 DEFAULT_DEBUG_CHANNEL(win32
);
19 DECLARE_DEBUG_CHANNEL(debug
);
22 /****************************************************************************
23 * QueryPerformanceCounter (KERNEL32.564)
25 BOOL WINAPI
QueryPerformanceCounter(PLARGE_INTEGER counter
)
29 gettimeofday(&tv
,NULL
);
30 counter
->s
.LowPart
= tv
.tv_usec
+tv
.tv_sec
*1000000;
31 counter
->s
.HighPart
= 0;
35 /****************************************************************************
36 * QueryPerformanceFrequency (KERNEL32.565)
38 BOOL WINAPI
QueryPerformanceFrequency(PLARGE_INTEGER frequency
)
40 frequency
->s
.LowPart
= 1000000;
41 frequency
->s
.HighPart
= 0;
45 /****************************************************************************
46 * FlushInstructionCache (KERNEL32.261)
48 BOOL WINAPI
FlushInstructionCache(DWORD x
,DWORD y
,DWORD z
) {
49 FIXME_(debug
)("(0x%08lx,0x%08lx,0x%08lx): stub\n",x
,y
,z
);
53 /***********************************************************************
54 * GetSystemPowerStatus (KERNEL32.621)
56 BOOL WINAPI
GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr
)
58 return FALSE
; /* no power management support */
62 /***********************************************************************
63 * SetSystemPowerState (KERNEL32.630)
65 BOOL WINAPI
SetSystemPowerState(BOOL suspend_or_hibernate
,
68 /* suspend_or_hibernate flag: w95 does not support
69 this feature anyway */
84 /******************************************************************************
85 * CreateMailslotA [KERNEL32.164]
87 HANDLE WINAPI
CreateMailslotA( LPCSTR lpName
, DWORD nMaxMessageSize
,
88 DWORD lReadTimeout
, LPSECURITY_ATTRIBUTES sa
)
90 FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName
),
91 nMaxMessageSize
, lReadTimeout
, sa
);
96 /******************************************************************************
97 * CreateMailslotW [KERNEL32.165] Creates a mailslot with specified name
100 * lpName [I] Pointer to string for mailslot name
101 * nMaxMessageSize [I] Maximum message size
102 * lReadTimeout [I] Milliseconds before read time-out
103 * sa [I] Pointer to security structure
106 * Success: Handle to mailslot
107 * Failure: INVALID_HANDLE_VALUE
109 HANDLE WINAPI
CreateMailslotW( LPCWSTR lpName
, DWORD nMaxMessageSize
,
110 DWORD lReadTimeout
, LPSECURITY_ATTRIBUTES sa
)
112 FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName
),
113 nMaxMessageSize
, lReadTimeout
, sa
);
118 /******************************************************************************
119 * GetMailslotInfo [KERNEL32.347] Retrieves info about specified mailslot
122 * hMailslot [I] Mailslot handle
123 * lpMaxMessageSize [O] Address of maximum message size
124 * lpNextSize [O] Address of size of next message
125 * lpMessageCount [O] Address of number of messages
126 * lpReadTimeout [O] Address of read time-out
132 BOOL WINAPI
GetMailslotInfo( HANDLE hMailslot
, LPDWORD lpMaxMessageSize
,
133 LPDWORD lpNextSize
, LPDWORD lpMessageCount
,
134 LPDWORD lpReadTimeout
)
136 FIXME("(%04x): stub\n",hMailslot
);
137 if (lpMaxMessageSize
) *lpMaxMessageSize
= (DWORD
)NULL
;
138 if (lpNextSize
) *lpNextSize
= (DWORD
)NULL
;
139 if (lpMessageCount
) *lpMessageCount
= (DWORD
)NULL
;
140 if (lpReadTimeout
) *lpReadTimeout
= (DWORD
)NULL
;
145 /******************************************************************************
146 * GetCompressedFileSizeA [KERNEL32.291]
149 * This should call the W function below
151 DWORD WINAPI
GetCompressedFileSizeA(
153 LPDWORD lpFileSizeHigh
)
155 FIXME("(...): stub\n");
160 /******************************************************************************
161 * GetCompressedFileSizeW [KERNEL32.292]
164 * Success: Low-order doubleword of number of bytes
165 * Failure: 0xffffffff
167 DWORD WINAPI
GetCompressedFileSizeW(
168 LPCWSTR lpFileName
, /* [in] Pointer to name of file */
169 LPDWORD lpFileSizeHigh
) /* [out] Receives high-order doubleword of size */
171 FIXME("(%s,%p): stub\n",debugstr_w(lpFileName
),lpFileSizeHigh
);
176 /******************************************************************************
177 * SetComputerNameA [KERNEL32.621]
179 BOOL WINAPI
SetComputerNameA( LPCSTR lpComputerName
)
181 LPWSTR lpComputerNameW
= HEAP_strdupAtoW(GetProcessHeap(),0,lpComputerName
);
182 BOOL ret
= SetComputerNameW(lpComputerNameW
);
183 HeapFree(GetProcessHeap(),0,lpComputerNameW
);
188 /******************************************************************************
189 * SetComputerNameW [KERNEL32.622]
192 * lpComputerName [I] Address of new computer name
196 BOOL WINAPI
SetComputerNameW( LPCWSTR lpComputerName
)
198 FIXME("(%s): stub\n", debugstr_w(lpComputerName
));
202 /******************************************************************************
205 BOOL WINAPI
EnumPortsA(LPSTR name
,DWORD level
,LPBYTE ports
,DWORD bufsize
,LPDWORD bufneeded
,LPDWORD bufreturned
) {
206 FIXME("(%s,%ld,%p,%ld,%p,%p), stub!\n",name
,level
,ports
,bufsize
,bufneeded
,bufreturned
);
210 /******************************************************************************
211 * CreateIoCompletionPort
213 HANDLE WINAPI
CreateIoCompletionPort(HANDLE hFileHandle
,
214 HANDLE hExistingCompletionPort
, DWORD dwCompletionKey
,
215 DWORD dwNumberOfConcurrentThreads
)
217 FIXME("(%04x, %04x, %08lx, %08lx): stub.\n", hFileHandle
, hExistingCompletionPort
, dwCompletionKey
, dwNumberOfConcurrentThreads
);