IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Creating a dll for VC

 Tired from Making Custom & Main scripts
 
Ashwin the new boy  
Posted: Wednesday, May 9 2012, 13:27
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



Hi Friends,
as the topic says,
i need your help in making a Working DLL for Vice city.

::DLL::
which write some value to a memory address

example >>>>
writing 1 byte value 245 to 0xA10B81
writing a string 'blabla' to 0x68F1F4
& writing a float value 99999.99 to 0x69C780

I want to do this by using 'Code blocks'

please tell me the code that i should write in CB for this
or a Link to your uploaded Project will be great

Actually i know what to write lol.gif but the DLL is not working,
Waiting ... monocle.gif

This post has been edited by Ashwin the new boy on Wednesday, May 9 2012, 13:29
Users WebsitePM
  Top
 

 
fastman92  
Posted: Wednesday, May 9 2012, 13:34
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



If it will be loaded into gta_vc.exe, possibly ASI plugin.

C++
CODE
*(char*)0xA10B81 = 245;

strcpy((char*)0x68F1F4, "blabla");

*(float*)0x68F1F4 = 99999.99;
Users WebsitePMMSN
  Top
 

 
Ashwin the new boy  
Posted: Wednesday, May 9 2012, 13:44
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



i was using
CODE

*(float*)0x68E704 = 1.0f;
  *(byte*)0x4A6B7C = 113;

but doesn't work, i am using C++ after a looong gap.
May be possible i forgot something (also using CODE BLOCK First time lol.gif)
----------------------
i want the full code from TOP to END
i mean from "#include" to "return TRUE;}"
sorry for behaving like a Big NOOB here

also > found a prob. that i was building it in Debug mode blush.gif
is it necessary to do that all .res & .def thing ?

This post has been edited by Ashwin the new boy on Wednesday, May 9 2012, 13:48
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Wednesday, May 9 2012, 13:45
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



Take a look at the source code of s0beit: link
PM
  Top
 

 
fastman92  
Posted: Wednesday, May 9 2012, 13:57
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



Yes, you forgot

CODE
void UnprotectMemory(LPVOID address, size_t size)
{
DWORD dwProtect;
VirtualProtect(address,size,PAGE_EXECUTE_READWRITE, &dwProtect);
}


Use this function before writing values if memory on certain address is protected.
Usage:
CODE

UnprotectMemory((void*)0x68E704, sizeof(float));


No need if specified memory area is not protected

Remember to do
CODE
#include "windows.h"
Users WebsitePMMSN
  Top
 

 
Ashwin the new boy  
Posted: Wednesday, May 9 2012, 14:51
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



I am trying ....
tell you the result soon

I am not using Virtual protected Mem add BTW.

This post has been edited by Ashwin the new boy on Thursday, May 10 2012, 09:01
Users WebsitePM
  Top
 

 
Link2012  
Posted: Wednesday, May 9 2012, 16:14
Quote Post


Wut?
Group Icon
Group: Members
Joined: Jan 30, 2011

ba.gif

XXXXX



You can take a look at the source of
http://www.gtagarage.com/mods/show.php?id=17919
from fastman92.
---

And
I did this some times ago, but didn't finished (I just started and stopped, maybe later I continue), since I just started the code is very simple (and bugged, but it writes in the address very well)

Here is it: http://pastebin.com/Anbvviei

It has a replica of the CLEO Opcode Write Memory, for string:
CODE
void WriteMemory(void* Address, int size, char* value, bool vp = false)
{
DWORD oldProtect;
if(vp)
 VirtualProtect(Address, size, PAGE_EXECUTE_READWRITE, &oldProtect);

strncpy(Address, value, size);

if(vp)
 VirtualProtect(Address, size, oldProtect, &oldProtect);
}
PMMSN
  Top
 

 
Ashwin the new boy  
Posted: Thursday, May 10 2012, 03:25
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



Is that all i have to write in dll code to make a DLL which increase the MAX hight limit to 99999.99
CODE

#include <Windows.h>


BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
   switch (fdwReason)
   {
       case DLL_PROCESS_ATTACH:
       *(float*)0x68F1F4 = 99999.99;   //mem add is not VP
           // attach to process
           // return FALSE to fail DLL load
           break;

       case DLL_PROCESS_DETACH:
           // detach from process
           break;

       case DLL_THREAD_ATTACH:
           // attach to thread
           break;

       case DLL_THREAD_DETACH:
           // detach from thread
           break;
   }
   return TRUE; // succesful
}

after building, i get a DLL(5.50 KB) in release folder,
i put it in mss folder after renaming it to .flt
//NO EFFECT//
----------------------------
i am sure i have make some silly Mistake ...
Users WebsitePM
  Top
 

 
Ashwin the new boy  
Posted: Tuesday, May 15 2012, 12:47
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



I tried a lot but There is NO effect on those mem addresses
Can anyone make & upload a DLL Project
so that i can also start DLL coding
please ...
Users WebsitePM
  Top
 

 
Deji  
Posted: Tuesday, May 15 2012, 13:16
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



QUOTE (Ashwin the new boy @ Tuesday, May 15 2012, 12:47)
I tried a lot but There is NO effect on those mem addresses
Can anyone make & upload a DLL Project
so that i can also start DLL coding
please ...

QUOTE
You can take a look at the source of
http://www.gtagarage.com/mods/show.php?id=17919
from fastman92.
---
Users WebsitePM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG