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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:08:22+00:00 2026-05-23T19:08:22+00:00

I am trying to call the method with the following declaration: extern C __declspec(dllimport)

  • 0

I am trying to call the method with the following declaration:

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

The structs are defined thus:

    struct ddTableDeal {
  unsigned int cards[4][4];
};

struct ddTableResults {
  int resTable[5][4];
};

I am trying to call it thus:

  <DllImport("dds.dll", CallingConvention:=CallingConvention.StdCall)>
Public Shared Function CalcDDtable(ByVal deal As TableDeal, ByRef results As TableResults) As Integer
End Function

Public Function CalculateDeal() As Integer
    Dim tableDeal As TableDeal
    Dim tableResults As TableResults
    Dim cards(3, 3) As Integer
    cards(0, 0) = 32764
    cards(1, 1) = 32764
    cards(2, 2) = 32764
    cards(3, 3) = 32764
    tableDeal.Cards = cards

    Dim results(4, 3) As Integer
    tableResults=new TableResults
    tableResults.Results = results

    Dim errorCode = CalcDDtable(tableDeal, tableResults)

    Return errorCode
End Function

End Class

Public Structure TableDeal
    Dim Cards(,) As Integer
End Structure

Public Structure TableResults
    Dim Results(,) As Integer
End Structure

The structs should both be twodimensional arrays with indexes of 4,4 and 5,4 respectively. The second one is an out parameter.

Where am I going wrong?

For those who want to know:this is the double dummy solver .dll written by Bo Haglund

  • 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-05-23T19:08:22+00:00Added an answer on May 23, 2026 at 7:08 pm

    The answer can be found here

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

Sidebar

Related Questions

I have the following classes and I am trying to call Compare method from
I am trying to use XmlRpc.NET to call a method with following signature (the
I'm trying to call the following js method. I wish to pass in the
I have the following error while trying to call the save method on managedObjectContext.
Hi I'm trying to call my method offer_bid through the following link_to erb line:-
I am working with ASP.net. I am trying to call a method that exists
I'm trying to call a Sort method that expects a parameter of type IComparer<object>
I am trying to call the .ajax() method when a button with id=go is
I'm trying to call a Page Method using a jQuery 'attached' event function, in
i am trying to call a navite method defined in c++ from java, the

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.