about dll troubles and how i was stupid

Everything else that doesn't fall into one of the other PB categories.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

about dll troubles and how i was stupid

Post by blueznl »

it's not entirely purebasic (or not purebasic at all in a way) but here's a tip for those struggling with dll's...

situation:

- i tried to open wintab dll on my machine, but the application crashed
- i tried to open another dll, crashed as well (on openlibrary())
- on another machine, tried to open wintab, another crash
- it did work before, i changed nothing, i was baffled
- opening any 'automatically opened' dll's (such as kernel32) worked

after quite some time and a lot of stress i found out the following...

- on machine 1 there was a dll corrupted...

this one single dll that was corrupted (and which had nothing to do with wintab, not even usb related, and it shouldn't even be in use) caused *very* strange issues when opening up some other dll... it turned out to affect a number of dll's but not all (beats me why)
- replaced the dll, done

why didn't it work on the other machine then?

- not all dll's can be loaded when the hardware isn't attached!

this may sound logical, but i didn't think about it... i had been working on the capi2032.dll, which you can open without any hardware attached... wintab32.dll however returns a zero on opening... i was expecting an error when starting to use a function (like initializing) from wintab, not when just opening the dll...

well, the above is just for your information, so you don't have to feel stupid when you make some kind of mistake (no problem, inner :-))



symptom: can't open *any* (or simply many :-)) external dll
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )