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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:49:29+00:00 2026-05-21T05:49:29+00:00

Im trying to wrap an older dll and am running into issues representing a

  • 0

Im trying to wrap an older dll and am running into issues representing a structure it uses in C#. Nothing I have tried seems to be working. Any magicians able to help?

typedef struct _PARAM_BYNAME_DATA 
{ 
    n_char *szPntName; /* (in) point name */ 
    n_char *szPrmName; /* (in) parameter name */ 
    n_long nPrmOffset; /* (in) parameter offset */ 
    PARvalue *pupvValue; /* (in/out) parameter value union */ 
    n_ushort nType; /* (in/out) value type */ 
    n_long fStatus; /* (out) status of each value access */ 
} PARAM_BYNAME_DATA; 

If it helps the below is a VB port.

Type param_byname_data 
    point_name As String
    param_name As String
    param_offset As Long
    padding1 As Long 'for byte alignment between VB and C 
     param_value As Variant
    param_type As Integer
    padding2 As Integer 'for byte alignment between VB and C 
    status As Long status As Long 
End Type

And the following Delphi as well…

PARAM_BYNAME_DATA=record
    PntName:pchar;       // (in) point name
    PrmName:pchar;       // (in) parameter name
    PrmOffset:longword;  // (in) parameter offset
    pValue:pointer;      // (out) parameter value union
    nType:word;          // (out) value type
    fStatus:longword;    // (out) status of each value access */
end;
  • 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-21T05:49:30+00:00Added an answer on May 21, 2026 at 5:49 am

    The struct should look something like this…

    [StructLayout(LayoutKind.Sequential)]
    public struct MyStruct
    {
        public string point_name;
        public string param_name;
        public Int32 param_offset;
        public VariantWrapper param_value;
        public Int32 param_type;
        public Int32 status;
    };
    

    Here is a good article that talks about structs and alignment that should help. The main thing is the struct layout and the bit alignment. It has been a while since I have had to marshal values out of C++ but I hope this helps.

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

Sidebar

Related Questions

I'm trying to wrap my head around asp.net. I have a background as a
I am trying to wrap selected nodes in a non-trivial structure, where the node
I'm trying to wrap my head around reflection, so I decided to add plugin
I've been trying to wrap my head around how threads work in Python, and
I'm trying to wrap my head around creating a toolbar (a tool band in
I'm trying to wrap my head around SharePoint. Why is it good? Why is
I'm trying to wrap my head around the roles of UIViews and UIViewControllers. If
I'm trying to wrap my head around the best way to use IoC within
I'm trying to wrap my head around functional programming in ruby and there doesn't
I am trying to wrap my head around doing validation in a MVC scenario.

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.