Jump to content


Photo

Calling a DLL to convert a file


  • Please log in to reply
4 replies to this topic

#1 LafBrothers

LafBrothers

    GMC Member

  • New Member
  • 2 posts

Posted 17 February 2012 - 10:11 PM

Hey, all! I have this DLL file (written in C++) that came from a video game that was closed. The DLL converts a special file (proprietary CAD rendering) to a NIF file. I want to be able to convert my own files to NIF format with the DLL. Could somebody write a script to help me call the functions of that DLL? I am using Game Maker 8 Pro. Also, I know ABSOLUTELY no coding in any language, so I may seem a little dense at times. :P
  • 0

#2 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Member
  • 9322 posts
  • Version:Unknown

Posted 17 February 2012 - 11:41 PM

Unless you have the source, the answer is no. You can't just call functions from any DLL in GM. The DLL has to be designed for compatibility with GM (i.e. limiting argument and return types to char* and double, exporting correctly, etc.). If you had the source, someone could create a wrapper DLL which goes in between GM and the final DLL to interpret results. Without the source, that's not likely to happen (possibly, but much more difficult).

Of course, for file conversion, why not just learn the NIF format and write the files yourself with GM's bin functions? Actually, a quick Google search makes it sound like the NIF format is a simple XML format for 3D meshes? If that's the case, there are several extensions that can write XML files easily (since XML is text-based), such as Ether.

-IMP
  • 0

#3 LafBrothers

LafBrothers

    GMC Member

  • New Member
  • 2 posts

Posted 19 February 2012 - 02:10 AM

I don't have the source. But does anyone know how to call Random DLLs? I heard about Alien, but I don't know LUA scriptiog. :(
  • 0

#4 Medusar

Medusar

    GMC Member

  • GMC Member
  • 1228 posts
  • Version:GM:Studio

Posted 19 February 2012 - 10:51 AM

You can't just call random functions from a DLL unless you know things like the calling convention and expected datatypes.. It's not impossible to figure these things out. If you can read ASM and if you know what you're doing.
  • 0

#5 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Member
  • 9322 posts
  • Version:Unknown

Posted 22 February 2012 - 12:50 AM

You can't just call random functions from a DLL unless you know things like the calling convention and expected datatypes.. It's not impossible to figure these things out. If you can read ASM and if you know what you're doing.

While technically true, I almost feel like asking someone to disassemble a DLL, read and understand how it works, and then go back to higher-level coding with that knowledge to make a DLL work with it is borderline trolling :lol: .

-IMP
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users