c# 结构体数组问题 求高手帮忙!!!!!
功能:反回 GridID 编号文件的 GRID 信息 ByVal GridID As Long 为输入值
stGrid As GRID 为返回值
vb 源码 :
Declare Function VBGetGridPropsStdCall Lib "Grid.dll" (ByVal GridID As Long, stGrid As GRID) As Long
Type GRID
pszName As String
lGridID As Long
pszTableName As String
pszCoordSys As String
pszCoordName As String
pszZDesc As String
pszXYUnitName As String
lCoordUnits As Long
dXMin As Double
dXMax As Double
dYMin As Double
dYMax As Double
uGridWidth As Long
uGridLength As Long
dCellSize As Double
fVersionNumber As Double
byDisplayStatus As Long
byGridDataType As Long
byNumBytesPerRawVal As Long
lGridType As Long
stGrdInfo As VB_GRD_INFO
stGrcInfo As VB_GRC_INFO
byGridModified As Long
End Type
Type VB_GRD_INFO
fZmin As Double
fZmax As Double
ZUnitType As Long
pszZUnits As String
fLightAzimuth As Double
fLightAngle As Double
uNumInflections As Long
stInflectionDesc(0 To 63) As VB_INFLECTION_DESC
End Type
Type VB_GRC_DICT
iRed As Long
iGreen As Long
iBlue As Long
pszDescr As String
End Type
Type VB_INFLECTION_DESC
fZValue As Double
RGBColor As Long
End Type
我想转成C# 文件
public static extern int VBGetGridPropsStdCall(int GridID,[Out] GRID stGrid);
但不知道结构体如何改 c# 不能直接定义数组大小;
求高手帮忙!!!!!
[[it] 本帖最后由 maomao4109 于 2008-8-7 15:27 编辑 [/it]]