Re: Can't pass [] to extern function object method

2020-11-19 Thread frame via Digitalmars-d-learn
On Thursday, 19 November 2020 at 07:46:20 UTC, Bastiaan Veelo wrote: On Wednesday, 18 November 2020 at 10:50:12 UTC, frame wrote: I found the "bug". It was caused by a debug {} statement within a struct method. I assume that the debug symbol is just incompatible called from the DLL context.

Re: Can't pass [] to extern function object method

2020-11-18 Thread Bastiaan Veelo via Digitalmars-d-learn
On Wednesday, 18 November 2020 at 10:50:12 UTC, frame wrote: I found the "bug". It was caused by a debug {} statement within a struct method. I assume that the debug symbol is just incompatible called from the DLL context. Were the DLL and main program built in different modes

Re: Can't pass [] to extern function object method

2020-11-18 Thread frame via Digitalmars-d-learn
On Monday, 16 November 2020 at 22:22:42 UTC, frame wrote: On Monday, 16 November 2020 at 21:58:44 UTC, Jack wrote: What is the function prototype like and how are you declaring that struct? The struct is very simple, it contains: I found the "bug". It was caused by a debug {} statement

Re: Can't pass [] to extern function object method

2020-11-16 Thread frame via Digitalmars-d-learn
On Monday, 16 November 2020 at 21:58:44 UTC, Jack wrote: What is the function prototype like and how are you declaring that struct? The struct is very simple, it contains: struct S { SysTime a; ulong b; double c; ubyte[] d; string e; } And I tried: bool foo(S[] params);

Re: Can't pass [] to extern function object method

2020-11-16 Thread Jack via Digitalmars-d-learn
On Monday, 16 November 2020 at 21:31:44 UTC, frame wrote: I have a DLL in D-code which returns an object and want to pass a struct S[] to a member function of that object. The first element is passed correctly, the rest is just garbage. In fact the next item is just a single byte with value

Can't pass [] to extern function object method

2020-11-16 Thread frame via Digitalmars-d-learn
I have a DLL in D-code which returns an object and want to pass a struct S[] to a member function of that object. The first element is passed correctly, the rest is just garbage. In fact the next item is just a single byte with value 0x11 following some 0x00. It doesn't matter if I'm using