3 * KERNEL32.DLL stubs (unimplemented functions)
4 * Remove from this file, if you implement them.
11 IsProcessorFeaturePresent( DWORD ProcessorFeature )
13 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
20 BaseAttachCompleteThunk (VOID)
22 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
33 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
49 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
65 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
72 ConvertDefaultLocale (
76 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
89 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
97 CALINFO_ENUMPROC lpCalInfoEnumProc,
103 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
112 CALINFO_ENUMPROC lpCalInfoEnumProc,
118 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
126 DATEFMT_ENUMPROC lpDateFmtEnumProc,
131 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
139 DATEFMT_ENUMPROC lpDateFmtEnumProc,
144 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
153 EnumSystemCodePagesW (
154 CODEPAGE_ENUMPROC lpCodePageEnumProc,
158 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
165 EnumSystemCodePagesA (
166 CODEPAGE_ENUMPROC lpCodePageEnumProc,
170 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
178 LOCALE_ENUMPROC lpLocaleEnumProc,
182 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
190 LOCALE_ENUMPROC lpLocaleEnumProc,
194 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
202 TIMEFMT_ENUMPROC lpTimeFmtEnumProc,
207 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
215 TIMEFMT_ENUMPROC lpTimeFmtEnumProc,
220 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
237 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
246 ExtendVirtualBuffer (
251 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
266 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
281 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
298 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
315 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
323 HANDLE hVirtualBuffer
326 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
335 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
342 LPCWSTR lpApplicationName,
346 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
354 LPCSTR lpApplicationName,
358 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
370 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
384 WCHAR Name [MAX_COMPUTERNAME_LENGTH + 1];
388 * FIXME: get the computer's name from
391 lstrcpyW( Name, L"ROSHost" ); /* <-- FIXME -- */
392 Size = lstrlenW(Name) + 1;
396 SetLastError(ERROR_BUFFER_OVERFLOW);
399 lstrcpyW( lpBuffer, Name );
411 WCHAR Name [MAX_COMPUTERNAME_LENGTH + 1];
414 if (FALSE == GetComputerNameW(
422 /* Use UNICODE to ANSI */
423 for ( i=0; Name[i]; ++i )
425 lpBuffer[i] = (CHAR) Name[i];
441 CONST CURRENCYFMT * lpFormat,
442 LPWSTR lpCurrencyStr,
446 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
457 CONST CURRENCYFMT * lpFormat,
462 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
475 CONST SYSTEMTIME * lpDate,
481 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
491 CONST SYSTEMTIME * lpDate,
497 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
511 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
525 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
536 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
547 CONST NUMBERFMT * lpFormat,
552 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
563 CONST NUMBERFMT * lpFormat,
568 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
577 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
578 return 437; /* FIXME: call csrss.exe */
592 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
607 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
621 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
636 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
643 GetSystemDefaultLCID (VOID)
646 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
656 GetSystemDefaultLangID (VOID)
659 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
669 GetSystemPowerStatus (
673 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
680 GetThreadLocale (VOID)
683 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
692 GetThreadPriorityBoost (
695 LPLDT_ENTRY lpSelectorEntry
698 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
704 GetThreadSelectorEntry (
707 LPLDT_ENTRY lpSelectorEntry
710 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
720 CONST SYSTEMTIME * lpTime,
726 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
736 CONST SYSTEMTIME * lpTime,
742 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
749 GetUserDefaultLCID (VOID)
752 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
762 GetUserDefaultLangID (VOID)
765 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
775 GetVDMCurrentDirectories (
780 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
791 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
803 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
808 /**********************************************************************
813 * TRUE if CodePage is installed in the system.
833 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
845 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
861 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
877 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
886 LPVOID lpParameterBlock
889 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
894 /***********************************************************************
895 * MulDiv (KERNEL32.@)
897 * Result of multiplication and division
898 * -1: Overflow occurred or Divisor was 0
901 //FIXME! move to correct file
907 #if SIZEOF_LONG_LONG >= 8
910 if (!nDivisor) return -1;
912 /* We want to deal with a positive divisor to simplify the logic. */
915 nMultiplicand = - nMultiplicand;
916 nDivisor = -nDivisor;
919 /* If the result is positive, we "add" to round. else, we subtract to round. */
920 if ( ( (nMultiplicand < 0) && (nMultiplier < 0) ) ||
921 ( (nMultiplicand >= 0) && (nMultiplier >= 0) ) )
922 ret = (((long long)nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor;
924 ret = (((long long)nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor;
926 if ((ret > 2147483647) || (ret < -2147483647)) return -1;
929 if (!nDivisor) return -1;
931 /* We want to deal with a positive divisor to simplify the logic. */
934 nMultiplicand = - nMultiplicand;
935 nDivisor = -nDivisor;
938 /* If the result is positive, we "add" to round. else, we subtract to round. */
939 if ( ( (nMultiplicand < 0) && (nMultiplier < 0) ) ||
940 ( (nMultiplicand >= 0) && (nMultiplier >= 0) ) )
941 return ((nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor;
943 return ((nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor;
949 /**********************************************************************
951 * MultiByteToWideChar@24
955 * CP_ACP ANSI code page
956 * CP_MACCP Macintosh code page
957 * CP_OEMCP OEM code page
958 * (UINT) Any installed code page
963 * MB_ERR_INVALID_CHARS
970 * Size of MultiByteStr, or -1 if MultiByteStr is
977 * Size (in WCHAR unit) of WideCharStr, or 0
978 * if the caller just wants to know how large
979 * WideCharStr should be for a successful
983 * 0 on error; otherwise the number of WCHAR written
984 * in the WideCharStr buffer.
987 * A raw converter for now. It assumes lpMultiByteStr is
988 * NEVER multi-byte (that is each input character is
989 * 8-bit ASCII) and is ALWAYS NULL terminated.
990 * FIXME-FIXME-FIXME-FIXME
994 MultiByteToWideChar (
997 LPCSTR lpMultiByteStr,
999 LPWSTR lpWideCharStr,
1003 int InStringLength = 0;
1009 * Check the parameters.
1011 if ( /* --- CODE PAGE --- */
1012 ( (CP_ACP != CodePage)
1013 && (CP_MACCP != CodePage)
1014 && (CP_OEMCP != CodePage)
1015 && (FALSE == IsInstalledCP (CodePage))
1018 || (dwFlags & ~(MB_PRECOMPOSED
1020 | MB_ERR_INVALID_CHARS
1024 /* --- INPUT BUFFER --- */
1025 || (NULL == lpMultiByteStr)
1028 SetLastError (ERROR_INVALID_PARAMETER);
1032 * Compute the input buffer length.
1034 if (-1 == cchMultiByte)
1036 InStringLength = lstrlen (lpMultiByteStr) + 1;
1040 InStringLength = cchMultiByte;
1043 * Does caller query for output
1046 if (0 == cchWideChar)
1048 SetLastError (ERROR_SUCCESS);
1049 return InStringLength;
1052 * Is space provided for the translated
1055 if (cchWideChar < InStringLength)
1057 SetLastError (ERROR_INSUFFICIENT_BUFFER);
1061 * Raw 8- to 16-bit conversion.
1063 for ( cchConverted = 0,
1064 r = (PCHAR) lpMultiByteStr,
1065 w = (PWCHAR) lpWideCharStr;
1067 cchConverted < InStringLength;
1077 * Return how many characters we
1078 * wrote in the output buffer.
1080 SetLastError (ERROR_SUCCESS);
1081 return cchConverted;
1087 QueryPerformanceCounter (
1088 LARGE_INTEGER * lpPerformanceCount
1091 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1098 QueryPerformanceFrequency (
1099 LARGE_INTEGER * lpFrequency
1102 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1109 RegisterConsoleVDM (
1123 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1130 RegisterWowBaseHandlers (
1134 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1145 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1153 LPCSTR lpComputerName
1156 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1164 LPCWSTR lpComputerName
1167 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1180 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1193 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1200 SetSystemPowerState (
1205 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1211 SetThreadIdealProcessor(VOID)
1213 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1223 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1229 SetThreadPriorityBoost(VOID)
1231 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1237 SetVDMCurrentDirectories (
1242 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1253 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1260 VDMConsoleOperation (
1265 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1272 VDMOperationStarted (
1276 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1289 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1302 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1309 VirtualBufferExceptionHandler (
1315 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1320 /**********************************************************************
1322 * MultiByteToWideChar@32
1324 * Not yet implemented complete (without NLS so far)
1328 * CP_ACP ANSI code page
1329 * CP_MACCP Macintosh code page
1330 * CP_OEMCP OEM code page
1331 * CP_SYMBOL Symbol code page (42)
1332 * CP_THREAD_ACP Current thread's ANSI code page
1333 * CP_UTF7 Translate using UTF-7
1334 * CP_UTF8 Translate using UTF-8
1335 * (UINT) Any installed code page
1338 * WC_NO_BEST_FIT_CHARS
1339 * WC_COMPOSITECHECK Convert composite characters to precomposed characters.
1340 * WC_DISCARDNS Discard nonspacing characters during conversion.
1341 * WC_SEPCHARS Generate separate characters during conversion. This is the default conversion behavior.
1342 * WC_DEFAULTCHAR Replace exceptions with the default character during conversion.
1345 * Points to the wide-character string to be converted.
1348 * Size (in WCHAR unit) of WideCharStr, or 0
1349 * if the caller just wants to know how large
1350 * WideCharStr should be for a successful
1353 * Points to the buffer to receive the translated string.
1355 * Specifies the size in bytes of the buffer pointed to by the
1356 * lpMultiByteStr parameter. If this value is zero, the function
1357 * returns the number of bytes required for the buffer.
1359 * Points to the character used if a wide character cannot be
1360 * represented in the specified code page. If this parameter is
1361 * NULL, a system default value is used.
1364 * Points to a flag that indicates whether a default character was used.
1365 * This parameter may be NULL.
1366 FIXME: allways set to FALSE.
1371 * 0 on error; otherwise the number of bytes written
1372 * in the lpMultiByteStr buffer. Or the number of
1373 * bytes needed for the lpMultiByteStr buffer if cchMultiByte is zero.
1376 * A raw converter for now. It just cuts off the upper 9 Bit.
1377 * So the MBCS-string does not contain any LeadCharacters
1378 * FIXME - FIXME - FIXME - FIXME
1383 WideCharToMultiByte (
1386 LPCWSTR lpWideCharStr,
1388 LPSTR lpMultiByteStr,
1390 LPCSTR lpDefaultChar,
1391 LPBOOL lpUsedDefaultChar
1394 int wi, di; // wide counter, dbcs byte count
1397 * Check the parameters.
1399 if ( /* --- CODE PAGE --- */
1400 ( (CP_ACP != CodePage)
1401 && (CP_MACCP != CodePage)
1402 && (CP_OEMCP != CodePage)
1403 && (CP_SYMBOL != CodePage)
1404 && (CP_THREAD_ACP != CodePage)
1405 && (CP_UTF7 != CodePage)
1406 && (CP_UTF8 != CodePage)
1407 && (FALSE == IsInstalledCP (CodePage))
1410 || (dwFlags & ~(/*WC_NO_BEST_FIT_CHARS
1411 |*/ WC_COMPOSITECHECK
1417 /* --- INPUT BUFFER --- */
1418 || (NULL == lpWideCharStr)
1421 SetLastError(ERROR_INVALID_PARAMETER);
1425 // for now, make no difference but only convert cut the characters to 7Bit
1426 if( cchWideChar == -1 ) // assume its a 0-terminated str
1427 { // and determine its length
1428 for( cchWideChar=0; lpWideCharStr[cchWideChar]!=0; cchWideChar++)
1432 // user wants to determine needed space
1433 if( cchMultiByte == 0 )
1435 SetLastError(ERROR_SUCCESS);
1436 return cchWideChar; // FIXME: determine correct.
1438 // the lpWideCharStr is cchWideChar characters long.
1439 for( wi=0, di=0; wi<cchWideChar && di<cchMultiByte; ++wi, ++di)
1441 // Flag and a not displayable char FIXME
1442 /*if( (dwFlags&WC_NO_BEST_FIT_CHARS) && (lpWideCharStr[wi] >127) )
1445 *lpUsedDefaultChar = TRUE;
1449 // just cut off the upper 9 Bit, since vals>=128 mean LeadByte.
1450 lpMultiByteStr[di] = lpWideCharStr[wi] & 0x007F;
1452 // has MultiByte exceeded but Wide is still in the string?
1453 if( wi < cchWideChar && di >= cchMultiByte)
1455 SetLastError(ERROR_INSUFFICIENT_BUFFER);
1458 // else return # of bytes wirtten to MBCSbuffer (di)
1459 SetLastError(ERROR_SUCCESS);
1460 // FIXME: move that elsewhere
1461 if( lpUsedDefaultChar!=NULL ) *lpUsedDefaultChar=FALSE;