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

  • SEARCH
  • Home
  • 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 543107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:31:00+00:00 2026-05-13T10:31:00+00:00

I have a dll for a c++ class (SLABHIDDevice.dll). I am trying to use

  • 0

I have a dll for a c++ class (SLABHIDDevice.dll). I am trying to use the functions of this dll in a C#.net application. The dll contains several methods which I can use easily with statements such as this…

(I appolagize if i get some of the terminology wrong here I am new to using dlls)

[DllImport("SLABHIDDevice.dll")]
        public static extern byte GetHidString
            (Int32 deviceIndex, Int32 vid, Int32 pid,
            Byte hidStringType, String deviceString, 
            Int32 deviceStringLength);

The documentation for SLABHIDDevice.dll says that it also contains a class object, CHIDDevice.
and that object has a whole list of member functions such as Open();

If I try to import Open() using the same syntax as above, I get an error saying that it can not find an entry point for the Open() function. Is this because Open() is a member of CHIDDevice?

This is the makeup of the dll from DUMPBIN… The bottom three functions are the only ones I am able to get to work? Does anyone know what syntax I need to use to get the other ones? What do the question marks mean that precede the function names?

Dump of file SLABHIDDEVICE.dll

File Type: DLL

  Section contains the following exports for SLABHIDDevice.dll

    00000000 characteristics
    47E13E0F time date stamp Wed Mar 19 12:23:43 2008
        0.00 version
           1 ordinal base
          26 number of functions
          26 number of names

    ordinal hint RVA      name

          4    0 00001000 ??0CHIDDevice@@QAE@ABV0@@Z
          5    1 00001330 ??0CHIDDevice@@QAE@XZ
          6    2 00001430 ??1CHIDDevice@@UAE@XZ
          7    3 00001080 ??4CHIDDevice@@QAEAAV0@ABV0@@Z
          8    4 00020044 ??_7CHIDDevice@@6B@
          9    5 00001460 ?Close@CHIDDevice@@QAEEXZ
         10    6 00001C70 ?FlushBuffers@CHIDDevice@@QAEHXZ
         11    7 00001CA0 ?GetFeatureReportBufferLength@CHIDDevice@@QAEGXZ
         12    8 00001850 ?GetFeatureReport_Control@CHIDDevice@@QAEEPAEK@Z
         13    9 00001C80 ?GetInputReportBufferLength@CHIDDevice@@QAEGXZ
         14    A 00001BE0 ?GetInputReport_Control@CHIDDevice@@QAEEPAEK@Z
         15    B 00001A20 ?GetInputReport_Interrupt@CHIDDevice@@QAEEPAEKGPAK@Z
         16    C 00001CB0 ?GetMaxReportRequest@CHIDDevice@@QAEKXZ
         17    D 00001C90 ?GetOutputReportBufferLength@CHIDDevice@@QAEGXZ
         18    E 00001730 ?GetString@CHIDDevice@@QAEEEPADK@Z
         19    F 00001CC0 ?GetTimeouts@CHIDDevice@@QAEXPAI0@Z
         20   10 00001700 ?IsOpened@CHIDDevice@@QAEHXZ
         21   11 000014A0 ?Open@CHIDDevice@@QAEEKGGG@Z
         22   12 00001360 ?ResetDeviceData@CHIDDevice@@AAEXXZ
         23   13 00001810 ?SetFeatureReport_Control@CHIDDevice@@QAEEPAEK@Z
         24   14 00001B80 ?SetOutputReport_Control@CHIDDevice@@QAEEPAEK@Z
         25   15 000018C0 ?SetOutputReport_Interrupt@CHIDDevice@@QAEEPAEK@Z
         26   16 00001CE0 ?SetTimeouts@CHIDDevice@@QAEXII@Z
          3   17 00001320 GetHidGuid
          2   18 00001230 GetHidString
          1   19 00001190 GetNumHidDevices

  Summary

        6000 .data
        7000 .rdata
        5000 .reloc
        4000 .rsrc
       1C000 .text
  • 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-13T10:31:01+00:00Added an answer on May 13, 2026 at 10:31 am

    You cannot use P/Invoke to call instance methods of a C++ class. The primary hang-up is that you can’t create an object of the class, you cannot discover the required memory allocation size. Passing the implicit “this” pointer to the instance method is another problem, it needs to be passed in a register.

    You’ll need to create a managed wrapper for the class, that requires using the C++/CLI language. Google “C++/CLI wrapper” for good hits.

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

Sidebar

Related Questions

I have a DLL which contains a class with static members . I use
I have a DLL which exports a few functions. The source file contains a
I have an MVC3 application which has a reference to DLL. This DLL is
I have a dll in C# which returns a class object. DLL code: Person.cs:
I have a dll called Test.dll in which I have a class called ABC
I have a dll which I disassemble in Reflector, I then generate a class.
I have a class in a dll which parses a file and returns a
I have build a c# class library verification.dll using OpenCVSharp. This references OpenCvSharp.dll in
I have a deployed web application project that references my Utility.dll class library. I
I have an EXE class which contains a button resource with ID EXE_BUTTON_RESOURCE ON_UPDATE_COMMAND_UI(EXE_BUTTON_RESOURCE,

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.