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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:27:26+00:00 2026-05-24T12:27:26+00:00

Module Module1 Public Declare Function GET_CALCULATION_FAN_ALONE Lib EbmPapstFan.dll (ByRef path As String) As Long

  • 0
Module Module1
    Public Declare Function GET_CALCULATION_FAN_ALONE Lib "EbmPapstFan.dll" (ByRef path As String) As Long
    Private Declare Function GET_PRODUCTS Lib "ebmpapstfan.dll" (ByRef path As String) As Long
    Public Declare Function SET_XML_PATH Lib "EbmPapstFan.dll" (ByRef path As String) As Long

    Sub Main()
        Dim Int_A As Long, Int_B As Long Str_Antwort As String, Str_Input As String
        Str_Input = "C:\Users\Sebastiaan\AppData\Local\ebmpapst\Product_selector_2011\Data\Fans\"
        Int_A = SET_XML_PATH(Str_Input)
        Int_B = GET_PRODUCTS("114709;A3G800AV0101;")

    End Sub

End Module

RESULTS

Int_A = 12884901888
Int_B = 25

How to rewrite this code in C# instead of VB?

[DllImport("EbmPapstFan.dll")]
public static extern long SET_XML_PATH(String path);

[DllImport("EbmPapstFan.dll")]
static extern long GET_CALCULATION_FAN_ALONE(String fanDescription);

[DllImport("EbmPapstFan.dll")]
public static extern long GET_PRODUCTS(String fanDescription);

static void Main(string[] args)
{
    long a = SET_XML_PATH(@"C:\Users\Sebastiaan\AppData\Local\ebmpapst\Product_selector_2011\Data\Fans\");
    long b = GET_PRODUCTS("114709;A3G800AV0101;");
}

RESULTS

A = 579780113483169791
B = 4294967292

i wrote this C# code but the output is not the same, how to solve this?

when i change long to int the resuls are a = -1 b = 4….

The dll is in Dephi, and should give the same output

  • 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-24T12:27:27+00:00Added an answer on May 24, 2026 at 12:27 pm

    Change the string parameters to ref strings (to match VB.Net’s ByRef)

    You will need to pass a ref string variable when calling the functions.

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

Sidebar

Related Questions

this action is generated in symfony 1.2 when you create a module: public function
<?php class PI_Controller_Plugin_AssetGrabber extends Zend_Controller_Plugin_Abstract { public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { /* The module
In VB6/VBA, you can declare module-level variables outside of a specific Sub or Function
I have a method in a url rewriting module that looks like this public
I have 2 perl modules every module use the second one i.e Module1.pm use
Very simple problem: I have a Public Sub (in a module) that I want
Has someone a hint what I'm doing wrong in VB.Net? Module Module1 Interface ISearch(Of
I want to do this: If there's a module X containing a function Y
In my ASP.NET Web Service I've included a module in which their are Public
Reproduction: Imports System.ComponentModel Imports System.ComponentModel.DataAnnotations Module Module1 Sub Main() Dim type = GetType(Contact) TypeDescriptor.AddProviderTransparent(

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.