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 


[Help] compiling dll
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun Apr 27, 2008 10:18 am    Post subject: [Help] compiling dll Reply with quote

Hi.
i'm trying to compile a DLL File
that i'll be able to import the functions inside it.
like PMX.dll and other files ..
what i did is open Win32 project (DLL of course) and wrote the function i wanted in it.
and then in my application i imported it and i got this error message that says "no entry point found for ... " Confused
is there a special way to do it or something ?
oh btw i forgot to mention the language is C++

_________________
Stylo
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Apr 27, 2008 10:27 am    Post subject: Reply with quote

did you make the function a

__declspec(dllexport)

and did u include a .def file including

EXPORTS
FunctionName

etc.

_________________
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun Apr 27, 2008 10:54 am    Post subject: Reply with quote

oh so i'll change the function to __declspec(dllexport)
but what is the thing about the .def including ? what's that file ?

_________________
Stylo
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Apr 27, 2008 11:15 am    Post subject: Reply with quote

before the function type you put __declspec(dllexport)
for example:

__declspec(dllexport) void Function(void)
{
//...
}

The file is called a "Module-Definition File (.def)"
it'l be in the code section.

it allows you to define the Library name, exports, etc.

_________________
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun Apr 27, 2008 12:01 pm    Post subject: Reply with quote

i cant find the module definition file. Confused
i have problem to modify this file please help some1 :S
where is it locate i'v been searching it for hours :O

_________________
Stylo
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Apr 27, 2008 2:30 pm    Post subject: Reply with quote

What IDE / compiler are you using?
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun Apr 27, 2008 9:13 pm    Post subject: Reply with quote

visual studio 2008
_________________
Stylo
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Mon Apr 28, 2008 12:25 am    Post subject: Reply with quote

file>new file>.def file>add to project, or something like that,i think
_________________
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Apr 28, 2008 12:32 am    Post subject: Reply with quote

that's the files i can add to my project (view attachment)
as you can see no .def Crying or Very sad



untitled.JPG
 Description:
 Filesize:  32.98 KB
 Viewed:  4736 Time(s)

untitled.JPG



_________________
Stylo
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Apr 28, 2008 5:38 am    Post subject: Reply with quote

Just create a notepad and change the extension to .def... then add existing item.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Apr 28, 2008 5:46 am    Post subject: Reply with quote

Symbol wrote:
Just create a notepad and change the extension to .def... then add existing item.

ok i created .def file through the notepad and it looks like that:
Code:

EXPORTS
addNums(int x, int y);


is that good?

_________________
Stylo
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Apr 28, 2008 5:55 am    Post subject: Reply with quote

There's 2 method i know.

.h file

.def file
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Apr 28, 2008 6:00 am    Post subject: Reply with quote

1qaz wrote:
Symbol wrote:
Just create a notepad and change the extension to .def... then add existing item.

ok i created .def file through the notepad and it looks like that:
Code:

EXPORTS
addNums(int x, int y);


is that good?


just addNums no parameters.

_________________
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Apr 28, 2008 6:08 am    Post subject: Reply with quote

lurc wrote:
1qaz wrote:
Symbol wrote:
Just create a notepad and change the extension to .def... then add existing item.

ok i created .def file through the notepad and it looks like that:
Code:

EXPORTS
addNums(int x, int y);


is that good?


just addNums no parameters.

can you upload an example for doing this because i put the function name without the parameters and still errors and other stuff..
i think the best is that i'll see the whole code

_________________
Stylo
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Apr 28, 2008 6:13 am    Post subject: Reply with quote

make a .def file and insert:

Code:
LIBRARY <DLL NAME>
EXPORTS
<FUNCTION YOU WISH TO EXPORT>


then, include it in the resource folder (at MSVC++ 2k8)

rebuild sulotion in Release mode
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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