Anyone know how to extract information from a DLL?

Moderators: GSH, VSMIT, Commando

Post Reply
Feenix

Anyone know how to extract information from a DLL?

Post by Feenix »

Why would I want to do this? Well, I'm trying to create a Truespace TSX plugin from an existing X exporter plugin and rewrite it for use in creating a BZII style XSI exporter. I already have the TS SDK information that I need to create the plugin, but I need to exract information from the TSX itself; it's Caligari's equivilent to a standard Windows DLL only renamed because that's how Truespace loads plugins. I need some help sorting it all out and what direction to begin moving towards to get it underway. Thanks.
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Anyone know how to extract information from a DLL?

Post by GSH »

Short answer: you don't.

Long answer: you really don't. Really, really don't.

Even longer answer: DLLs are (usually, 99+% of the time) compiled code. You can start with a disassembler and try to reverse-engineer things, but doing so is like taking a rocket that's crashed and burned and scattered over a hundred square miles, and trying to put it back together. Without ever having built a normal rocket. And from what I can tell, you know nothing about x86 assembly, and probably know nothing about rocketry.

What you really want to do is this: learn that DLLs are like going from ingredients, thru a recipe, into an oven, and you get tasty cake at the end. If you want a different cake, you do NOT try and put an existing cake under the microscope, and put more egg in it this time. You start with new ingredients and tweak things there. In this analogy, the ingredients are source code, recipe is the compiler, and the cake is a DLL. You need to find source code for some Truespace plugins (this may be really hard). You need a compiler (at least they're a free download.) And, you need programming skills. And an understanding of 3D math, file formats of .xsi 1.1 files.

At least you're sort of on the right track this time around. You realize that programming might just be the way to get from your preferred obscure 3D modeling package into your preferred obscure game file format (BZ2). But, this ain't going to be easy. And if you think that your life was hard now, it's going to get worse for a while. C++, as a programming language, lets you shoot yourself in the foot early and often. And it helps you do so.

-- GSH
Smoke_Jaguar
Scrap
Posts: 3
Joined: Sun Mar 13, 2011 6:49 am

Re: Anyone know how to extract information from a DLL?

Post by Smoke_Jaguar »

If you are just wanting to extract data, try something like ResHacker ( http://angusj.com/resourcehacker/ ). If you want to change data inside that DLL, then you're going to have a helluva time. Depending on the DLL, you can usually get icons, strings and a bunch of random data, but some will yield nothing usable.
Feenix

Re: Anyone know how to extract information from a DLL?

Post by Feenix »

At least you're sort of on the right track this time around. You realize that programming might just be the way to get from your preferred obscure 3D modeling package into your preferred obscure game file format (BZ2). But, this ain't going to be easy. And if you think that your life was hard now, it's going to get worse for a while. C++, as a programming language, lets you shoot yourself in the foot early and often. And it helps you do so.

-- GSH
Thanks for the pat on the back. I know a programmer who creates TSX plugins for Truespace. He calls himself Froo and he apparently uses C++ to create them. Most BZII modders look for short cuts as we don't really know our head from our ass when it comes to programming. We all envey you Egg Heads that basically create works of art with computer code instead of a 3D modeling package.

I have an obscure compiler called FreeBasic that has all the C++ headers files converted for use with it to create TSX plugins for Truespace 6. I've also found and installed several user made TSX import/export plugins for OBJ, ASE, 2 Unreal versions, and another X exporter for TS 6. If I manage to figure it all out then I will surely make the plugin available for other TS users as I now feel my little obscure 3D modeling package can probabely outclass most other non 3D MAX modelers I've found so far.

PS: I've always known that I was on the right track though it is nice to have another person finally sort of acknowlege this simple truth. TS, was designed for beginners as per Caligari's own hype. My experience with it has proven that even a modeling idiot like me can master it and use it to create BZII models and props. I've just begun to unravel the TS animation creation process as well. I would also recommend that wanna be modelers download it before Microsoft pulls the plug on TS 7.6. Like BZII, TS has a small but dedicated group of users that keep it alive with new addons like TSX plugins. The SDK is freely available and more and more people are getting in to the programming end. Some TS programmers are also beginning to post tutorials for other TS users.
Feenix

Re: Anyone know how to extract information from a DLL?

Post by Feenix »

Smoke_Jaguar wrote:If you are just wanting to extract data, try something like ResHacker ( http://angusj.com/resourcehacker/ ). If you want to change data inside that DLL, then you're going to have a helluva time. Depending on the DLL, you can usually get icons, strings and a bunch of random data, but some will yield nothing usable.
Thanks, I'll have a look at this resource and see what it yields. I am mostly trying to exract enough information to figure out how to make a completely new custom DLL for working with the Truespace SDK documentation and creating a TSX based XSI version 1 export plugin like so many other people have already done. I guess it's possible as some of those people are basically just 3D model makers who found the task doable after studying the TS SDK and learned some basic programming skills to actually make the DLL based TSX plugin.

I've always been motivated by Truespace's architecture as Caligari placed a high emphasis on making it's SDK available for 3rd party plugin developers. Microsoft, acquired Caligari a few years back as an alternate 3D modeling package to compete with Google's 3D modeling software. To date MS still has the Caligari web site up and Truespace is still available in a standalone version called 7.61. What's a standalone version you may ask? The original 7.6 was released with 2 versions of TS the first was the version with the latest features, and the second version 6 had all the features of the older original version with the X exporter that I currently use to make models for Battlezone II. Anyways the original 7.6 has what Caligari calls a Bridge to allow the modeler to switch between the 2 different versions of Truespace effectively making it possible to use the new modeling tools of 7.6 with the older version 6 modeling tools together. It's quite amazing if you think about it 7.6 has exporters for formats like DAE and FBX while the version 6 has exporters for 3D MAX like 3DS, ASC, DXF, and exporters for X, CAN and STL. In addition there are the TSX based user created exporters like ASE, OBJ, Ureal, and 2 other variants of X. Apparently, the architecture of Truespace is mainly oriented towards open source availability to people in general. I guess that's why I'm seeking some useful feedback from programmers who understand how these things work. Simply telling me that it's the immposible task is like tellimg me your just to buzy to share any information and use then unrelated analogizes to diffuse interest in the venture. Still, I wanted to ask for any useful help or feedback on what direction to move in to get the project underway. I know it can be done. I just need some help to get me oriented to actually do the work required. PS: I already have a DLL compiler called FreeBasic that can create a TSX plugin now I need steps on what do to do first and so on. Thanks.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Anyone know how to extract information from a DLL?

Post by Nielk1 »

Feenix wrote:Most BZII modders look for short cuts as we don't really know our head from our ass when it comes to programming.
Most of us BZ2 modders are insulted because most of us do things the long and hard way. Mr. Twosheds animates his XSIs by hand, BBB does Vertrex animation in his by hand, I program my DLLs and hex edit MSH files and do DX-Pipeline captures and model from scratch, Red Devil whom knows nothing of C++ updates the G66 and FE DLLs to 1.3pb6 adding new features and for a time was even working on updating the AIP editor, and many others do much more that is nothing near a 'short cut', programming or otherwise. When something doesn't work for us modders, we either skip it or power through it ourselves. We don't go crying to someone else to make our obscure method work just because we want to use it and not adapt the the actual technology used.
User avatar
Ghastly
Sober Scav
Posts: 26
Joined: Wed Apr 20, 2011 6:29 pm

Re: Anyone know how to extract information from a DLL?

Post by Ghastly »

Give me $11,000, an empty, soundproof/isolated storage container, a chair, rope/chains, a brick and a hive of fire ants and I can extract the information you need.

(Sorry, couldn't resist.)
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Anyone know how to extract information from a DLL?

Post by GSH »

Feenix - if you can't understand my analogies, please re-read the post a few times until it sinks in. Hint: I'm not disagreeing with your end goal. But, I am disagreeing with your proposed way as mentioned in the topic title. You should not be trying to extract info from compiled code.

As I stated, you should be trying to create your own code. It's a 1-way process, and your wording is backwards from the way programmers work. If you talk to programmers about doing things in a strange way, they'll usually write you off. Sorry, but 'Do What I Mean' doesn't exist in computers. Programmers have to be accurate and precise when creating things. And so, we push for the humans designing things to be the same.

-- GSH
Feenix

Re: Anyone know how to extract information from a DLL?

Post by Feenix »

GSH wrote:Feenix - if you can't understand my analogies, please re-read the post a few times until it sinks in. Hint: I'm not disagreeing with your end goal. But, I am disagreeing with your proposed way as mentioned in the topic title. You should not be trying to extract info from compiled code.

As I stated, you should be trying to create your own code. It's a 1-way process, and your wording is backwards from the way programmers work. If you talk to programmers about doing things in a strange way, they'll usually write you off. Sorry, but 'Do What I Mean' doesn't exist in computers. Programmers have to be accurate and precise when creating things. And so, we push for the humans designing things to be the same.

-- GSH
I do understand it's not an easy thing to undertake by non programmers and I do appreciate you taking the time to help me understand things a bit more. Programming is not one of my strong points. I'm a simple 3D modeling enthusiest seeking the help of programmers to help point out the steps required to make a customized DLL for renaming with the TSX extension; that's all a TSX is; a renamed DLL compiled using the SDK provided by Caligari itself. How would I best get this process started? Thanks.
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Anyone know how to extract information from a DLL?

Post by GSH »

I'd say: start on the Truespace boards/forums/newsgroups/etc. Reason is, as has been pointed out more than a few times here, is that you're the only person here who's ever admitted to using Truespace. We can only speculate about it, you've used it firsthand. You really need to find other Truespace users (and especially Truespace developers) and talk to them.

The closest thing I can help you with is to try and find a basic open source Truespace exporter plugin, and compile/run it. Then start adding features to it. By way of analogy, BZ2 has released source code for its MP DLLs, and has a readme file that notes how to compile/run those. Find something similar for Truespace, but you ain't going to get much in way of people knowing Truespace here. You'll need to find a place where people are more knowledgeable about Truespace until you can successfully compile/build/run an exporter made from source code on your own machine. End of story.

-- GSH
Feenix

Re: Anyone know how to extract information from a DLL?

Post by Feenix »

GSH wrote:I'd say: start on the Truespace boards/forums/newsgroups/etc. Reason is, as has been pointed out more than a few times here, is that you're the only person here who's ever admitted to using Truespace. We can only speculate about it, you've used it firsthand. You really need to find other Truespace users (and especially Truespace developers) and talk to them.

The closest thing I can help you with is to try and find a basic open source Truespace exporter plugin, and compile/run it. Then start adding features to it. By way of analogy, BZ2 has released source code for its MP DLLs, and has a readme file that notes how to compile/run those. Find something similar for Truespace, but you ain't going to get much in way of people knowing Truespace here. You'll need to find a place where people are more knowledgeable about Truespace until you can successfully compile/build/run an exporter made from source code on your own machine. End of story.

-- GSH
Thanks bro, I have a direction to move in now. Forgive my ignorance but programming although interesting leaves me with mostly a lot of questions and as such that's why I sought some general infomation on how to get started with some basic steps. Quite a few of the Truespace developers have made their source code available along with the plugins they've made. Some of it is for the older Caligari SDK and much of it is now for the TS 7.61 Rosettastone standalone version of TS. I post frequently on the Truespace forum United3dartist.com as that and a few other related sites have infomation posted relating to Truespace. I believe I have the installers for MS's Visual Studio on an old hardrive along with the FreeBasic compiler with the converted C++ header files for TS. I see what I need now is some open source code for an existing exporter plugin and as you said some assistance from a TS developer. I nkow one already that is willing to help me develop such an XSI exporter. I've even mentioned to him that I'm willing to pay him for creating my custom XSI exporter as he's told me already that he wants to earn some income from his plugins. Question, if I pay him for the work do will I have exclusive rights to the plugin and source code afterwards? I ask because I want to know if I can legally sell the plugin to other TS users or even even freely give it away? Thanks.
Post Reply