Core Function DLLStructCreate
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> DLLStructCreate( <def string> ) </pre> === Description === Creates a C/C++ style structure to be used with DLLCall === Parameters === ==== def string ==== A string re...") |
(→Remarks) |
||
Line 48: | Line 48: | ||
double signed 64 bit floating point double | double signed 64 bit floating point double | ||
− | Note - There is no *string* type instead | + | Note - There is no *string* type instead; |
+ | You must create an array of chars example "char mystring[500]" | ||
+ | then you can use it like a string. | ||
</pre> | </pre> | ||
Revision as of 08:46, 29 November 2011
DLLStructCreate( <def string> )
Contents |
Description
Creates a C/C++ style structure to be used with DLLCall
Parameters
def string
A string representing the structure to create (See Remarks).
Return Value
Success - Returns the DLLStruct.
Failure - Returns 0 and most likely throws exception.
Remarks
Each data type must be separated by a semi-colon ';'.
Create arrays by adding '[size]' after the data type.
DllStructCreate("int;char[128]").
An elementname can be added similar to a C-style declaration DllStructCreate("int n;char buffer[128]").
def string settings
[TYPE] [WHAT IT RETURNS WITH DLLSTRUCTGETDATA] [WHAT IS IT IN C++] ubyte unsigned 8 bit integer char byte signed 8 bit integer char char a single ASCII character char short signed 16 bit integer short int16 signed 16 bit integer short int signed 32 bit integer int int32 signed 32 bit integer int int64 signed 64 bit integer __int64 ushort signed unsigned 16 bit integer unsigned short uint16 signed unsigned 16 bit integer unsigned short uint signed unsigned 32 bit integer unsigned int uint32 signed unsigned 32 bit integer unsigned int uint64 signed unsigned 64 bit integer unsigned __int64 float signed 32 bit floating point float double signed 64 bit floating point double Note - There is no *string* type instead; You must create an array of chars example "char mystring[500]" then you can use it like a string.