Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8697823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:36:43+00:00 2026-06-13T01:36:43+00:00

I have converted all of the VB.NET DLL declarations Declare Function SFileOpenArchive Lib Storm.dll

  • 0

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:

  1. the DLL is stored in the same directory as the application
  2. the functions I have declared exist (I was given the source code which was coded in VB.NET)

What can I do to fix this error?

Thank you in advanced.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:36:44+00:00Added an answer on June 13, 2026 at 1:36 am

    You have the following problems that I can see:

    1. The function has been exported by ordinal rather than name. You need to specify the ordinal in your Delphi code.
    2. The first parameter should be PAnsiChar rather than a Delphi string. The VB code uses string to instruct the marshaller to pass a null-terminated string. As a rule of thumb, it’s almost always a mistake to include a Delphi managed stype like string in a DLL import or export.
    3. The final parameter is passed by reference. That’s a Delphi var parameter.
    4. The return value should be BOOL, I think, but that probably won’t be causing you trouble.

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, i have converted some C# PayPal API Code over to VB.net. I
I am converting from vb5 and have a dll (now converted to VB.NET) which
I have this function that converts all special chars to uppercase: function uc_latin1($str) {
I have converted a php to asp.net mvc and have it hosted with the
I have an ASP.net Web Site Project (.net 3.5). Currently all of the non-code
I have a project converted from .NET 1.1 to 3.5 being developed in 2008.
I have a .NET (3.5 SP1) library (DLL) written in C#. I have to
I have this bit of code that is being converted from vb6 to vb.net.
I have an third part dll that have a function that returns a string.
All our apps have been converted to use StructureMap, and our libraries were converted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.