Skip to content

Commit

Permalink
Version 2.7.0. Updating kernelbase to added several path functions. A…
Browse files Browse the repository at this point in the history
…dding crypt32_wrapper, will be renamed to cryptext. Adding NtCanelIoEx
  • Loading branch information
Skulltrail192 committed Jul 19, 2022
1 parent 7a7569f commit df1eca7
Show file tree
Hide file tree
Showing 19 changed files with 6,932 additions and 461 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
@ stub PathAllocCanonicalize
@ stub PathAllocCombine
@ stdcall PathAllocCanonicalize(wstr long ptr) kernelbase.PathAllocCanonicalize
@ stdcall PathAllocCombine(wstr wstr long ptr) kernelbase.PathAllocCombine
@ stdcall PathCchAddBackslash(wstr long) kernelbase.PathCchAddBackslash
@ stdcall PathCchAddBackslashEx(wstr long ptr ptr) kernelbase.PathCchAddBackslashEx
@ stub PathCchAddExtension
@ stub PathCchAppend
@ stub PathCchAppendEx
@ stub PathCchCanonicalize
@ stub PathCchCanonicalizeEx
@ stub PathCchCombine
@ stdcall PathCchAddExtension(wstr long wstr) kernelbase.PathCchAddExtension
@ stdcall PathCchAppend(wstr long wstr) kernelbase.PathCchAppend
@ stdcall PathCchAppendEx(wstr long wstr long) kernelbase.PathCchAppendEx
@ stdcall PathCchCanonicalize(ptr long wstr) kernelbase.PathCchCanonicalize
@ stdcall PathCchCanonicalizeEx(ptr long wstr long) kernelbase.PathCchCanonicalizeEx
@ stdcall PathCchCombine(ptr long ptr ptr) kernelbase.PathCchCombine
@ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx
@ stub PathCchFindExtension
@ stub PathCchIsRoot
@ stub PathCchRemoveBackslash
@ stub PathCchRemoveBackslashEx
@ stub PathCchRemoveExtension
@ stub PathCchRemoveFileSpec
@ stub PathCchRenameExtension
@ stub PathCchSkipRoot
@ stub PathCchStripPrefix
@ stub PathCchStripToRoot
@ stub PathIsUNCEx
@ stdcall PathCchFindExtension(wstr long ptr) kernelbase.PathCchFindExtension
@ stdcall PathCchIsRoot(wstr) kernelbase.PathCchIsRoot
@ stdcall PathCchRemoveBackslash(wstr long) kernelbase.PathCchRemoveBackslash
@ stdcall PathCchRemoveBackslashEx(wstr long ptr ptr) kernelbase.PathCchRemoveBackslashEx
@ stdcall PathCchRemoveExtension(wstr long) kernelbase.PathCchRemoveExtension
@ stdcall PathCchRenameExtension(wstr long wstr) kernelbase.PathCchRenameExtension
@ stdcall PathCchRemoveFileSpec(wstr long) kernelbase.PathCchRemoveFileSpec
@ stdcall PathCchSkipRoot(wstr ptr) kernelbase.PathCchSkipRoot
@ stdcall PathCchStripPrefix(wstr long) kernelbase.PathCchStripPrefix
@ stdcall PathCchStripToRoot(wstr long) kernelbase.PathCchStripToRoot
@ stdcall PathIsUNCEx(wstr ptr) kernelbase.PathIsUNCEx
21 changes: 11 additions & 10 deletions wrappers/base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
add_subdirectory(kernelbase_wrapper)
add_subdirectory(ntext_wrapper)
# add_subdirectory(ntkrnlext)
add_subdirectory(advapi32_wrapper)
add_subdirectory(browseui_wrapper)
add_subdirectory(pdh_wrapper)
add_subdirectory(crypt32_wrapper)
add_subdirectory(gdi32_wrapper)
add_subdirectory(secur32_wrapper)
add_subdirectory(iphlpapi_wrapper)
add_subdirectory(kernelbase_wrapper)
add_subdirectory(netapi32_wrapper)
add_subdirectory(ntext_wrapper)
add_subdirectory(ole32_wrapper)
add_subdirectory(pdh_wrapper)
add_subdirectory(powrprof_wrapper)
add_subdirectory(rpcrt4_wrapper)
add_subdirectory(secur32_wrapper)
add_subdirectory(setupapi_wrapper)
add_subdirectory(shell32_wrapper)
add_subdirectory(shlwapi_wrapper)
add_subdirectory(winsta_wrapper)
add_subdirectory(ole32_wrapper)
add_subdirectory(rpcrt4_wrapper)
add_subdirectory(iphlpapi_wrapper)
add_subdirectory(powrprof_wrapper)
add_subdirectory(ws2_32_wrapper)
add_subdirectory(user32_wrapper)
add_subdirectory(uxtheme_wrapper)
#add_subdirectory(d3d9_wrapper)
# add_subdirectory(d3d9_wrapper)
# add_subdirectory(ntkrnlext)
# add_subdirectory(windowscodecs_wrapper)
# add_subdirectory(umpnpmgr_wrapper)
18 changes: 18 additions & 0 deletions wrappers/base/crypt32_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

