AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi C#.Net2.0 DLL in Delphi2007 nutzen (Com)?
Thema durchsuchen
Ansicht
Themen-Optionen

C#.Net2.0 DLL in Delphi2007 nutzen (Com)?

Offene Frage von "winx"
Ein Thema von winx · begonnen am 13. Feb 2008 · letzter Beitrag vom 13. Feb 2008
 
winx

Registriert seit: 14. Jun 2005
265 Beiträge
 
#1

C#.Net2.0 DLL in Delphi2007 nutzen (Com)?

  Alt 13. Feb 2008, 09:30
Hallo,

habe eine Assembly die ich nun unter Delphi nutzen möchte.

Ich habe die Klassen wie folgt aufgebaut:

Code:
    [ComVisible(true)]
    public class DotNetClass
    {
        /// <summary>
        /// Der Int Wert der Klasse
        /// </summary>
        private int m_ValueInt = 0;

        /// <summary>
        /// Der String der Klasse
        /// </summary>
        private readonly string m_ValueString = String.Empty;

        /// <summary>
        /// Das utilitiy Objekt
        /// </summary>
        private Utility m_Util = new Utility();

       
        /// <summary>
        /// Standardkonstruktor
        /// </summary>
        public DotNetClass()
        {
            m_ValueString = "Hallo";
            m_ValueInt = 7;
            m_Util = new Utility();

        }
...

Die AssmeblyInfo.cs sieht so aus:
Code:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DotNetDLL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("NWL Lasertechnologie ")]
[assembly: AssemblyProduct("DotNetDLL")]
[assembly: AssemblyCopyright("Copyright © NWL Lasertechnologie 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("fc0e9806-4758-482d-b677-d11598f1cd3c")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Nun möchte ich das gerne in Delphi einbinden und das klappt auch.

Nur sehe ich nur die Klassen, aber keine Properties und Funktionen...

Wo liegt noch mein Fehler?

Danke,
winx
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:19 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz