Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Anyway of calling a user function from a dll

Author
Message
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 25th Dec 2005 04:44
I am making a dll and one idea i have thought of are hooks but inorder for them to be anygood i would need a way of calling a user function but as far as i know there is no way

so is there a way

I didnt fail, I just found 10,000 ways that don't work
-Thomas Edison
Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 25th Dec 2005 09:09
My DarkScript plugin made this possible. About 99% of that entire function that I created to use user dbp function from script was coded with inline asm code.

Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 25th Dec 2005 09:15 Edited at: 25th Dec 2005 09:18
holy crap
i hate inline when it comes to windows

so exactly how did you do it

edit:
why inline asm
the onyl real thing you need inline asm for is speed and for operating systems(dev)

i dont see anything as far as windows that you can do in asm that you cant do in C

I didnt fail, I just found 10,000 ways that don't work
-Thomas Edison
Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 25th Dec 2005 09:26 Edited at: 25th Dec 2005 09:45
I come from an assembler background and understand that this dbpro user functions problem would be easier solved by using low-level asm for control.

If dbpro makes a call to a plugin dll or user dbp function call it will store the returning address on the stack. Using that address you can get the location of the dbpro code. Then once that complete you can scan through the machine code for the "function" byte pattern that is created with most programs. Once that memory location is determined it goes into a simple array structure for binding into the scripting language as a single command.

Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 25th Dec 2005 10:25
sounds complicated
yes the stack that is one thing i forgot about, it is much easier to control in asm
darkscript isn't opensource is it(which i would see the reason if it wasnt)

I didnt fail, I just found 10,000 ways that don't work
-Thomas Edison

Login to post a reply

Server time is: 2024-11-21 18:42:11
Your offset time is: 2024-11-21 18:42:11