Calling DLLs from script
by Josh Goldshlag · in Torque Game Engine · 10/28/2001 (4:16 pm) · 6 replies
OK, after a day or so of playing around, I put some code together to let people call DLL's from script.
This is obviously not something that should be built into Torque be default, but I wanted to know what people thought I should do...
the code is here: www.goldshlag.com/DLLObject.zip You need to throw the .cc and .h into the console dir, rebuild torque then follow the instructions in the .cs file.
I can think of a few options for how this code could be intergrated:
1) Make it server-side only
2) Make a dialog box come up when a script tries to load a DLL that requires the user to OK it.
3) Make a client side setting that allows or disallows DLL access. If this was in clientprefs.cs it could be overridden though (I think)
Anyway, I wanted to get some feedback. What do the GG guys think?
Josh
This is obviously not something that should be built into Torque be default, but I wanted to know what people thought I should do...
the code is here: www.goldshlag.com/DLLObject.zip You need to throw the .cc and .h into the console dir, rebuild torque then follow the instructions in the .cs file.
I can think of a few options for how this code could be intergrated:
1) Make it server-side only
2) Make a dialog box come up when a script tries to load a DLL that requires the user to OK it.
3) Make a client side setting that allows or disallows DLL access. If this was in clientprefs.cs it could be overridden though (I think)
Anyway, I wanted to get some feedback. What do the GG guys think?
Josh
#2
Josh
10/29/2001 (11:31 am)
Hmm, no inline asm... Is the best way to do it to just copy + paste the VC generated ASM into a file and compile it with NASM?Josh
#3
11/06/2001 (8:41 am)
More or less. I didn't do the nasm conversion, but it is standard intel format, so it should translate over pretty easily. You might want to look at the existing .asm files in the SDK.
#4
Thanks!
03/23/2005 (10:00 am)
I tried the link (www.goldshlag.com/DLLObject.zip) but didn't work, is there any other place where I could get the code? Also, is this a "com client"? or just a dll library?Thanks!
#5
Would it not be easier to link the code into your Torque game? :)
04/02/2005 (2:01 pm)
Given the age of this thread (4 years old) it's safe to say that everything in this thread is outdated.Would it not be easier to link the code into your Torque game? :)
#6
Thanks!
04/04/2005 (7:00 am)
Hm, well, yeah, sort of. I wanted to bring in .net assemblies into torque, but I ended up using COM interop to tie them together. Just wondering if there was an easier way than waking up the COM monster.Thanks!
Torque Owner Tim Gift