PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

NEWBIE: PocketFrog & ATL

Just a quick question, is it possible to use PF without ATL?

Cheers.

Phil.
I don't know of a way to do that without modifying PF source code.

It took me about a day to do that and I needed to add some specific stuffs. So if you only need to get rid of ATL, it shouldn't be too difficult.

Note that ATL source code is available in the SDK which helps :)
Why would you want to remove ATL from PocketFrog?
Kzinti wrote:Why would you want to remove ATL from PocketFrog?

I don't really want/need to remove the ATL code from PF, it's just that I'm learning windows programming/CE AND C++ all at the same time. If I could get away without getting my head around ATL as well it would make things just a little easier.

Thanks.

Phil.
ATL is much easier then Win32. But I understand it can be a lot to absorb in one shot. Might be easier to ignore it then try to remove it.
Kzinti wrote:Why would you want to remove ATL from PocketFrog?


In my opinion, there's at least 2 reasons (which are the ones for which I did it).

1) Optimization:
I saved from 1 to 4 fps after replacing the ATL stuffs by Win32 ones.

2) The CComModule object:
The fact that its needed to compile PF projects makes it difficult to build your own DLL on top of PF.
Marcus wrote:1) Optimization:
I saved from 1 to 4 fps after replacing the ATL stuffs by Win32 ones.


Can you elaborate on that one? 200 to 204 FPS? or 10 to 14 FPS? Why would ATL be any slower then straight Win 32?

Marcus wrote:2) The CComModule object:
The fact that its needed to compile PF projects makes it difficult to build your own DLL on top of PF.


How so?
Kzinti":1a7xnsq5]
Marcus wrote:1) Optimization:
I saved from 1 to 4 fps after replacing the ATL stuffs by Win32 ones.


Can you elaborate on that one? 200 to 204 FPS? or 10 to 14 FPS? Why would ATL be any slower then straight Win 32?

As far as I can remember (it's quite old now), it was something like 160->164 for the iPAQ H3900 and 16->17 for the Acer n310. If you need accurate figures, I will do some benchmarking soon...

Kzinti wrote:[quote="Marcus wrote:2) The CComModule object:
The fact that its needed to compile PF projects makes it difficult to build your own DLL on top of PF.


How so?


When you build a DLL or an EXE with PF, you need to instanciate that COM server (if not, you get an unresolved external symbol).

So, when building a DLL on top of PF you provide an instance of that _Module. And when building the application that will use this DLL, you provide a 2nd instance of _Module. Depending on what you export or not, you end up with either a duplicate symbol at link or 2 servers.
Marcus wrote:As far as I can remember (it's quite old now), it was something like 160->164 for the iPAQ H3900 and 16->17 for the Acer n310. If you need accurate figures, I will do some benchmarking soon...


I have a hard time believing that, but ok... I will take your word for it. I'll also investigate it at one point.


Marcus wrote:When you build a DLL or an EXE with PF, you need to instanciate that COM server (if not, you get an unresolved external symbol).

So, when building a DLL on top of PF you provide an instance of that _Module. And when building the application that will use this DLL, you provide a 2nd instance of _Module. Depending on what you export or not, you end up with either a duplicate symbol at link or 2 servers.


Only the module using PF needs an instance of _Module... It's not like you need ATL or _Module in every DLL and the EXE... ? And even if you did, this isn't going to cause any problem. Unless you start using PF class instances accross DLLs... But that's a design issue. There are tons of apps out there using ATL and DLLs and COM servers and they don't seem to have any problem with it. If there is something in PF that breaks this, I'd love to know what.