The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ic2 on July 07, 2005, 11:21:59 PM

Title: Look for an on zip file
Post by: ic2 on July 07, 2005, 11:21:59 PM
Hello everybody

--hutch do you still have the dynamic.asm If not do anyone have an copy of it.  It was about executing code from memory, GlobalAlloc or something like that.  If so could you post it here.

Thanks in advance
Title: Re: Look for an on zip file
Post by: Rifleman on July 07, 2005, 11:38:50 PM
ic2,
Here you go...

PBrennick

[attachment deleted by admin]
Title: Re: Look for an on zip file
Post by: hutch-- on July 08, 2005, 12:53:03 AM
ic2,

What context do you need to do this in. What comes to mind is an old trick where you copy and API call code directly into allocated memory and call it from its start address with the normal set of arguments. Its easy to write when the procedure is within your own code because you can easily work out the minimum length from its start label and the following start label of the next procedure but with an API call, there is no easy way to do this so you usually allocate a big enough block of memory to handle the code on a test basis.

Just let us know and w should be able to find something that will show you how its done.
Title: Re: Look for an on zip file
Post by: ic2 on July 10, 2005, 01:40:53 PM
Testing: i been trying to post since but something wroing
Title: Re: Look for an on zip file
Post by: ic2 on July 18, 2005, 05:29:05 PM
I'm having problems posting, but i got to say thanks at lease.  Hope it get through.

Thanks Rifleman
Title: Re: Look for an on zip file
Post by: tekhead009 on July 19, 2005, 12:43:10 AM
I read this when it was first posted, but now I'm curious; why would you wan't to execute an API function from allocated memory?
Title: Re: Look for an on zip file
Post by: hutch-- on July 19, 2005, 04:53:56 AM
tek,

By having the code in the memory space of the applcation instead of it being in the system memory area, it used to improve the speed of the call and when you were hammering an API at high speed, you could clock the difference.
Title: Re: Look for an on zip file
Post by: ic2 on July 19, 2005, 09:15:10 PM
I can post properly with dial-up but not dsl.  Thank hutch-- is there more.  I want to do this.
Title: Re: Look for an on zip file
Post by: ic2 on July 19, 2005, 09:17:29 PM
It's true only a line or two for my dsl.  I got to get a new modem.  I re-installed XP and everything.