There is a task: to create a .dll, which will compile the code of the .bat file located in textbox1. How to do it?

  • Explain on the fingers. What to compile (example), in what? - alexlz
  • one
    He wants to write his compiler and thrust it into the DLL, so that the BAT would be input and the output would be the output. Good luck. - vdk company
  • one
    @Vlad: well, tell us why you need exactly the exe-file. Maybe then we can better understand what you really need. Because now, frankly, it seems that you need something much easier. And what else will you do with DLL? It does not start by itself. - VladD
  • 2
    [I don’t know why, but reminded me ] [1] [1]: habrahabr.ru/post/130362 - teanYCH
  • one
    @alexlz, this is a link to a translation of a humorous article. Despite the fact that in every joke there is some truth, are you sure that you should take the article I have indicated in all seriousness? I understand, of course, who is kodil on a brainfack, he doesn’t laugh in a circus, but is it really that way? - teanYCH

2 answers 2

@teanYCH , in fact, you are probably right, only the task formulated by the author has a solution (although the author probably did not think about it).

-

We write in C / C ++ the compiler of the language of BAT-files and implement it in the form of a function that is placed in the .dll. At the output (of course, the linker is called from the same function), we get the .exe in the specified file.

Further obvious.

    To start:
    1. read about compilation and compilers , apparently, you don’t fully understand what it is
    2. read about dll , --- // ---
    3. read about bat-files , --- // ---

    * references to pedovikiyu may not be the most successful, but they have links to other sources. In any case, if you wish, you can google ...

    Go ahead.

    create a .dll that will compile

    DLL can not compile anything. Compiles the compiler (and I punish, severely punish ...). Dll is a dynamic link library used by an executable file that contains certain resources / functions / etc.

    will compile the .bat file located in textbox1

    Do you have code in textbox or batch file? (which just does not happen in our dense forest)

    How to do it?

    Apparently, the task you described is not a solution. If you still think that this can be done, then normally describe what you want to do, because we did not understand anything.

    • @avp, the problem you formulated has a solution. Formulated by the author - no. Maybe he meant it, but the description does not reflect his thoughts. I gave my answer not for your comment, but for the task described by the author :) - teanYCH
    • one
      @teanYCH, I also think that the author had in mind something else. I just formally approached the set of words written by him and well-known technologies. - avp
    • one
      @avp, you'd better write your comment as an answer. Personally, I found it interesting. - teanICH