|
Post by Guilect on Feb 11, 2009 19:56:17 GMT -5
Hi All, small update. Get your copy here (~4.02 Meg): Brutus2D V1.8.7 Download v1.8.7 (Februrary 2009) added encryption back as an option added command .getTotalFrames added command str2ptr
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 12, 2009 8:24:38 GMT -5
Hi,
works ! Thank you.
|
|
|
Post by u9 on Feb 13, 2009 3:32:50 GMT -5
what does str2ptr do, and when would you use it?
|
|
|
Post by Guilect on Feb 13, 2009 7:04:35 GMT -5
The command str2ptr is short for "String to Pointer". This command returns a pointer to a string variable. It is used when calling dll functions with a string as a parameter.
The way dll calls for strings in Brutus2D works is that you need to send a pointer to the string rather than the string itself. The B2D DLL.CallAPI function only accepts numbers as parameters.
So in psuedo code:
Dim a a = "Hello"
DLL.CallAPI "mydll", "myfunction", str2ptr(a)
There are example sources in the examples folder and it is talked about in the help manual under "DLL's".
|
|