Array over exported dll-class

Nrgyzer nrgyzer at gmail.com
Sat May 22 13:28:31 PDT 2010


Hello everyone,

I'm trying to create a dll file with a class which will be exported. When I import the dll into another file and want create an array over this exported class, I always get "Error: Access Violation".

For example:

mydll2.d:

export class exampleClass {
	export static exampleClass create() { // Would create a exampleClass - when I use "export this()", I'll get a compiling error
		return new exampleClass();
	}
	private this() {
		// do something here
	}
}

mydll.d:

export class exampleClass {
	export static exampleClass create();
}

test.d:

import mydll;

void main() {
	exampleClass[] myClasses;
	myClasses ~= exampleClass.create(); // this doesn't work => Error: Access Violation
}

.... thanks for help :)


More information about the Digitalmars-d-learn mailing list