|
 |
|
|
|
|
|
GTA Modification Forums
Creating .asi files for gta sa.
 |
|
 |
| |
Saint Burak  |
|
Square Civilian

Group: Members
Joined: Nov 4, 2010

|
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Link2012  |
|
Wut?

Group: Members
Joined: Jan 30, 2011


|
A asi is a dll renamed. Just write a dll in C/C++/Whatever, compile, rename to asi, fun. Of course you can set the compiler to output the file directly to asi. Some kind of Hello World, can give you some direction... | CODE | #include <Windows.h>
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH: MessageBoxA(NULL, "HAI WORLD!", "Attach", NULL); break;
case DLL_PROCESS_DETACH: MessageBoxA(NULL, "THX, BYE", "Detach", NULL); break;
case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; } return TRUE; } |
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Ashwin the new boy  |
|
I am The Most Confused Person

Group: Members
Joined: Nov 14, 2010


|
I am tired from trying to make working .asi files, i am having code blocks for these Works, after putting Link's Code, i build it, | CODE | -------------- Build: Release in MSG ---------------
Compiling: main.cpp Linking dynamic library: bin\Release\MSG.dll Creating library file: bin\Release\libMSG.dll.a Output size is 6.50 KB Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 0 warnings
|
then i put the msg.dll file into root dir of VC, i thought i'll get a MSG box "HAI WORLD!" but Nooothing  again is there anything to do with "libMSG.dll.def" file ???
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
krasiejow  |
Posted: Thursday, Aug 23 2012, 23:09
|
VC:MP betatester

Group: Members
Joined: May 15, 2008

|
Interesting topic, thanks Link2012 for the sample code. I am not familiar with C or anything else, I just had visual basic in school  . I googled now for 2-3 hours to find a way how to write memory using a dll, got many results, but they are not working at all, I get an error while compiling the code or crash while writing the memory ( http://www.p-programowanie.pl/cpp/dll-inje...e-funkcji-cz-2/ second example on that page, I used other memory addresses and still crash). I'm using Visual C++ 2008 Express. So, could someone post a full example in "noob style"  how to write a memory address? I'll be thankful for this.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Link2012  |
Posted: Tuesday, Jan 29 2013, 17:05
|
Wut?

Group: Members
Joined: Jan 30, 2011


|
| QUOTE (arijitsen @ Tuesday, Jan 29 2013, 13:41) | Well as the topic is bumped already ..Can someone suggest me a good C++ IDE for making ASI Plugins ?? Don't lock the topic as it has become useful now.. |
Visual Studio. @Topic Good to have this bumped, I managed to compile a working ASI with MinGW, you just have to mark DllMain with a [extern "C"] and hey, it works! e.g. | CODE | | extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) |
MinGW\GCC ASM Block is harder to do than Visual Studio ASM block, and also uses AT&T syntax and I don't like it, Intel syntax owns. This post has been edited by Link2012 on Tuesday, Jan 29 2013, 17:09
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|