PocketMatrix forums

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

dll problems

I'm hoping someone can give me some ideas on a problem. For my game Realms, I have all the image and sound data in a big 5.75MB dll file. For some reason LoadLibrary(...) is returning NULL on a Fujitsu-Siemens Loox-600. A beta tester using this same device told me he has had no problems so I know it's not a problem with that pocket pc type.

The user with the problem device also tried using the dll from the demo which is only around 3MB. This loaded fine without any problems, so I thought they might not have enough free memory, but this user has over 16MB of program memory free.

Anyone have any ideas of why this dll file would not be loading?

Thanks.
Tell him to do do a hard reset and back up his data. In that order. :twisted:


Seriously though, just have him back up his data and hard reset. It can't be a device issue, because like you said it worked on your beta testers device. He or some other program has messed something up in the OS or something. Hell, ask him if he even has tried a soft reset. Also ask him if his 16MB of data is allocated to storage memory or program memory.
Yea, they did the hard reset, but apparently that didn't fix the problem either. I'm out of ideas at this point. I even sent them a new dll file of the full version incase their's was corrupted but that didn't help either.
Have him checksum the file, perhaps it's getting corrupted? This happened to me, no matter how many times I downloaded it from how many people, the file would always come out with the wrong checksum, and thus be corrupted. I ended up downloading the file onto my Linux box, and doing everything on there.
That's what I thought too. I had dismissed this possibilty when the new dll file I sent didn't work, but it sounds like this person is having the same problem that you experienced.

I've never heard of checksum. How do I test a file with it? Thanks for your help!
Read the section in this article about DLL load order on Pocket PCs.

Windows CE.Net Advanced Memory Management
Why don't you call GetLastError after LoadLibrary fails to determine why it failed?

Dan East
Digby, the second sentence in that document contains the word "leverage" used as a verb. That tired, cliché word has been so overused in corporate techno-babble that the mere glimpse of it makes me nauseous.

You know, the other day while at the grocery store I overhead the person in front of me checking out. The cashier said "That comes to $7.95, how would you like to leverage funds against that?" The customer replied "I'm going to leverage my bank card today. Oh, and please leverage paper packaging material against my purchases." Yep, I hear the word "leverage" used every friggin day in the real world.

Sorry, just had to get that out.

Dan East
Heh... yeah, exactly what a technical article about OS internal architecture needs - more marketing babble.

Lots of similarly humorous blather here.
I know this probably won't work, but have you tried zipping the .dll into a .zip or .rar file? I know that browsers sometimes mess up .exe files so developers put them in .zip files and they don't get corrupted then. Maybe it's the same with .dll files.
Thanks for the suggestion Dan. I called GetLastError right after I called LoadLibrary and this is the message that GetLastError is giving the user.

<b>Cannot create a file when that file already exists.</b>

Apparently, LoadLibrary isn't returning NULL anymore after they performed the hard reset, so possibly this error has to do with something else? I not writing any files, so I don't really understand it.

Thanks for idea TechMage, but they already downloaded the new files in a zip from my site.
Hmm. Are you loading the dll more than once? That may result in an ERROR_ALREADY_EXISTS error.

Dan East
No, I'm only calling LoadLibrary once.
That's odd. Try creating a test app that only loads that DLL and does nothing else, and let that user give it a try.

Dan East
domls · 26 Apr 2003, 00:43 UTC — dll load error
Please see my new topic posted today 4/25.

The dll can't load due to 16MB memory-mapped limitation in PPC 2002 per the article mentioned above.
Hey, thanks for the info. It's nice to know why this happening! A couple more people reported this problem with Realms later on as well. I wish I had a better solution, but the only way I solved this problem was to make the size of my dll 2.5 mb and shove the rest of the data into my now bloated exe file. After I did this Realms worked on all the problem devices.