spec2def(crypt32_wrapper.dll crypt32_wrapper.spec)

list(APPEND SOURCE
main.c
version.rc
${CMAKE_CURRENT_BINARY_DIR}/crypt32_wrapper_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/crypt32_wrapper.def)

add_library(crypt32_wrapper SHARED ${SOURCE})
set_module_type(crypt32_wrapper win32dll ENTRYPOINT 0)
add_importlibs(crypt32_wrapper pdhbase msvcrt kernel32 ntdll)
target_link_libraries(crypt32_wrapper wine)
add_cd_file(TARGET crypt32_wrapper DESTINATION reactos/system32 FOR all)

spec2def(crypt32_wrapper.dll crypt32_wrapper.spec)


2 changes: 2 additions & 0 deletions wrappers/base/crypt32_wrapper/crypt32_wrapper.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ stdcall CryptRetrieveTimeStamp(wstr long long str ptr ptr long ptr ptr ptr)
@ stdcall CryptVerifyTimeStampSignature(ptr long ptr long ptr ptr ptr ptr)
107 changes: 107 additions & 0 deletions wrappers/base/crypt32_wrapper/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
* Performance Data Helper (pdh.dll)
*
* Copyright 2007 Andrey Turkin
* Copyright 2007 Hans Leidekker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/

#define WIN32_NO_STATUS

#include <stdarg.h>
#include <math.h>

#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include <windef.h>
#include <winbase.h>

//#include "winperf.h"

#include <wine/debug.h>
#include <wine/list.h>
#include <wine/unicode.h>
#include <wincrypt.h>

WINE_DEFAULT_DEBUG_CHANNEL(pdh);

typedef struct _CRYPT_TIMESTAMP_PARA {
LPCSTR pszTSAPolicyId;
BOOL fRequestCerts;
CRYPT_INTEGER_BLOB Nonce;
DWORD cExtension;
PCERT_EXTENSION rgExtension;
} CRYPT_TIMESTAMP_PARA, *PCRYPT_TIMESTAMP_PARA;

typedef struct _CRYPT_TIMESTAMP_ACCURACY {
DWORD dwSeconds;
DWORD dwMillis;
DWORD dwMicros;
} CRYPT_TIMESTAMP_ACCURACY, *PCRYPT_TIMESTAMP_ACCURACY;

typedef struct _CRYPT_TIMESTAMP_INFO {
DWORD dwVersion;
LPSTR pszTSAPolicyId;
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
CRYPT_DER_BLOB HashedMessage;
CRYPT_INTEGER_BLOB SerialNumber;
FILETIME ftTime;
PCRYPT_TIMESTAMP_ACCURACY pvAccuracy;
BOOL fOrdering;
CRYPT_DER_BLOB Nonce;
CRYPT_DER_BLOB Tsa;
DWORD cExtension;
PCERT_EXTENSION rgExtension;
} CRYPT_TIMESTAMP_INFO, *PCRYPT_TIMESTAMP_INFO;

typedef struct _CRYPT_TIMESTAMP_CONTEXT {
DWORD cbEncoded;
BYTE *pbEncoded;
PCRYPT_TIMESTAMP_INFO pTimeStamp;
} CRYPT_TIMESTAMP_CONTEXT, *PCRYPT_TIMESTAMP_CONTEXT;

