t57042 wrote:Somebody knows how to adapt the PROTOTYPE in this function?
Code: Select all
;============================<[ Sel Str ]>============================= ;Declare Sub sluSelStr lib "SQLiteningU.Dll" alias "sluSelStr" ( _ ; byval Statement As Long, _ ; byval ModChars As Long, _ ; byval FieldsAndRows As Long, _ ; byref SizeOfFieldsAndRows As Long) ; Statement is a pointer to a null-terminated string. ; ModChars is a pointer to a null-terminated string. If not needed you ; may pass a zero. ; FieldsAndRows is a pointer to the memory which will receive the fields ; and rows. The fields and rows are returned as a $VT:$BS ; delimited text string. ; SizeOfFieldsAndRows is both passed and returned. Pass the size of ; FieldsAndRows. It must be at least the size of ; the returning fields and rows. The actual length ; of the returing fields and rows is returned. ; If the passed size is too small then the returning ; length will be set to -1. Prototype sluSelStr(Statement.p-ascii, ModChars.p-ascii , FieldsAndRows.p-ascii, d)
Code: Select all
Prototype sluSelStr(Statement.p-ascii, ModChars.p-ascii , *FieldsAndRows.Ascii, *SizeOfFieldsAndRows.Long)
Code: Select all
len.l = 10000
buffer.i = AllocateMemory(len)
sluSelStr(Statement$, ModChars$, buffer, @len)
If len = -1
; buffer too small
Else
s.s = PeekS(buffer,-1,#PB_Ascii)
EndIf
FreeMemory(buffer)