Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / 64Bit font loading question

Author
Message
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 08:32
Simple question for any 64 bit users:
Does the "gdi32.dll" exist in some version in your system directory?

Using this dll on 64 bit systems crashes my game...

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Oct 2011 15:08
Do not load the DLL using a full pathname - you will be loading the 64 bit version, and mixing 32 bit with 64 bit just doesn't work.

Try just using "gdi32.dll" as the name and let the OS find the 32 bit version for you.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 15:13
Here is the code I'm using:


Not sure why that wouldn't work...?

Booma
17
Years of Service
User Offline
Joined: 29th Mar 2009
Location:
Posted: 27th Oct 2011 18:31
@baxslash

try this link:
Fix gdi32.dll error
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 18:47
That site is trying to sell some dll 'fixing' software. Not really a solution but thanks anyway

It looks like this dll has a problem on 64 bit as it references other windows dll's and one of these is referenced twice on 64 bit so the dll doesn't know which one to use (or something along these lines).

Seems like I might be better looking for a method of installing the font with my game installer. I have another couple of options I haven't tried yet. If I find a solution I'll post it here...

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Oct 2011 20:31
The code works fine. You didn't unload the font before you switched to another font did you? (Although that still works safely for me).

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 20:43
Quote: "The code works fine. You didn't unload the font before you switched to another font did you? (Although that still works safely for me)."

Really? On 64 bit W7?

If so then I'm really confused...

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Oct 2011 22:47
Windows 7 Premium, SP1.

Try the updated version. It loads the font specifically for the current program only, meaning that when the program ends, then font is unloaded automatically (which was a problem for that original code of mine you are using).



baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 23:20
Thanks IanM! I'll give that a try

Login to post a reply

Server time is: 2026-07-11 09:49:15
Your offset time is: 2026-07-11 09:49:15