Access violation when calling C DLL from D

AnoHito via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 2 16:21:30 PST 2015


Okay, I finally got it working. The problem was that mrb_value 
needed to be fully defined in order for my code to work, because 
it was being passed on the stack directly instead of by a pointer:

struct mrb_value
{
	union
	{
		mrb_float f;
		void* p;
		mrb_int i;
		mrb_sym sym;
	}
	mrb_vtype tt;
}


More information about the Digitalmars-d-learn mailing list