digitalmars.D.learn - Array over exported dll-class
- Nrgyzer (23/23) May 22 2010 Hello everyone,
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 :)
May 22 2010