Article View: de.comp.lang.c++
Article #1648Wie verwende ich mit Delphi erstellte DLLs? Funktioniert nicht so wie dokumentiert!
From: Andreas Schwab
Date: Sat, 17 Feb 1996 14:13
Date: Sat, 17 Feb 1996 14:13
114 lines
3037 bytes
3037 bytes
Ich habe folgendes Problem: Ich möchte gerne eine mit Delphi erstellte
DLL (die ein Formular beinhaltet) in Borland C++ 4.5 einbinden. Die
Sache funktioniert jedoch nicht. Ich erhalte immer folgende
Fehlermeldung:
Linker Error: Undefinde symbol readvalue() in module DLLTEST.CPP
Ich bräuchte schon dringend eine Lösung für dieses Problem. Könnte mir
nicht jemand einen Tip geben, worauf ich zu achten habe, bzw. könnte mir
nicht jemand ein Beispielprogramm nennen, das das Einbinden einer
Delphi-DLL realisiert.
Herzlichen Dank im Voraus, Andreas Schwab
---------------------------
Es folgt nun noch das CPP-Programm, mit dem ich die DLL einbinden will
und die DEF-Datei:
CPP-Datei:
/*
program: dlltest
language: borland c++
compiler: bc 4.5
operating sys.: windows 16 Bit
tested: windows 95
author: schwab andreas
date: 1996-02-17
action: beispielprogramm zum einbinden einer delphi-dll
release: 1.0
*/
#include <owl\owlpch.h>
#include <owl\applicat.h>
#include <owl\framewin.h>
#include <stdlib.h>
#include <c:\datas\bc45\dlltest\dlltest.rc>
int FAR PASCAL ReadValue();
class TDLLWindow: public TWindow
{
public:
TDLLWindow(TWindow* parent = 0);
protected:
BOOL DBRun;
void CmTest(); // botschaftsbeantwortungsfunktionen
void CmExit();
void CmAbout();
DECLARE_RESPONSE_TABLE(TDLLWindow);
};
DEFINE_RESPONSE_TABLE1(TDLLWindow, TWindow)
EV_COMMAND(CM_TEST, CmTest),
EV_COMMAND(CM_EXIT, CmExit),
EV_COMMAND(CM_ABOUT, CmAbout),
END_RESPONSE_TABLE;
/*
constructor: tdllwindow::tdllwindow
task: instantiiert tdllwindow
*/
TDLLWindow::TDLLWindow(TWindow* parent)
{
Init(parent, 0, 0); // instantiiert das fenster
}
void TDLLWindow::CmTest()
{
int valueI;
valueI = 1;
ReadValue();
//MessageBox("Feature not implemented", "Test", MB_OK);
}
void TDLLWindow::CmExit()
{
MessageBox("Feature not implemented", "Exit", MB_OK);
}
void TDLLWindow::CmAbout()
{
MessageBox("Feature not implemented", "About", MB_OK);
}
class TMyApp: public TApplication
{
public:
TMyApp(): TApplication() {}
void InitMainWindow();
};
void TMyApp::InitMainWindow()
{
SetMainWindow(new TFrameWindow(0, "DLL Test", new TDLLWindow));
GetMainWindow()->AssignMenu("COMMANDS");
}
int OwlMain(int /*argc*/, char* /*argv*/ [])
{
return TMyApp().Run();
}
DEF-Datei:
IMPORTS
ReadValue=DELPHDLL.ReadValue
STACKSIZE 6144
Technical Details
Message-ID:
<3125E273.1802@ping.at>Path:
arc1-ca.pugleaf.net!news.ping.at!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.ping.at!usenet From: Andreas Schwab <andycom@ping.at> Newsgroups: de.comp.lang.c++ Subject: Wie verwende ich mit Delphi erstellte DLLs? Funktioniert nicht so wie dokumentiert! Date: Sat, 17 Feb 1996 15:13:07 +0100 Organization: ping - Personal InterNet Gate Message-ID: <3125E273.1802@ping.at> NNTP-Posting-Host: e234.ping.at Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Mozilla 2.0GoldB1 (Win95; I)