[6.10 b1] OpenLibrary() problem

Just starting out? Need help? Post your questions and find answers here.
User avatar
Otrebor
Enthusiast
Enthusiast
Posts: 211
Joined: Mon Mar 17, 2014 1:42 pm
Location: São Paulo, Brasil
Contact:

[6.10 b1] OpenLibrary() problem

Post by Otrebor »

Using Win10 Pro
PureBasic 6.10 b1 - x86

OpenLibrary() fail with wd1793.dll (32 bit dll).
Works with version 6.0x.


// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [6.10 b1] OpenLibrary() problem

Post by Fred »

We didn't change anything about OpenLibrary(), could you put the file to download somewhere ?
User avatar
Otrebor
Enthusiast
Enthusiast
Posts: 211
Joined: Mon Mar 17, 2014 1:42 pm
Location: São Paulo, Brasil
Contact:

Re: [6.10 b1] OpenLibrary() problem

Post by Otrebor »

Yes. I uploaded the file to Google Drive. Thanks!

https://drive.google.com/file/d/17ujZX ... p=sharing
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: [6.10 b1] OpenLibrary() problem

Post by fryquez »

This is not a PureBasic problem, that dll just crashes the program.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: [6.10 b1] OpenLibrary() problem

Post by infratec »

With PB 6.04 x86 I get Ok.

Code: Select all

If OpenLibrary(0, "wd1793.dll")
  Debug "Ok"
  CloseLibrary(0)
Else
  Debug "Failed"
EndIf
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: [6.10 b1] OpenLibrary() problem

Post by mk-soft »

Not open with PB v6.10 B2 but with v6.04
Perhaps move back to bug report
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [6.10 b1] OpenLibrary() problem

Post by Fred »

It's a linker issue, when using polink.exe it works, while when using link.exe it doesn't work. Why the linker is impacting LoadLibrary_() is a mystery to me but my bet is the DLL is too old for new exe.

Code: Select all

Debug LoadLibrary_("wd1793.dll")

If OpenLibrary(0, "wd1793.dll")
  Debug "Ok"
  CloseLibrary(0)
Else
  Debug "Failed"
EndIf
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

Re: [6.10 b1] OpenLibrary() problem

Post by juergenkulow »

Code: Select all

LoadLibrary_("D:\wd1793.dll")
Debug GetLastError_()
End 
; 998
; ERROR_NOACCESS 998 (0x3E6) Invalid access to memory location.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4991
Joined: Sun Apr 12, 2009 6:27 am

Re: [6.10 b1] OpenLibrary() problem

Post by RASHAD »

Both OpenLibrary() and LoadLibrary_() works fine with PB 6.04 x86 Windows 11 x64
Using DIE next is the information about wd1793.dll
- Operation system: Windows(XP)[I386, 32-bit, DLL]
- Packer: ASPack(2.12-2.42)[-]
- Compiler: Borland Delphi(-)[-]
- Linker: Turbo Linker(2.25*,Delphi)[DLL32]
Egypt my love
User avatar
Otrebor
Enthusiast
Enthusiast
Posts: 211
Joined: Mon Mar 17, 2014 1:42 pm
Location: São Paulo, Brasil
Contact:

Re: [6.10 b1] OpenLibrary() problem

Post by Otrebor »

HI
The dll that was using is 41kb. After a search i found another with 64kb (link bellow). I don't know which one is older. Most important, works with PB 6.1!
https://drive.google.com/file/d/1qxgUa ... p=sharing
Well, this solve the problem.
Thank you!
User avatar
Otrebor
Enthusiast
Enthusiast
Posts: 211
Joined: Mon Mar 17, 2014 1:42 pm
Location: São Paulo, Brasil
Contact:

Re: [6.10 b1] OpenLibrary() problem

Post by Otrebor »

Hi
Just to report that with beta 9 OpenLibrary() works again with wd1793.dll (both files).
The initial problem with beta 1 was solved.
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [6.10 b1] OpenLibrary() problem

Post by Fred »

True, because we switched back the linker to polink. I don't know exactly why.
Post Reply