Reputation: 2110
I have converted all of the VB.NET DLL declarations
Declare Function SFileOpenArchive Lib "Storm.dll" Alias "#266" (ByVal lpFileName As String, ByVal dwPriority As Integer, ByVal dwFlags As Integer, ByRef hMPQ As Integer) As Boolean
over into Delphi.
function SFileOpenArchive(lpFileName: String; dwPriority, dwFlags, hMPQ: Integer): Boolean; stdcall; external 'Storm.dll';
However, when I call the functions and compile the program I get the following error:
The procedure entry point SFileOpenArchive could not be located in the dynamic link library Storm.dll.
I have ensured that:
What can I do to fix this error?
Thank you in advanced.
Upvotes: 2
Views: 4200
Reputation: 613461
You have the following problems that I can see:
Put it all together like this:
function SFileOpenArchive(lpFileName: PAnsiChar;
dwPriority, dwFlags: Integer; var hMPQ: Integer): BOOL;
stdcall; external 'Storm.dll' index 266;
Note that I'm not 100% sure that the text encoding is ANSI. However, the main blockage for you was the ordinal import. I hope I've cleared that for you. I trust you can resolve the remaining details.
Upvotes: 4