Why OpenLibrary() fails?

Just starting out? Need help? Post your questions and find answers here.
rotacak
User
User
Posts: 77
Joined: Tue Feb 14, 2006 2:00 pm

Why OpenLibrary() fails?

Post by rotacak »

Hello,

can anyone help me with OpenLibrary()? Why this 32 bit dll cannot be opened in 5.70 LTS x86?

This will print "0":

Code: Select all

Debug OpenLibrary(0, "e:\dev\x264grabtest\libx264-157.dll")
I can open another library, but not this one.

Download dll: http://www.mediafire.com/file/dl1g9vg44 ... 7.dll/file
fryquez
Enthusiast
Enthusiast
Posts: 362
Joined: Mon Dec 21, 2015 8:12 pm

Re: Why OpenLibrary() fails?

Post by fryquez »

The dll have dependencies, try SetCurrentDirectory() before you open it..

Code: Select all

SetCurrentDirectory("e:\dev\x264grabtest\")
Debug OpenLibrary(0, "e:\dev\x264grabtest\libx264-157.dll")
rotacak
User
User
Posts: 77
Joined: Tue Feb 14, 2006 2:00 pm

Re: Why OpenLibrary() fails?

Post by rotacak »

fryquez wrote:The dll have dependencies, try SetCurrentDirectory() before you open it..

Code: Select all

SetCurrentDirectory("e:\dev\x264grabtest\")
Debug OpenLibrary(0, "e:\dev\x264grabtest\libx264-157.dll")
Hmm, still not work. Is there any way how to show some error message, why it is not opened?
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Why OpenLibrary() fails?

Post by User_Russian »

For libx264-157.dll needed libgcc_s_dw2-1.dll.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Why OpenLibrary() fails?

Post by infratec »

You can use depends.exe 'Dependency Walker' to see that LIBGCC_S_DW2-1.dll is needed beside the LIBX264-157.dll
rotacak
User
User
Posts: 77
Joined: Tue Feb 14, 2006 2:00 pm

Re: Why OpenLibrary() fails?

Post by rotacak »

Also libwinpthread-1.dll is needed by libgcc_s_dw2-1.dll. I used 'Dependency Walker' and I finally can open that dll. Thank you guys.
Post Reply