hsvandrew 23 Posted September 6, 2023 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
hsvandrew 23 Posted September 6, 2023 (edited) 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 September 6, 2023 by hsvandrew Share this post Link to post
David Heffernan 2353 Posted September 6, 2023 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
PeterBelow 239 Posted September 6, 2023 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
David Heffernan 2353 Posted September 6, 2023 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
DelphiUdIT 187 Posted September 6, 2023 You can try PasLibVlc, is a wrapper around VLC made in Pascal. https://prog.olsztyn.pl/paslibvlc/ Share this post Link to post