title: Garry's Mod: How to send a DLL?
body: <p>Garry's Mod provides a C++ API to create server-side and client-side DLLs.</p>
  <p>As it is said in the article <a href="https://wiki.facepunch.com/gmod/Creating_Binary_Modules" rel="nofollow noreferrer">&quot;Creating Binary Modules&quot;</a>, they must be placed in the <code>&quot;garrysmod/lua/bin/&quot;</code> 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?</p>
  <p>My DLL includes and executes local as required, but not networked (only if it was added manual to both sides).</p>
  <p>What I have tried:</p>
  <ol>
  <li><p>Tried to do nothing, just placed server-side and client-side DLLs in the server folder. Result: no DLL on the client.</p>
  </li>
  <li><p>Tried to add both DLLs to an addon's <code>bin</code>, and then added the addon to both the server and the client. Result: the game doesn't include the DLL from the addon's <code>bin</code> 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.</p>
  </li>
  <li><p>Tried <code>resource.AddFile (https://wiki.facepunch.com/gmod/resource.AddFile)</code> and <code>resource.AddSingleFile (https://wiki.facepunch.com/gmod/resource.AddSingleFile)</code> and <code>AddCSLuaFile (https://wiki.facepunch.com/gmod/Global.AddCSLuaFile)</code> (I know, it's stupid, but I tried it anyway). All these functions can't send a DLL to a client.</p>
  </li>
  </ol>
  <p>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 <code>net.WriteData (https://wiki.facepunch.com/gmod/net.WriteData)</code> someway?</p>