Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mit VB.NET auf eine C++ Funktion zugreifen

Empfohlene Antworten

Hallo,

so vorab, ich war mir nicht ganz sicher wo ich diesen Thread schreiben sollte, da eigentlich zweierlei Sprachen im problem involviert ist. Jedoch weiß ich nicht in welcher ich den Fehler gemacht habe.

Ich habe eine dynamische C++ DLL und will mit vb.net auf eine Funktion dieser DLL zugreifen.

Als kleines beispiel wie ich mir das dachte:


//C++ DLL auschnitt

#include <stdafx.h>

#include <string>

#include <iostream>

using namespace std;


int main()

{



return 0;

}

__declspec(dllexport) string _export(int p1, string p2, string p3, string p4)

 {

	//auskommentierter Inhalt 

 return "nicht relevant";

 }

Und so habe ich mir eigentlich den Aufruf in VB.NET vorgestellt:

public Class Muster


    Declare Function _export Lib "Ov32.dll" Alias "_export" ( _

ByVal p1 As Integer, ByVal p2 As String, ByVal p3 As String, ByVal p4 As String) As String


Private Function testaufruf() as String

Dim content as string = _export(1, "a", "b", "c")

return "Muster"

End Funktion

End Class

Nun kommt in vb.net die Fehlermeldung:

Der Einstiegspunkt "_export" wurde nicht in der DLL "Ov32.dll" gefunden.

Die DLL liegt im Debugverzeichnis des Projekts welche diese benutzten soll.

Hat jemand eine Idee was ich eventuell Falsch gemacht haben könnte?

Lg

Gateway

  • Autor

Die c++ DLL ist selbstverfasst also ist auch der quellcode einsehbar.

Kann dir jetzt grad gedanklich nicht folgen.

Denn ich seh ja wie die Funktion in der DLL deklariert ist und mit welchen Parametern.

Bearbeitet von Gateway_man

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.