Esempio n. 1
0
Drone* DroneDBE::createDrone(){
	if (!mDll){
		throw("Drone class should never be instanciated without an associated DLL");
	}else{
		typedef Shmoulette::Drone* (__cdecl* DLLDroneCallback)();
		DLLDroneCallback dllFunc = (DLLDroneCallback)::GetProcAddress(mDll, "getInstance");
		Drone* d = dllFunc();
		d->init(this);
		if (mPythonCallback != ""){
			d->setPythonCallback(mPythonCallback);
		}
		return d;
	}
}