'Garry's Mod: How to send a DLL?
Garry's Mod provides a C++ API to create server-side and client-side DLLs.
As it is said in the article "Creating Binary Modules", they must be placed in the "garrysmod/lua/bin/"
folder, but what do I need to do if I'd like to send a DLL to a client, which is required for a lot of tasks, I think?
My DLL includes and executes local as required, but not networked (only if it was added manual to both sides).
What I have tried:
Tried to do nothing, just placed server-side and client-side DLLs in the server folder. Result: no DLL on the client.
Tried to add both DLLs to an addon's
bin
, and then added the addon to both the server and the client. Result: the game doesn't include the DLL from the addon'sbin
folder. I can't just add a DLL to a client, because I'd like to run a dedicated server with this DLL, so it should be sent and include by clients automatically. Here I tried to do it through addons, which are networked.Tried
resource.AddFile (https://wiki.facepunch.com/gmod/resource.AddFile)
andresource.AddSingleFile (https://wiki.facepunch.com/gmod/resource.AddSingleFile)
andAddCSLuaFile (https://wiki.facepunch.com/gmod/Global.AddCSLuaFile)
(I know, it's stupid, but I tried it anyway). All these functions can't send a DLL to a client.
Please, if you know any way to share DLLs to a client, help me, I'll be happy to listen to your answer. Maybe, I have to use net.WriteData (https://wiki.facepunch.com/gmod/net.WriteData)
someway?
Solution 1:[1]
This is not possible. If you could send a DLL to a client you would have full control over the client's computer, and you could e.g. scan for credit card numbers or format their hard drive.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | user253751 |