Help me with 1 Job

Need help with 1 job, couse i'm begginer.
Please help me , couse i write in alot forums and nobady knows c++ to help me with it.

Here is what i need :

Hello,
Can someone tell me how to do this:
I'm begginer with c++ i had just started learning the book and i want some help to learn something
Can someone learn me how to make this:

I use : Visual Studio 2010

The job is this:

Code :
1
2
3
4
5
6
7
8
/*Бърз и прост начин за заместване на краш команда
//AntiCrash Prevent
*/
for(int X=0; X < (int)strlen(Message);X++){
if(Message[X] == '%'){
Message[X] = '"';
}
}

How to make this source to be a .dll file with name (for example: MFS.dll) and this file to read information from an .ini file (for example: MFS.ini, the .ini file must to be in the same folder where it is the .dll file if its not to show error that cant find the file MFS.ini (or you can show me how to put a path to read the file from other folder that will be good too to learn))

MFS.ini:
[code]
// Разрешаване на проблема с краш командата
// Fix The Crash Problem
FixCrash = 1; // (0-Disable,1-Enable)

If in the MFS.ini on the line
FixCrash = 1;
To use the source code as enabled , if its 0 to be disabled (not to use the source code)

Also i want to take advnice that i didnt have any function in the code, so please help me build the .dll file

Thanks in advance
If you a beginner to c++ you are way in over your head. If you don't know the basics of programming. For example Knowing how to open and read in a file. If you can get a small test program working, then it is putting the code in a DLL, which is advanced topics compared to a beginner.

There are several libraries for doing somefile.Ini work out there. they might even compile into a dll for linking to you program.
How to make this source to be a .dll file with name (for example: MFS.dll)
The unit of usable code in C or C++ is a function.

Anyway, here are some steps for Visual Studio 2010 that you say you're using:
Right-clock Solution Exporer's "Solution node"
Select Add -> New Project
Select Win32 Console Application
Enter the project name, MFS
Press OK

The Win32 Application Wizard will pop up.
Select Application Settings.
Select Application type DLL
Select Additional options Export symbols.
Press OK
i had tryed to make the .dll but no one help , i know that i'm begginer and i learn from the zero, but 1 friend asked to make this job, so i'm looking for help someone to make it

the thing that i try is this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// MFS.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#include <iostream>

using namespace std;
/*Бърз и прост начин за заместване на краш команда
//AntiCrash Prevent
*/
int main ()
{

for(int X=0; X < (int)strlen(Message);X++){
if(Message[X] == '%'){
Message[X] = '"';
}
}


return 0;
}

But its wrong
As I roll my eyes, if you didn't read previous posts.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <string>
#include <fstream>

using namespace std;

ProcessMessage(const string Message)
{
      int nLen = Message.length();
      for(int X=0; X < nLen;X++)
      {
             if(Message[X] == '%')
             {
                    Message[X] = '"';    
              }
       }
}

int main()
{
         string Message;
        //open the file...
         fstream inFile;
         inFile.open("MFS.ini", ios::in);

         while(!inFile.eof())
         {
                 getline(inFile, Message);
                 ProcessMessage(Message);
         }
         inFile.close();
         return 0;
}


Like I said you don't have much you code to do much so elaborating on what I have so far I don't know what you exactly need
closed account (zb0S216C)
Let me get this straight. You want to create a DLL that reads from an INI file. The INI file's keys are read in. If the key FixCrash is zero, you disable some undefined piece of source code? Am I wrong?

A few things:
1) DLL projects have a different entry point. Instead of main( ), DLLs use DllMain( ) as their entry point.
2) What is the purpose of your for loop?
3) Why did you agree to creating a DLL when you're a beginner?
4) Without knowledge of ifstream, reading from your INI file will be a no-go.
5) How much of the WinAPI do you know? As you would expect, DLLs use the WinAPI.
Last edited on
one friend ask me to find someone to help me make it, couse he needs it.
This code fix a problem in Mu Online Game with 1 crash command that crashes the game.

So i write in alot forums hoping someone will help me build it, dont get me wrong i'm begginer and i dont know alot i'm learning the book and wathing in youtube videos so get something in my head, but this job i cant make it so i write it.

About the information that you want to know about the MFS.ini file:
If the CrashFix = 1
To use the source code for fix the problem
If the CrashFix = 0
Not to use the source code (to buypass it or in other words to skip it)

Can we build the project here, i hope here has alot people that know c++ and if everybody help here we should make it in no time.
Thanks again

Azagaros i tryed your code and i got underline on the words:
IntelliSense: explicit type is missing ('int' assumed) //ProcessMessage
IntelliSense: expression must be a modifiable lvalue //Message



Last edited on
I looked into the program that you trying to apply a patch/hack for. I was surprised I didn't see it their forums. It looks like it might be a debugging feature, that their coders forgot to turn off or remove.

I don't know why it bothers you so much that you want to write specialized code to deal with this. It would be simpler just to write a basic program to make the change, then set up a script for loading the two pieces. To me this is a hack and no need to help you make code that might be a security violation to their company.

I wrote that stuff with the assumptions of you lack of knowledge in explaining the problem. It was a basic example how the code would look and off the cuff for a programmer like me. If you don't know how to fix the basic errors that all the experienced programmers might figure out in two seconds, and I can give people who are really trying to learn to program some credit too.

So with these thoughts I have about what your trying to do and I feel this will close this discussion and I suggest you take to the mu online forums. They do have a suggestion box.
you dont understand what mu online is,
there are 30 different organizations that are coding different GameServers
the default creator of the game is WebZen
coders work on gameservers to fix problems to make the game nice and play.
but they cant fix all the problems ingame so when people find a bug (a thing that isnt coded right or is missing) they tell it.
So here it is what i'm asking this source code will fix the problem for this bug, its not hack crack or other stuff its just simple c++ code, you can find on internet alot released source codes about this game and if you know alot c++ you can create the game with your stuff. If you get me right you will see its not unliagal stuff its 100% free. So please help to finish the thread and make it working
Thanks
Mu online is a MMORPG. I see One company that has 10 or 12 development teams working on different projects. 1 to 5 moderators for a message board, and the time it takes to develop patches for said game when their revenues are down. They are experiencing security breaches of some form, which was stated in their forums. I don't know how often they put out patches or how many bugs they are trying to find with that flag in the ini, which appears to be programmer oversight. If they felt this was a bug that had a high priority it would have been fixed fairly quickly.

I played WOW for a while and play Solstice Reborn from time to time. MU online looks to have a cumbersome User interface but I haven't gone much beyond the Screen shots to make any further evaluations.

Again I state this looks suspiciously like a malicious attempt at something. I am not going to help someone add to their security problems.
lol anti-crash prevent
@ OP: The problem I have is that this "patch" doesn't fix anything. It changes the '%' characters to '"' but then it doesn't do anything with the string, so unless "Message" is a global variable then nothing is going to come of this. That's IF you were able to inject this DLL into the program which based on what you've shown us so far you are not capable of understanding or doing, and we don't encourage "script kiddies" here.

I'm interested in who sent you on this task to begin with. Do you personally know them?
sure the coder is : pegasus128
you can find him here and this is his work, he is trying to fix some stuff but he needs help with some other coders that knows c++ language: http://forum.ragezone.com/f197/muserver-0-96-40-waxlrose-656647/
Topic archived. No new replies allowed.