ID:275950
 
Game Maker http://www.cs.uu.nl/people/markov/gmaker/resource.html. This program first gave me its attention. As on that page their are resources of dlls that Game Maker can call using two functions (External_Define, External_Call). So I thought if a stupid Game Maker can do it then Byond should be able to do it easy. Well im not sure if byond can currently do it? Does any one know if DLL's can be read with byonds current functions? Or maybe how the DLL format is setup.

Any way what I did was create two functions in byond External_Define() and External_Call() which are like those in Game Maker. So you do External_Define(Dllname,functionname,returntype,argtype1,arg type2,argtype3,argtype4). This would return a obj of type dll which would hold those values. You would then use External_Call(dllobjreference,arg1,arg2,arg3,arg4). The External_Call function would use byond's shell() command and send all the data as arguments too the dllcall.exe file that I made. That would then get the arguments and use the LoadLibrary() and GetProcAddress() to call the function you wanted in that certain dll file.

But every time you run the shell it brings up a warning message. Also I don't know if any one would want to use this. What would you do if you could call dll's in byond?

And I tried calling The Text2Speach functions for that dll on the Game Maker page but couldn't get the functions that took string's as arguments to work.
Dll's is a bad idea in byond, someone could make there own dll's with bad intent and then when people enter there game...
Two things:

  • Allowing DLL calls from BYOND would be a gigantic security risk.
  • There is no A in "speech".

    Lummox JR
In response to Lummox JR
Lummox JR wrote:
  • Allowing DLL calls from BYOND would be a gigantic security risk.

    They wouldn't help much anyways. The code and such is run on the server, and only the server. I can't think of any external calls on the server that would be of any benefit.
In response to Jon88
I basically see it as caveat ludor. If someone downloads a BYOND game with a DLL and runs it as the server, they accept the responsibility if that program turns around and reformats their hard drive (naturally, of course, the person who created the malicious program is legally responsible -- but there's a certain amount of caution that everyone must use when downloading programs, no matter where they're from).

You accept the same risk when you download a program from elsewhere on the internet.

Naturally, DLLs would only operate server-side. Client-side DLLs make it much too easy to get away with inserting malicious code.


I, for one, could really use server-side DLLs to vastly streamline various operations. It would allow you to break out of the BYOND bytecode and -- for a small cost in system overhead -- execute a program at full CPU speed with no BYOND interpreter slowdown, then provide a callback or a return of some kind. (The syntax there could get difficult, though.)
In response to Spuzzum
Spuzzum wrote:
I basically see it as caveat ludor. If someone downloads a BYOND game with a DLL and runs it as the server, they accept the responsibility if that program turns around and reformats their hard drive (naturally, of course, the person who created the malicious program is legally responsible -- but there's a certain amount of caution that everyone must use when downloading programs, no matter where they're from).

You accept the same risk when you download a program from elsewhere on the internet.

The problem is, most such programs you're not downloading from a gaming community full of swarming wannabe script kiddies.

Naturally, DLLs would only operate server-side. Client-side DLLs make it much too easy to get away with inserting malicious code.

Agreed.

I, for one, could really use server-side DLLs to vastly streamline various operations. It would allow you to break out of the BYOND bytecode and -- for a small cost in system overhead -- execute a program at full CPU speed with no BYOND interpreter slowdown, then provide a callback or a return of some kind. (The syntax there could get difficult, though.)

I'd love server-side DLLs myself, but the problem is that it's way too easy to hide malware or spyware in a .dll so there'd be no trusting it by the host either. So far I may be the only one who's included actual executable code in a BYOND package--besides the few who've attempted to spread viruses (in about the lamest and least effective way possible, I might add). The difference is, I'm a fairly known entity with a certain amount of established trustworthiness, so people know the source and can use their judgment to decide it's worth running the .exe.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
The difference is, I'm a fairly known entity with a certain amount of established trustworthiness, so people know the source and can use their judgment to decide it's worth running the .exe.


/me releases a demo with a file called:
"not_a_virus.exe". >_>