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 8706157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:32:45+00:00 2026-06-13T03:32:45+00:00

I am using a third party C++ dll which uses a function that has

  • 0

I am using a third party C++ dll which uses a function that has the following signature:

extern "C" __declspec(dllimport) int __stdcall CalcDDtable(struct ddTableDeal tableDeal, 
    struct ddTableResults * tablep);

The structs each contain just one fixed one dimensional array of ints (VB6 Longs). tablep will contain the results.

Had the C++ declaration been:

extern "C" __declspec(dllimport) int __stdcall CalcDDtable(int * tableDeal, int * tablep);

then the VB6 Declare statement would have been:

Declare Function CalcDDtable Lib "my3rdParty.dll"(ByRef lngTable as Long,ByRef lngResult as Long) as int
This code would be called like:
Dim lngTables(15) As Long
Dim lngResults(20) As Long

'Initialize the lngTables array...

intResult=CalcDDtabel(lngTables(0),lngResults(0))

But I am at a loss how to declare the function above since the first array is packaged in a struct that is not a pointer.

  • 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-13T03:32:47+00:00Added an answer on June 13, 2026 at 3:32 am

    You can’t pass structures by value from VB6 to a DLL. The tableDeal structure is by value (not a pointer) so I am not sure what you can do there.

    You can pass structures by reference and they can contain fixed-length arrays, so your second arg would be ok. In fact if it only contains a fixed-length array of ints, you could just pass a fixed-length VB6 long array as in the second part of your question.

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

Sidebar

Related Questions

I'm using a third party library which has a blocking function, that is, it
I'm using a third party static library in my C++ project that has a
I am using a third party dll built with VS2008 that relies on msvcr90.dll
We have a dll which uses a third party component, with embedded licence file
I have a third-party product, a terminal emulator, which provides a DLL that can
I have the following situation: I am using a third party .net library which
There is a bug in a third party .DLL file that we're using and
I am using a third party .Net dll in my code and when I
We are using a Third-Party assembly that seems to be compiled as AnyCPU. However,
My company provides a third party with a DLL which provides them with API

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.