Port Visual Code C++ to another language

Asked

Viewed 155 times

3

Next, I have a simple Shellexecute code that was done in Visual C++ 2012, but because it is a closed and paid platform and because I need my customers to keep downloading more programs I would like this project to be ported to another language. I will post the main code and project link on Github.

https://github.com/zoiobnu/L2-EXE

I need this code, without needing Visual Studio , without needing more DLL’s on the client’s computer, I just need it to take the executable and run inside the game.

#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NOMINMAX
#include <windows.h>
#include <cstdlib>

// Start L2 as .bin with IP as parameter.
// You can use IP or DNS as IP parameter.
// You could include other parameters.
// You can change the path to the .bin file to avoid including the L2.exe inside the System folder.
// Author: Zoey76
int _stdcall wWinMain(HINSTANCE hInst, HINSTANCE prevInst, LPWSTR szCmdLine, int nCmdShow)
{
    ShellExecute(0, L"open", L"cmd.exe", L"/C start l2ellite/l2.bin IP=127.0.0.1", 0, SW_HIDE);
}
  • 4

    Taking advantage of the fact that you seem to be new here, here are some links that can help in the elaboration of the questions: [Tour], [Ask] and also the Community FAQ. Incidentally, for new user, your question is already well formatted, maybe if you improve a little the content with more details of the need (type of environment you will use, compiler desired etc.) can be a good question, because the theme is interesting. The recommended links can help in this regard. And of course, welcome.

  • 1

    I don’t understand what you’re asking.

  • 1

    Just one note: Codeblocks is an IDE and not a compiler, in case it uses Mingw by default (I think you can use other compilers).

  • And do you really need an executable just for that? If you create a file .batwith the command start l2ellite/l2.bin IP=127.0.0.1 shall operate in the same way.

  • If I create a . bat works , but for security reasons, I don’t want my players to see the server IP .

  • Creating an executable just feels safe. Alias, you don’t even need to protect anything, you can tell even if it was possible to protect

  • Many of the players don’t even know how to look , but if they don’t want to help can close the post.

Show 2 more comments

1 answer

5


The question is not very clear and maybe a little broad, but what you’re trying to do doesn’t make much sense.

You can get rid of Visual Studio but cannot get rid of Windows which is a closed and paid platform.

But I don’t know if this is relevant. What’s the problem with Visual Studio being closed? Does it cause any real problems? Not that I know of. And he is not paid for immense majority of cases, even the almost full version is much better than most similar software that exist around.

Something will have to be downloaded. Even if it is not a Microsoft product. The least of the problems you will have is downloading Visual Studio.

The section shown does not show anything specific to the Microsoft compiler, so there is nothing to port. There is access to the Windows API. But this cannot be ported without throwing away what it is doing. In fact this code has little meaning either. I don’t know if there will be anything else, but forcing someone to download a compiler to compile just this is a huge exaggeration. You don’t need to make a "C++ software" just to call the program. No one does this, if they want to do it differently, only you know what differences they want.

It may not be the answer you expect, but the real solution is this. Unless the question is unclear.

  • In this case it is a game Auncher, he invokes the game without the need for me to change the game itself. In the case the boy gave this answer. I’m sorry for the honesty but I’ve never seen a Mozilla Firefox , or Teamspeak to download additional programs. I know I said code::Locks but I gave as a reference , for me no matter what language will be used , I just need this executable invoking L2.bin with the IP address I need, but as I said I do not want my client to download anything from microsoft.

  • Yeah, I’ve never heard of it either, so you’re doing something really, really wrong. To tell you the truth, I think it’s better to close the question, because she doesn’t seem to have any sense. The problem is another and you don’t even need actual programming. You’re hiring a plane to carry a toothpick around the corner.

  • Until I understand its point , but the problem is that I need this Auncher , or at least ported to Visual Studio 2008 because usually the staff has. For example I installed on the other computer the game and this Launcher , downloaded the Visual C++ , installed , restarted the computer and still it does not find the DLL of Visual C++

  • Let me clarify, I don’t understand anything about programming. This code is on Github only gave Fork on it , but I don’t want to use Visual Studio a: It’s paid b: It’s heavy c: Because the client needs Visual C++ to use d: It’s Microsoft Maybe now I’ve been clearer about what I need and why I can’t use in other software. I tried to import it to code: Blocks and compile with mingw but it does not compile.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.