Hard Light Productions Forums

Off-Topic Discussion => Programming => Topic started by: blackhole on November 11, 2009, 03:46:55 am

Title: Undocumented Features
Post by: blackhole on November 11, 2009, 03:46:55 am
Undocumented features are so nice. Like this little one in Raknet where ALMOST NOTHING F*CKING WORKS IF YOU COMPILE IT AS A DLL

*screams in rage*

I would really appreciate it if they actually mentioned this somewhere instead of making you believe that you can use more then the bare-bones functionality in the DLL.
Title: Re: Undocumented Features
Post by: portej05 on November 11, 2009, 04:09:59 am
In what way doesn't it work?, and it sounds like there's been a mistake in linking.
Title: Re: Undocumented Features
Post by: blackhole on November 11, 2009, 02:36:46 pm
well what happens is that it's been exported with __declspec(dllexport) but not imported with __declspec(dllimport), which means you can't create any of the classes inside your DLL or it'll explode when you try to delete them. Hence you have to use the built in factory class to build and destroy the classes for you. Said factory only actually lets you build/create about 15 classes, so if you use any other class, your f*cked >C
Title: Re: Undocumented Features
Post by: Bobboau on November 13, 2009, 02:39:12 am
or you can let yourself have a memory leak, or do something really crazy like manual memory management.
Title: Re: Undocumented Features
Post by: blackhole on November 13, 2009, 04:51:40 am
or you can let yourself have a memory leak, or do something really crazy like manual memory management.

I'm not sure if even that would work, because it would likely choke up when you manually invoked the constructor/destructor.
Title: Re: Undocumented Features
Post by: Bobboau on November 14, 2009, 10:24:32 pm
only one way to find out.
Title: Re: Undocumented Features
Post by: blackhole on November 14, 2009, 11:11:13 pm
only one way to find out.

Or I could just use the static lib.
Title: Re: Undocumented Features
Post by: Aardwolf on November 25, 2009, 03:35:07 am
Make a dll out of the lib?
Title: Re: Undocumented Features
Post by: blackhole on November 25, 2009, 12:33:30 pm
Make a dll out of the lib?

I could switch over the code to __declspec(dllimport), which would take something like 2 hours.

...or I could just use the static lib. :p
Title: Re: Undocumented Features
Post by: Bobboau on November 30, 2009, 02:41:06 am
oh, your no fun at all
Title: Re: Undocumented Features
Post by: blackhole on November 30, 2009, 04:36:50 am
oh, your no fun at all

Not yet :p