 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Sun Jan 15, 2023 9:56 pm Post subject: Lua Script (Win API) Not Work After Windows Upadate |
|
|
1. According to MS I knew DWM has suspended since Windows 8.
Anyhow, before my Windows update to Windows 10 64 Bit, I tried using DWM function and work just fine. Now, on CE 7.4 64 bit, on my Windows 10 64 bir, I got this error :
| Code: | | Error:Failure determining what dwmapi.DwmEnableComposition means |
How this happen and how to fix it?.
2. I tried using undocumented function 'SetWindowCompositionAttribute' to make form blur like like on Windows 7, since the function DWM API Blur behind window, can not use.
| Code: | if f then f.destroy() end
f = createForm()
f.Position = poScreenCenter
f.BorderStyle = bsNone
f.setSize(600, 400)
f.Color = 0xEDA200
f.OnMouseDown = function() f.dragNow() end
function SetWindowCompositionAttribute(hwnd, data)
return executeCodeLocalEx("user32.SetWindowCompositionAttribute", hwnd, data)
end
--WindowsCompostionAttributeData = {Attribute = 0, Pdata = 0, SizeOfData = 0}
ACCENT_DISABLED = 0
ACCENT_ENABLE_GRADIENT = 1
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2
ACCENT_ENABLE_BLURBEHIND = 3
ACCENT_INVALID_STATE = 4
WCA_ACCENT_POLICY = 19
accent = createMemoryStream()
accent.writeDword(ACCENT_ENABLE_BLURBEHIND)
dt = [[
data = WindowsCompostionAttributeData
data.Attribute = WCA_ACCENT_POLICY
data.SizeOfData = accent.Size
data.Pdata = readPointer(accent.Memory)
]]
data = createMemoryStream()
data.writeDword(19)
data.writeDword(accent.Size) -- Marshal Size Of accent
data.writeDword(readPointerLocal(accent)) -- VarPtr(accent)
SetWindowCompositionAttribute(f.Handle, data.Memory)
f.Show() |
But unlucky the script doesn't work.
How to write the script correctly in CE Lua?. In case this function SetWindowCompositionAttribute jut work fine when I am use C++ or Delphi. Any solutions? _________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25828 Location: The netherlands
|
Posted: Mon Jan 16, 2023 2:34 am Post subject: |
|
|
maybe it has been renamed and microsoft just added a compatibility rename
check enumerate dll's and symbols and see if you can find it.
or see where it goes to when debugging in c++ or Delphi _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
.lua Expert Cheater
Reputation: 1
Joined: 13 Sep 2018 Posts: 203
|
Posted: Wed Jan 18, 2023 11:15 am Post subject: |
|
|
| The alias has not been modified and still exists |
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Thu Jan 19, 2023 1:55 am Post subject: |
|
|
Yes, I know that dwmapi.dll still there on system32 or SysWOW64.
Anyhow, when using CE 7.4 Bit on Windows 10 64 bit, when try to load a function i.e : "DwmExtendFrameItoClientAre" or others functions won by dwmapi.dll, CE 7.4 return error "Error:Failure determining what....function name".
That just work find when I try on my other machine, Windows 7 Ultimate 64 bit + CE 7.4 64 bit.
The screenshot arttach using Windows 10 64 Bit, shown the dwmapi function still there.
P.S : and CE 7.4 doen't have function "createLib", except add a plug-in and I don;t have that plug-in. _________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25828 Location: The netherlands
|
Posted: Thu Jan 19, 2023 3:56 am Post subject: |
|
|
load the dll into cheat engine explicitly and then do a reinitializeSelfSymbolhandler() _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Thu Jan 19, 2023 7:03 am Post subject: |
|
|
Like this?. If yes then thanks DB.
| Code: | dwmExtend = assert( package.loadlib( "C:\\Windows\\system32\\dwmapi.dll", "DwmExtendFrameIntoClientArea" ) )
reinitializeSelfSymbolhandler(dwmExtend)
-- result : Loaded
|
Another test :
Test 1 :
| Code: | sm = assert( package.loadlib( "C:\\Windows\\system32\\user32.dll", "MessageBoxA" ) )
reinitializeSelfSymbolhandler(sm)
MB_OK = 0
MB_ICONERROR = 16
sm(0, "An error has occurred!", "Title!", MB_OK)()
-- result : ERROR. Acces Violation |
Test 2 :
| Code: | function mbox(hWnd, lpText, lpCaption, uType)
return executeCodeLocalEx("user32.MessageBoxA", hWnd, lpText, lpCaption, uType)
end
mbox(0, "An error has occurred!", "Title!", MB_ICONERROR or MB_OK)
-- Result as attached image
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|