//Just returning False for stub
BOOL
CryptRetrieveTimeStamp(
LPCWSTR wszUrl,
DWORD dwRetrievalFlags,
DWORD dwTimeout,
LPCSTR pszHashId,
const CRYPT_TIMESTAMP_PARA *pPara,
const BYTE *pbData,
DWORD cbData,
PCRYPT_TIMESTAMP_CONTEXT *ppTsContext,
PCCERT_CONTEXT *ppTsSigner,
HCERTSTORE *phStore
)
{
return FALSE;
}

BOOL
CryptVerifyTimeStampSignature(
const BYTE *pbTSContentInfo,
DWORD cbTSContentInfo,
const BYTE *pbData,
DWORD cbData,
HCERTSTORE hAdditionalStore,
PCRYPT_TIMESTAMP_CONTEXT *ppTsContext,
PCCERT_CONTEXT *ppTsSigner,
HCERTSTORE *phStore
)
{
return FALSE;
}
25 changes: 25 additions & 0 deletions wrappers/base/crypt32_wrapper/version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2011 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/

#include <windef.h>

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_FILEDESCRIPTION_STR "Windows Performance Data Helper Wrapper for One-Core-API"
#define WINE_FILENAME_STR "pdh.dll"

#include "common_wrappers_ver.rc"
1 change: 1 addition & 0 deletions wrappers/base/kernelbase_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ list(APPEND SOURCE
nls.c
numa.c
number.c
path.c
pathmisc.c
perf.c
powrmgmt.c
Expand Down
17 changes: 12 additions & 5 deletions wrappers/base/kernelbase_wrapper/kernelbase.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1404,21 +1404,28 @@
@ stdcall InitializeSynchronizationBarrier(ptr long long)
@ stdcall IsValidNLSVersion(long wstr ptr)
@ stdcall LoadPackagedLibrary(wstr long)
@ stdcall PathAllocCanonicalize(wstr long ptr)
@ stdcall PathAllocCombine(wstr wstr long ptr)
@ stdcall PathCchAddBackslash(wstr long)
@ stdcall PathCchAddBackslashEx(wstr long ptr ptr)
@ stdcall PathCchAddExtension(wstr long wstr)
@ stdcall PathCchFindExtension(wstr long ptr)
@ stdcall PathCchAppend(wstr long wstr)
@ stdcall PathCchAppendEx(wstr long wstr long)
@ stub PathCchCanonicalize
@ stub PathCchCanonicalizeEx
@ stdcall PathCchCanonicalize(ptr long wstr)
@ stdcall PathCchCanonicalizeEx(ptr long wstr long)
@ stdcall PathCchCombine(ptr long ptr ptr)
@ stdcall PathCchCombineEx(ptr long ptr ptr long)
@ stdcall PathCchFindExtension(wstr long ptr)
@ stdcall PathCchIsRoot(wstr)
@ stdcall PathCchRemoveBackslash(wstr long)
@ stdcall PathCchRemoveBackslashEx(wstr long ptr ptr)
@ stdcall PathCchRenameExtension(wstr long wstr)
@ stdcall PathCchRemoveExtension(wstr long)
# @ stub PathIsUNCEx
@ stdcall PathCchRenameExtension(wstr long wstr)
@ stdcall PathCchRemoveFileSpec(wstr long)
@ stdcall PathCchSkipRoot(wstr ptr)
@ stdcall PathCchStripPrefix(wstr long)
@ stdcall PathCchStripToRoot(wstr long)
@ stdcall PathIsUNCEx(wstr ptr)
@ stdcall RemoveDllDirectory(ptr)
@ stdcall SetDefaultDllDirectories(long)
@ stdcall SetProcessMitigationPolicy(long ptr long)
Expand Down
20 changes: 19 additions & 1 deletion wrappers/base/kernelbase_wrapper/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -1637,4 +1637,22 @@ SetHKCRValue(
_In_ DWORD Reserved,
_In_ DWORD Type,
_In_ CONST BYTE* Data,
_In_ DWORD DataSize);
_In_ DWORD DataSize);

INT
WINAPI
CompareStringOrdinal(
const WCHAR *str1,
INT len1,
const WCHAR *str2,
INT len2,
BOOL ignore_case
);

HRESULT
WINAPI
PathMatchSpecExW(
const WCHAR *path,
const WCHAR *mask,
DWORD flags
);
Loading

0 comments on commit df1eca7

Please sign in to comment.