Skip to content

Commit

Permalink
Started update of dwrite, update gdi32, iphlpapi, kernelbase, ntext, …
Browse files Browse the repository at this point in the history
…powrprof, shell32 and user32.
  • Loading branch information
shorthorn-project committed Dec 6, 2023
1 parent 2e3c0b4 commit be10123
Show file tree
Hide file tree
Showing 26 changed files with 495 additions and 1,326 deletions.
4 changes: 2 additions & 2 deletions wrappers/base/comdlg32_wrapper/itemdlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2460,8 +2460,8 @@ static HRESULT create_dialog(FileDialogImpl *This, HWND parent)
ERR("Failed to show dialog (LastError: %ld)\n", GetLastError());
return E_FAIL;
}else{
//IShellItem *shellItem;
SHCreateItemFromParsingName(ofn.lpstrFile,NULL,&IID_IShellItem, &This->psia_result);
IShellItem *shellItem;
SHCreateItemFromParsingName(ofn.lpstrFile,NULL,&IID_IShellItem, IID_PPV_ARGS(&shellItem));
// SHCreateShellItemArrayFromShellItem(&shellItem,&IID_IShellItemArray, (void**)&This->psia_results);
}

Expand Down
2 changes: 1 addition & 1 deletion wrappers/base/gdi32_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/3rdparty/freetype/include/free
spec2def(gdi32_wrapper.dll gdi32_wrapper.spec)

if(ARCH STREQUAL "amd64")
set(baseaddress_gdi32_wrapper 0x7c3e0000)
set(baseaddress_gdi32_wrapper 0x7FC90000)
elseif(ARCH STREQUAL "i386")
set(baseaddress_gdi32_wrapper 0x7c4c0000)
endif()
Expand Down
39 changes: 39 additions & 0 deletions wrappers/base/gdi32_wrapper/d3dkmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@

#define D3DKMT_MAX_ADAPTER_NAME_LENGTH 32

typedef struct _D3DKMT_CHECKSHAREDRESOURCEACCESS {
D3DKMT_HANDLE hResource;
UINT ClientPid;
} D3DKMT_CHECKSHAREDRESOURCEACCESS;

/*Hack, i don't know how require these funcions really*/
DWORD
APIENTRY
Expand Down Expand Up @@ -654,4 +659,38 @@ D3DKMTQueryVideoMemoryInfo(
}

return Ret;
}

NTSTATUS
WINAPI
D3DKMTCheckSharedResourceAccess(
const D3DKMT_CHECKSHAREDRESOURCEACCESS *unnamedParam1
)
{
if(unnamedParam1->ClientPid == GetCurrentProcessId())
return STATUS_SUCCESS;
else
return STATUS_INVALID_PARAMETER;
}

BOOL
WINAPI
NtGdiBeginGdiRendering(
HBITMAP hbm,
BOOL bDiscard
)
{
return TRUE;
}

BOOL
WINAPI
NtGdiEndGdiRendering(
HBITMAP hbm,
BOOL bDiscard,
BOOL* pbDeviceRemoved
)
{
*pbDeviceRemoved = TRUE;
return TRUE;
}
4 changes: 4 additions & 0 deletions wrappers/base/gdi32_wrapper/gdi32_wrapper.spec
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@

#Vista functions
@ stdcall D3DKMTCheckMonitorPowerState(ptr)
@ stdcall D3DKMTCheckSharedResourceAccess(ptr)
@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr)
#@ stdcall D3DKMTCloseAdapter(ptr)
@ stdcall D3DKMTCreateDCFromMemory(ptr) gdibase.D3DKMTCreateDCFromMemory
Expand Down Expand Up @@ -679,6 +680,9 @@
@ stdcall D3DKMTWaitForVerticalBlankEvent(ptr) d3dkmt.D3DKMTWaitForVerticalBlankEvent

#Win7 functions
@ stdcall BeginGdiRendering(long long) NtGdiBeginGdiRendering
@ stdcall EndGdiRendering(long long ptr) NtGdiEndGdiRendering
@ stdcall CreateBitmapFromDxSurface(long long long long ptr) gdibase.CreateBitmapFromDxSurface
@ stdcall GetFontFileData(long long int64 ptr long)
@ stdcall GetFontFileInfo(long long ptr long long)
@ stdcall GetFontRealizationInfo(long ptr)
Expand Down
8 changes: 6 additions & 2 deletions wrappers/base/iphlpapi_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ list(APPEND SOURCE
${CMAKE_CURRENT_BINARY_DIR}/iphlpapi_wrapper_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/iphlpapi_wrapper.def)

set(baseaddress_iphlpapi_wrapper 0x7c3e0000)

if(ARCH STREQUAL "amd64")
set(baseaddress_iphlpapi_wrapper 0x76CF0000)
elseif(ARCH STREQUAL "i386")
set(baseaddress_iphlpapi_wrapper 0x7c3e0000)
endif()

add_library(iphlpapi_wrapper SHARED ${SOURCE})
set_module_type(iphlpapi_wrapper win32dll)
target_link_libraries(iphlpapi_wrapper wine tdilib)
Expand Down
Loading

0 comments on commit be10123

Please sign in to comment.