Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


winapi.dll could not be found

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Wed Apr 15, 2015 10:57 am    Post subject: winapi.dll could not be found Reply with quote

a friend of mine made a script for automated fishing (throwing the lure - waiting for fish - catch - throw again - and so on) and it works perfectly for him. However when I try to use it, I get an error:

Code:
Error:error loading module 'winapi' from file 'C:\Program Files (x86)\Cheat Engine 6.4\winapi.dll':
   Das angegebene Modul wurde nicht gefunden.


(the german roughly translates as "the selected module could not be found")

Although I downloaded the winapi.dll and put it in my CE folder, the error keeps appearing.
He then told me to use the 32bit version of CE (cheatengine-i386.exe) as administrator, but that also didn't help.
The next thing we did was he zipped his entire CE folder and sent it to me so we had the exact same client files (because the structure of our folders looked quite different), but even this didn't solve the problem.

Anyone got an idea how to fix this? Do I have to compile the file by myself?

If it helps, this is the script: http://codepad.org/Z8DqwzRV
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Wed Apr 15, 2015 11:57 am    Post subject: Reply with quote

try extracting his ce folder somewhere else (e. g c:\ce) and post the error message you get then.
_________________
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
View user's profile Send private message MSN Messenger
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Wed Apr 15, 2015 12:05 pm    Post subject: Reply with quote

Dark Byte wrote:
try extracting his ce folder somewhere else (e. g c:\ce) and post the error message you get then.


Code:
Error:error loading module 'winapi' from file 'C:\Cheat Engine 6.4\winapi.dll':
   Das angegebene Modul wurde nicht gefunden.



same error (exept the path of the file ofc)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Wed Apr 15, 2015 12:29 pm    Post subject: Reply with quote

do you have anything lua related installed on your system? Something that overrides the lua paths? Because it should have looked in clibs32
_________________
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
View user's profile Send private message MSN Messenger
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Wed Apr 15, 2015 12:48 pm    Post subject: Reply with quote

Dark Byte wrote:
do you have anything lua related installed on your system? Something that overrides the lua paths? Because it should have looked in clibs32


I didn't but maybe my friend (who sent me his CE client), in my client there isn't even a clibs32 folder
Back to top
View user's profile Send private message
ZacTheSin
I post too much
Reputation: 6

Joined: 09 May 2006
Posts: 2657

PostPosted: Thu Apr 16, 2015 11:33 pm    Post subject: Reply with quote

>friend

No lua installs done other than CE itself.

Perhaps compiling your own winapi.dll using MinGW/gcc?

Source:
https://github.com/stevedonovan/winapi

edited GCC script:

Code:
REM compiling for mingw against msvcrt
# set LUA_DIR=D:\dev\lua\luajit-2.0\src
set LUA_INCLUDE=C:\Users\Acen\Desktop\lua\ce\lua\include #download ce source
set LUA_LIB=C:\Program Files (x86)\Cheat Engine 6.4\lua5.1-32.dll #from normal ce 6.4 install
set CFLAGS=-c -O1 -DPSAPI_VERSION=1  -I"%LUA_INCLUDE%"
C:\MinGW\bin\gcc %CFLAGS% winapi.c
C:\MinGW\bin\gcc %CFLAGS% wutils.c
C:\MinGW\bin\gcc -Wl,-s -shared winapi.o wutils.o "%LUA_LIB%" -lpsapi -lMpr -o winapi.dll
pause


No idea on why it only works on my machine.

Edit: This is the file in question: https://hostr.co/zlXuOtVGbNJB

_________________
If someone helps you, why not Rep them?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Fri Apr 17, 2015 3:20 am    Post subject: Reply with quote

i can't test it here, but that dll is only 55 kb, but if it uses msvcrt that means it's dynamic linking to it insttead of static linking.
so, chris20194 needs to have the visual studio runtime installed(the exact same version) , and perhaps other dll's as well (seeing you used mingw perhaps he needs cygwin as well)

edit:
I looked at the imports

You'll need the following dll's to use this:
msvcrt.dll (must be the same version)
libgcc_s_dw2.dll (this one is gonna be fun to find)
lua5.1-32.dll (should be easy)

try compiling with -static-libgcc -static-libstdc++ and -static-libgcc or add that library to the ce folder

_________________
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
View user's profile Send private message MSN Messenger
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Fri Apr 17, 2015 5:49 am    Post subject: Reply with quote

Dark Byte wrote:
i can't test it here, but that dll is only 55 kb, but if it uses msvcrt that means it's dynamic linking to it insttead of static linking.
so, chris20194 needs to have the visual studio runtime installed(the exact same version) , and perhaps other dll's as well (seeing you used mingw perhaps he needs cygwin as well)

edit:
I looked at the imports

You'll need the following dll's to use this:
msvcrt.dll (must be the same version)
libgcc_s_dw2.dll (this one is gonna be fun to find)
lua5.1-32.dll (should be easy)

try compiling with -static-libgcc -static-libstdc++ and -static-libgcc or add that library to the ce folder


Ok I'm a little confused here, how do I install all these? Isn't it enough if i just use his CE client with all the .DLL in it?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Fri Apr 17, 2015 6:20 am    Post subject: Reply with quote

he needs to compile the dll with the libraries statically linked (the dll will grow to several hundred KB)

or you'll need to find these dll's and put them in the library search path (e.g ce's directory or c:\windows\system32 )

_________________
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
View user's profile Send private message MSN Messenger
ZacTheSin
I post too much
Reputation: 6

Joined: 09 May 2006
Posts: 2657

PostPosted: Fri Apr 17, 2015 9:31 am    Post subject: Reply with quote

Unfortunately, I have no idea what I'm doing with compiling anything.

I've uploaded those dlls (though the libgcc dll is actually named libgcc_s_dw2-1.dll for some reason).

https://hostr.co/7MjcrXe7QojN

_________________
If someone helps you, why not Rep them?
Back to top
View user's profile Send private message
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Fri Apr 17, 2015 9:41 am    Post subject: Reply with quote

ZacTheSin wrote:
Unfortunately, I have no idea what I'm doing with compiling anything.

I've uploaded those dlls (though the libgcc dll is actually named libgcc_s_dw2-1.dll for some reason).

https://hostr.co/7MjcrXe7QojN


I put those in my folder, worked. No more errors.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites