Hy.
Thanks for answer.
What it is in the dll file,I don't know.The part of the programm is
from an application that I was converted from Vb.6 to Vb.NET
Again:
the function:
Public Declare Function STL_GetMaterialen Lib "TWSTL408.DLL" Alias
"_STL_GetMaterialen@16" (ByVal Norm As Integer, ByVal MateriaalSoort As
Integer, ByVal maxMat As Integer, ByRef StlMatGeg As STR_MATDATA) As
Integer
the structure:
<StructLayout(LayoutKind.Sequential)> Structure STR_MATDATA
Public iStructure As Integer ' Structurenr. bijv. MS_STAAL
Public Standaard As Integer ' Standaardkwaliteit: 0 (NEE) of 1
(JA)
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=24)> Public
Omschrijving() As Byte ' Omschrijving van de materiaalkwaliteit, bijv.
"S235"
Public Kwaliteit As Integer ' Rekenwaarde vloeispanning bij
deze kwaliteit, bijv. 235 [N/mm2]
Public Emechanica As Integer ' Elasticiteitsmodulus mechanica,
was in mattgb.dat in [kN/m2], nu in [N/mm2], maar was in SVEW
vermoedelijk niet effectief in gebruik
Public Kruipcoefficient As Integer ' Kruipcoefficient [-], 0 =
nvt voor staal
Public SoortelijkGewicht As Integer ' Soortelijk gewicht
[kN/m2], bijv. 78.5
Public Poissoncoefficient As Integer ' Poissoncoefficient nu
[-], bijv. 0.3
Public Uitzettingscoefficient As Integer '
Uitzettingscoefficient alpha [1/K], bijv. 12.e-6
Public VersieNr As Long ' TRK/4.07: Nav TWPRFMUT 3.06:
toegevoegd ivm versie-detectie in tsprofiel.mdb
Public Sub Initialize()
ReDim Omschrijving(23)
End Sub
' !!! Bufferlengte is: 56
End Structure
the call of the function:
Dim geg() As STR_MATDATA
ReDim geg(19)
For i = 0 To 19
geg(i).Initialize()
Next
nget = STL_GetMaterialen(1, 1, 20, geg(0))
give the error:
An unhandled exception of type 'System.NullReferenceException' occurred
in WindowsApplication1.exe
Additional information: Object reference not set to an instance of an
object.
Any solution?
Avy
--
avy31
------------------------------------------------------------------------
avy31's Profile:
http://www.hightechtalks.com/m188
View this thread:
http://www.hightechtalks.com/t2279957