[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamic_cast problem
From: |
Ulrich Eckhardt |
Subject: |
Re: dynamic_cast problem |
Date: |
Sat, 03 Jul 2004 14:28:30 +0200 |
User-agent: |
KNode/0.7.6 |
KeithO wrote:
> extern "C" DestinationImpl * getDestinationImpl(void);
> MODULE_HANDLE fn = (void *(*)())dlsym(hdll, "getDestinationImpl");
The functiontypes don't match. Further, I'd use a typedef(at least for your
readers). Also consider that this cast is not valid, neither in C nor C++.
Take a look at comp.lang.c++.moderated, there was a thread started by me
that explains the details.
BTW: why pass around a void*? Your lib could as well declare the struct
class and export a function returning a pointer to it.
Uli