Jump to content
hsvandrew

VLC Player 64bit

Recommended Posts

Does anyone have VLC player (the 64bit DLL) working in Delphi?
I load the 64bit DLL like this
DLL := ‘C:\Program Files\VideoLAN\VLC\libvlc.dll’;
FDllHandle := LoadLibrary(PChar(ExtractFilePath(DLL)+‘libvlccore.dll’));
FDllHandle := LoadLibrary(PChar(DLL));

But all the GetAProcAddress functions fail, even though I can see the exports in the DLL.

Share this post


Link to post

For the future benefit of anyone having a similar problem, here is the solution and possible keywords for resolution.

The code/freeware/project I was using was uTLibVLC
FDllHandle was declared as an integer. I suspect the clue to help me realise there was a problem was that LoadLibrary for the libvlc.dll resulted in a negative integer whereas the other DLL's had positive handles i.e. integer overflow

Changing FDllHandle    : integer; to FDllHandle    : HMODULE; fixed the problem.

Edited by hsvandrew

Share this post


Link to post

Negative integer wouldn't be a problem per se. A DLL loaded between 0x80000000 and 0xffffffff would be negative when interpreted as a signed integer.

Share this post


Link to post
3 hours ago, David Heffernan said:

Negative integer wouldn't be a problem per se. A DLL loaded between 0x80000000 and 0xffffffff would be negative when interpreted as a signed integer.

The problem in this case was that integer is 32 bit but the load address of a 64 bit DLL is 64 bits when loaded from a 64 bit project.

Share this post


Link to post
22 minutes ago, PeterBelow said:

The problem in this case was that integer is 32 bit but the load address of a 64 bit DLL is 64 bits when loaded from a 64 bit project.

I know what the problem is. My point is that a negative value in a signed integer that is actually holding a pointer, does not imply that a 64 bit value was stored in a 32 bit type.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×