Announcement

Collapse
No announcement yet.

Probleme mit einer Inteface-Schnittstelle

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Probleme mit einer Inteface-Schnittstelle

    Hallo

    Ich möchte mit Delphi 7 über eine Schnittstelle
    ein Statikprogramm steuern.
    Beim Aufruf von rsGetNodeArr in der Schnitt-stellen-Unit erhalte ich immer eine Fehler-meldung.
    Nachfolgend der Quelltext in Auszügen:

    Schnittstellen-Unit
    --------------------
    // ************************************************** *******************//
    // Deklaration von Strukturen, Unions und Aliasen.
    // ************************************************** *******************//
    PUserType1 = ^RS_NODE; {*}
    PUserType2 = ^RS_MATERIAL; {*}

    RS_NODE = packed record
    iNo: SYSINT;
    iRefNodeNo: SYSINT;
    x: Single;
    y: Single;
    z: Single;
    csType: RS_CS_TYPE;
    strRemark: WideString;
    end;

    // ************************************************** *******************//
    // Schnittstelle: IrsTopology
    // Flags: (0)
    // GUID: {A854BA15-4690-4CD6-A2D5-FC299636DD22}
    // ************************************************** *******************//
    IrsTopology = interface(IUnknown)
    ['{A854BA15-4690-4CD6-A2D5-FC299636DD22}']
    function rsGetNodeCount(out pCount: SYSINT): HResult; stdcall;
    function rsGetNode(iNo: SYSINT; nodeAt: ITEM_AT; out ppINode: IrsNode): HResult; stdcall;
    function rsSetNode(var pNode: RS_NODE; out ppINode: IrsNode): HResult; stdcall;
    function rsGetNodeArr(iSize: SYSINT; out pArray: RS_NODE; out piLength: SYSINT): HResult; stdcall;
    function rsSetNodeArr(iSize: SYSINT; var pArray: RS_NODE): HResult; stdcall;

    Mein Aufruf-Programm
    ---------------------
    Procedure P_Dlubal.Knoten(R1,R2,R3 : Real; I1,I2,I3 : Integer);
    Begin
    V_Position.rsGetTopology(V_Irs_T);
    V_Irs_T.rsGetNodeCount(Knoten_Anzahl);
    V_Irs_T.rsGetNodeArr(Knoten_Anzahl, RS_Knoten, Num);


    Vielen Dank für die Hilfe

    G.Schönhofer

  • #2
    Könntest Du den Code mal in einem < pre >-Abschnitt einfügen, damit er besser lesbar ist

    Comment


    • #3
      &It;PRE&gt;
      // ************************************************** *******************//
      // Deklaration von Strukturen, Unions und Aliasen.
      // ************************************************** *******************//
      PUserType1 = ^RS_NODE; {*}
      PUserType2 = ^RS_MATERIAL; {*}

      RS_NODE = packed record
      iNo: SYSINT;
      iRefNodeNo: SYSINT;
      x: Single;
      y: Single;
      z: Single;
      csType: RS_CS_TYPE;
      strRemark: WideString;
      end;

      // ************************************************** *******************//
      // Schnittstelle: IrsTopology
      // Flags: (0)
      // GUID: {A854BA15-4690-4CD6-A2D5-FC299636DD22}
      // ************************************************** *******************//
      IrsTopology = interface(IUnknown)
      ['{A854BA15-4690-4CD6-A2D5-FC299636DD22}']
      function rsGetNodeCount(out pCount: SYSINT): HResult; stdcall;
      function rsGetNode(iNo: SYSINT; nodeAt: ITEM_AT; out ppINode: IrsNode): HResult; stdcall;
      function rsSetNode(var pNode: RS_NODE; out ppINode: IrsNode): HResult; stdcall;
      function rsGetNodeArr(iSize: SYSINT; out pArray: RS_NODE; out piLength: SYSINT): HResult; stdcall;
      function rsSetNodeArr(iSize: SYSINT; var pArray: RS_NODE): HResult; stdcall;

      Procedure P_Dlubal.Knoten(R1,R2,R3 : Real; I1,I2,I3 : Integer);
      Begin
      V_Position.rsGetTopology(V_Irs_T);
      V_Irs_T.rsGetNodeCount(Knoten_Anzahl);
      V_Irs_T.rsGetNodeArr(Knoten_Anzahl, RS_Knoten, Num);

      &It;/PRE&gt

      Comment


      • #4
        &lt;PRE&gt;
        // ************************************************** *******************//
        // Deklaration von Strukturen, Unions und Aliasen.
        // ************************************************** *******************//
        PUserType1 = ^RS_NODE; {*}
        PUserType2 = ^RS_MATERIAL; {*}

        RS_NODE = packed record
        iNo: SYSINT;
        iRefNodeNo: SYSINT;
        x: Single;
        y: Single;
        z: Single;
        csType: RS_CS_TYPE;
        strRemark: WideString;
        end;

        // ************************************************** *******************//
        // Schnittstelle: IrsTopology
        // Flags: (0)
        // GUID: {A854BA15-4690-4CD6-A2D5-FC299636DD22}
        // ************************************************** *******************//
        IrsTopology = interface(IUnknown)
        ['{A854BA15-4690-4CD6-A2D5-FC299636DD22}']
        function rsGetNodeCount(out pCount: SYSINT): HResult; stdcall;
        function rsGetNode(iNo: SYSINT; nodeAt: ITEM_AT; out ppINode: IrsNode): HResult; stdcall;
        function rsSetNode(var pNode: RS_NODE; out ppINode: IrsNode): HResult; stdcall;
        function rsGetNodeArr(iSize: SYSINT; out pArray: RS_NODE; out piLength: SYSINT): HResult; stdcall;
        function rsSetNodeArr(iSize: SYSINT; var pArray: RS_NODE): HResult; stdcall;

        Procedure P_Dlubal.Knoten(R1,R2,R3 : Real; I1,I2,I3 : Integer);
        Begin
        V_Position.rsGetTopology(V_Irs_T);
        V_Irs_T.rsGetNodeCount(Knoten_Anzahl);
        &lt;/PRE&gt

        Comment


        • #5
          <PRE>
          // ************************************************** *******************//
          // Deklaration von Strukturen, Unions und Aliasen.
          // ************************************************** *******************//
          PUserType1 = ^RS_NODE; {*}
          PUserType2 = ^RS_MATERIAL; {*}

          RS_NODE = packed record
          iNo: SYSINT;
          iRefNodeNo: SYSINT;
          x: Single;
          y: Single;
          z: Single;
          csType: RS_CS_TYPE;
          strRemark: WideString;
          end;

          // ************************************************** *******************//
          // Schnittstelle: IrsTopology
          // Flags: (0)
          // GUID: {A854BA15-4690-4CD6-A2D5-FC299636DD22}
          // ************************************************** *******************//
          IrsTopology = interface(IUnknown)
          ['{A854BA15-4690-4CD6-A2D5-FC299636DD22}']
          function rsGetNodeCount(out pCount: SYSINT): HResult; stdcall;
          function rsGetNode(iNo: SYSINT; nodeAt: ITEM_AT; out ppINode: IrsNode): HResult; stdcall;
          function rsSetNode(var pNode: RS_NODE; out ppINode: IrsNode): HResult; stdcall;
          function rsGetNodeArr(iSize: SYSINT; out pArray: RS_NODE; out piLength: SYSINT): HResult; stdcall;
          function rsSetNodeArr(iSize: SYSINT; var pArray: RS_NODE): HResult; stdcall;

          Procedure P_Dlubal.Knoten(R1,R2,R3 : Real; I1,I2,I3 : Integer);
          Begin
          V_Position.rsGetTopology(V_Irs_T);
          V_Irs_T.rsGetNodeCount(Knoten_Anzahl);
          V_Irs_T.rsGetNodeArr(Knoten_Anzahl, RS_Knoten, Num);
          </PRE&gt

          Comment


          • #6
            Kurze Ergänzung
            mein Problem ist der Record RS_Knoten.
            G.Schönhofe

            Comment

            Working...
            X