PDA

View Full Version : VB and .dll's



|-|1Pp13
16-11-2007, 01:45 PM
All and any questiona about VB or using .dll's in GM.

Happy posting and hopefully someone can help you.
(not me, i have more questions than answers :p)

|-|1Pp13
16-11-2007, 01:50 PM
Can a dll only return a String or Real?

It cant do anything else?

01DT!m3r
16-11-2007, 02:38 PM
according to the help file yes the a dll can only return a real or string

|-|1Pp13
16-11-2007, 03:37 PM
thanx brad.....i was looking for help from someone who might have actually used a dll

|-|1Pp13
16-11-2007, 05:14 PM
In VB you can save and write information to a database.
Can you do this in a .DLL and use the information from the database for use in GM?

(Storing or Retrieving data from/to a database)

|-|1Pp13
16-11-2007, 06:02 PM
its just a simple timer...
i was just playin around. the next version will have a alarm

http://www.gamedev.za.net/filecloset/data/files/266/Timer

dislekcia
17-11-2007, 02:29 AM
Can a dll only return a String or Real?

It cant do anything else?

Yep. That's all you can return back to GM. The reason for this should be clear when you consider the problems of passing things like structs around between apps.


In VB you can save and write information to a database.
Can you do this in a .DLL and use the information from the database for use in GM?

(Storing or Retrieving data from/to a database)

Well, all you can send to and from GM are reals and strings. So you could write a database access dll (several people on the GM forums have done that, actually) and then send what you want written to the DB to the dll. Then when you want to retrieve info from the DB, you could either send the SQL query string from GM to the DLL and return a comma-delimited string of the results, or you'd have to make things a little more complex:

Functions to create a result set and return an identifier for it.
Functions to return the size of a given result set (via GM passing the identifier to the DLL).
Functions to return a specific element of the result set, return the names of the datafields, etc.

-D

|-|1Pp13
17-11-2007, 09:42 AM
thanx dislekcia!

|-|1Pp13
17-11-2007, 10:32 PM
Well, all you can send to and from GM are reals and strings. So you could write a database access dll (several people on the GM forums have done that, actually) and then send what you want written to the DB to the dll.

-D

i did a forum search but came up empty handed...can you please refer to me to these people/posts?

SkinkLizzard
17-11-2007, 10:40 PM
GM forums
:)
http://gmc.yoyogames.com/

|-|1Pp13
17-11-2007, 10:54 PM
whoopsie...my bad :D