xsharp.eu • Variable number of parameters - Page 2
Page 2 of 2

Variable number of parameters

Posted: Thu May 21, 2020 8:54 am
by leon-ts
Robert,
robert wrote: I already confirmed that there is a problem with NULL_PTR
Yes, thanks!
I just made an additional clarification about the type System.Void*, because your post was about System.IntPtr.

Best regards,
Leonid

Variable number of parameters

Posted: Thu May 21, 2020 9:07 am
by leon-ts
I just discovered one more problem. I don’t know if it is related to the previous problem (NULL_PTR), so I will describe it here. If you pass a non-NULL PTR parameter to the function, a FatalExecutionEngineError exception is thrown.

Example (function):

Code: Select all

FUNCTION MyTestFunc(a PARAMS OBJECT[]) AS VOID
	RETURN
Call:

Code: Select all

VAR p := (PTR)0x0234FF01
MyTestFunc( p, "abc", (DWORD)1, NULL_STRING )
Best regards,
Leonid

Variable number of parameters

Posted: Thu May 21, 2020 1:33 pm
by robert
Leonid,

The Ptr problems are now solved. When a Intptr, void* or any pointer at all is assigned to an object it is now "boxed". And when it assigned back it is "unboxed".

Robert

Variable number of parameters

Posted: Thu May 21, 2020 1:37 pm
by leon-ts
Robert,

This is very good news! Thanks!

Best regards,
Leonid