I am experimenting with the Declare Function and DllImport methods in C# and VB.NET an example of what I have done is below. VB.NET and C# (express editions) will not directly access a C++ unmanaged .DLL, or else you get an error when trying to add a reference. Hope this information is useful to anyone who wants to use DARKGDK.NET with plug-ins.
C#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class AdvanceTerrain
{
[DllImport("AdvancedTerrain.dll", EntryPoint = "?GetAssociatedDLLs@@YAHXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern int GetAssociatedDLLs();
[DllImport("AdvancedTerrain.dll", EntryPoint = "?GetTerrainGroundHeight@@YAKHMM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetTerrainGroundHeight(int P1, float P2, float p3);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?GetTerrainXSize@@YAKH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetTerrainXSize(int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?GetTerrainZSize@@YAKH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetTerrainZSize(int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?BuildTerrain@@YAXH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void BuildTerrain(int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?BuildTerrainEx@@YAXHH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void BuildTerrainEx(int P1, int P2);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?DeleteTerrain@@YAXH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void DeleteTerrain(int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?Destructor@@YAXXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void Destructor();
[DllImport("AdvancedTerrain.dll", EntryPoint = "?LoadTerrain@@YAXKH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void LoadTerrain(uint P1, int P2);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?MakeObjectTerrain@@YAXH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void MakeObjectTerrain(int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?ReceiveCoreDataPtr@@YAXPAX@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void ReceiveCoreDataPtr();
[DllImport("AdvancedTerrain.dll", EntryPoint = "?RefreshD3D@@YAXH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void RefreshD3D(int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SaveTerrain@@YAXKH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SaveTerrain(uint P1, int P2);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SetTerrainHeightMap@@YAXHK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainHeightMap(int P1, uint p2);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SetTerrainLight@@YAXHMMMMMMM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainLight(int P1, float P2, float p3, float p4, float p5, float p6, float p7, float p8);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SetTerrainScale@@YAXHMMM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainScale(int P1, float P2, float p3, float p4);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SetTerrainSplit@@YAXHH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainSplit(int P1, int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SetTerrainTexture@@YAXHHH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainTexture(int P1, int P2, int P3);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?SetTerrainTiling@@YAXHH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainTiling(int P1, int P1);
[DllImport("AdvancedTerrain.dll", EntryPoint = "?UpdateTerrain@@YAXXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void UpdateTerrain();
[DllImport("AdvancedTerrain.dll", EntryPoint = "?UpdateTerrainNoCull@@YAXH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void UpdateTerrainNoCull(int P1);
}
public class BlitTerrain
{
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_MakeTerrain@@YAKXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint MakeTerrain();
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_AddTerrainEnvironment@@YAKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
//Returns Terrain ID
public static extern uint AddTerrainEnvironment(uint TerrainID, uint Color);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_RTTMS_AddUpdateHandler@@YAXKP6AXKKKGGPAX@Z@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint AddUpdateHandler(uint TerrainID, uint P2, uint P3, uint P4);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_BuildTerrain@@YAXKK_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint BuildTerrain(uint TerrainID, uint ObjectID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_BuildTerrain@@YAXKK_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint BuildTerrainF(uint TerrainID, uint ObjectID, bool BuildFully);
[DllImport("BlitzTerrain.dll", EntryPoint = "'?BT_ContinueBuild@@YAHXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void ContinueBuild();
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_RTTMS_FindVertex@@YAGPAXGG@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern UInt16 FindVertex(uint TerrainID, uint P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorInfo@@YAPAXKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorInfo(uint TerrainID, uint P2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?GetDependencyID@@YAPBDH@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void GetDependencyID();
[DllImport("BlitzTerrain.dll", EntryPoint = "'?GetNumDependencies@@YAHXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void GetNumDependencies();
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_BuildTerrain@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetGroundHeight(uint TerrainID, float X, float Z);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetGroundHeight@@YAKKMM_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetGroundHeight(uint TerrainID, float X, float Y, bool Z);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetPointEnvironment@@YAKKMM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetPointEnvironment(uint TerrainID, float p2, float P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetPointExcluded@@YAKKMM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetPointExcluded(uint TerrainID, float p2, float P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorCollumn@@YAKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorCollumn(uint TerrainID, uint p2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorCount@@YAKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorCount(uint TerrainID, uint p2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorExcluded@@YAKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorExcluded(uint TerrainID, uint p2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetLODLevelInfo@@YAPAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetLODLevelInfo(uint TerrainID, uint P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorPositionX@@YAKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorPositionX(uint TerrainID, uint p2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorPositionY@@YAKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorPositionY(uint TerrainID, uint p2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorPositionZ@@YAKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorPositionZ(uint TerrainID, uint p2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorRow@@YAKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorRow(uint TerrainID, uint p2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetSectorSize@@YAKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetSectorSize(uint TerrainID, uint p2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetStatistic@@YAKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetStatistic(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetTerrainObjectID@@YAKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetTerrainObjectID(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetTerrainSize@@YAKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint GetTerrainSize(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetTerrainInfo@@YAPAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern bool GetTerrainInfo(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_GetVersion@@YAKXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern string GetVersion();
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_LoadTerrain@@YAKPADK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint LoadTerrain(byte TerrainID, string TerrainFileName);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_LoadTerrain@@YAKPADK_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint LoadTerrain(string TerrainID, uint P2, bool P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_RTTMS_LockSectorVertexData@@YAPAXKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint LockSectorVertexData(uint TerrainID, uint P2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_DeleteTerrain@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint DeleteTerrain(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_EnableAutoRender@@YAX_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint EnableAutoRender(bool TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_Intern_Render@@YAXXZ", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint Intern_Render();
[DllImport("BlitzTerrain.dll", EntryPoint = "'?BT_MakeSectorObject@@YAXKKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint MakeSectorObject(uint TerrainID, uint P2, uint P3, uint P4);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_MakeTerrainObject@@YAXKKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint MakeTerrainObject(uint TerrainID, uint P2, uint P3);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_RenderTerrain@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint RenderTerrain(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SaveTerrain@@YAXKPAD@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SaveTerrain(uint TerrainID, string TerrainFileName);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetATMode@@YAX_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetATMode(bool TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetBuildStep@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetBuildStep(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetCurrentCamera@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetCurrentCamera(uint CameraID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainDetail@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainDetail(uint TerrainID, uint ImageID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainDetailBlendMode@@YAXKE@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainDetailBlendMode(uint TerrainID, byte BlendMode);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainDetailTile@@YAXKM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainDetailTile(uint TerrainID, float Tile);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainEnvironment@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainEnvironment(uint TerrainID, uint ImageID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainExclusion@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainExclusion(uint TerrainID, uint P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainExclusionThreshold@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainExclusionThreshold(uint TerrainID, uint P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainHeightmap@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainHeightmap(uint TerrainID, uint HeightMap);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainLOD@@YAXKE@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainLOD(uint TerrainID, byte LodLevel);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainLODDistance@@YAXKEM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainLODDistance(uint TerrainID, byte LodLevel, float Value);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainQuadReduction@@YAXKM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern void SetTerrainQuadReduction(uint TerrainID, float P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainQuadRotation@@YAXK_N@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainQuadRotation(uint TerrainID, bool P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainScale@@YAXKM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainScale(uint TerrainID, float Scale);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainSmoothing@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainSmoothing(uint TerrainID, uint P2);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainSplit@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainSplit(uint TerrainID, uint Splits);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainTexture@@YAXKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainTexture(uint TerrainID, uint TextureID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_SetTerrainYScale@@YAXKM@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint SetTerrainYScale(uint TerrainID, float Scale);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_TerrainExist@@YAKK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern bool TerrainExist(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_RTTMS_UnlockSectorVertexData@@YAXPAX@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint UnlockSectorVertexData();
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_UpdateTerrain@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint UpdateTerrain(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_UpdateTerrainCull@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint UpdateTerrainCull(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_UpdateTerrainLOD@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint UpdateTerrainLOD(uint TerrainID);
[DllImport("BlitzTerrain.dll", EntryPoint = "?BT_UpdateTerrainObjects@@YAXK@Z", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern uint UpdateTerrainObjects(uint TerrainID);
Visual Basic.NET
Public Class AdvanceTerrain
Public Declare Function GetAssociatedDLLs Lib "AdvancedTerrain.dll" Alias "?GetAssociatedDLLs@@YAHXZ" () As Integer
Public Declare Function GetTerrainGroundHeight Lib "AdvancedTerrain.dll" Alias "?GetTerrainGroundHeight@@YAKHMM@Z" (ByVal P1 As Integer, ByVal P2 As Single, ByVal p3 As Single) As UInteger
Public Declare Function GetTerrainXSize Lib "AdvancedTerrain.dll" Alias "?GetTerrainXSize@@YAKH@Z" (ByVal P1 As Integer) As UInteger
Public Declare Function GetTerrainZSize Lib "AdvancedTerrain.dll" Alias "?GetTerrainZSize@@YAKH@Z" (ByVal P1 As Integer) As UInteger
Public Declare Function BuildTerrain Lib "AdvancedTerrain.dll" Alias "?BuildTerrain@@YAXH@Z" (ByVal P1 As Integer)
Public Declare Function BuildTerrainEx Lib "AdvancedTerrain.dll" Alias "?BuildTerrainEx@@YAXHH@Z" (ByVal P1 As Integer, ByVal P2 As Integer)
Public Declare Function DeleteTerrain Lib "AdvancedTerrain.dll" Alias "?DeleteTerrain@@YAXH@Z" (ByVal P1 As Integer)
Public Declare Function Destructor Lib "AdvancedTerrain.dll" Alias "?Destructor@@YAXXZ" ()
Public Declare Function LoadTerrain Lib "AdvancedTerrain.dll" Alias "?LoadTerrain@@YAXKH@Z" (ByVal P1 As UInteger, ByVal P2 As Integer)
Public Declare Function MakeObjectTerrain Lib "AdvancedTerrain.dll" Alias "?MakeObjectTerrain@@YAXH@Z" (ByVal P1 As Integer)
Public Declare Function ReceiveCoreDataPtr Lib "AdvancedTerrain.dll" Alias "?ReceiveCoreDataPtr@@YAXPAX@Z" ()
Public Declare Function RefreshD3D Lib "AdvancedTerrain.dll" Alias "?RefreshD3D@@YAXH@Z" (ByVal P1 As Integer)
Public Declare Function SaveTerrain Lib "AdvancedTerrain.dll" Alias "?SaveTerrain@@YAXKH@Z" (ByVal P1 As UInteger, ByVal P2 As Integer)
Public Declare Function SetTerrainHeightMap Lib "AdvancedTerrain.dll" Alias "?SetTerrainHeightMap@@YAXHK@Z" (ByVal P1 As Integer, ByVal p2 As UInteger)
Public Declare Function SetTerrainLight Lib "AdvancedTerrain.dll" Alias "?SetTerrainLight@@YAXHMMMMMMM@Z" (ByVal P1 As Integer, ByVal P2 As Single, ByVal p3 As Single, ByVal p4 As Single, ByVal p5 As Single, ByVal p6 As Single, ByVal p7 As Single, ByVal p8 As Single)
Public Declare Function SetTerrainScale Lib "AdvancedTerrain.dll" Alias "?SetTerrainScale@@YAXHMMM@Z" (ByVal P1 As Integer, ByVal P2 As Single, ByVal p3 As Single, ByVal p4 As Single)
Public Declare Function SetTerrainSplit Lib "AdvancedTerrain.dll" Alias "?SetTerrainSplit@@YAXHH@Z" (ByVal P1 As Integer, ByVal P1 As Integer)
Public Declare Function SetTerrainTexture Lib "AdvancedTerrain.dll" Alias "?SetTerrainTexture@@YAXHHH@Z" (ByVal P1 As Integer, ByVal P2 As Integer, ByVal P3 As Integer)
Public Declare Function SetTerrainTiling Lib "AdvancedTerrain.dll" Alias "?SetTerrainTiling@@YAXHH@Z" (ByVal P1 As Integer, ByVal P1 As Integer)
Public Declare Function UpdateTerrain Lib "AdvancedTerrain.dll" Alias "?UpdateTerrain@@YAXXZ" ()
Public Declare Function UpdateTerrainNoCull Lib "AdvancedTerrain.dll" Alias "?UpdateTerrainNoCull@@YAXH@Z" (ByVal P1 As Integer)
End Class
Public Class BlitTerrain
Public Declare Function MakeTerrain Lib "BlitzTerrain.dll" Alias "?BT_MakeTerrain@@YAKXZ" () As UInteger 'Returns Terrain ID
Public Declare Function AddTerrainEnvironment Lib "BlitzTerrain.dll" Alias "?BT_AddTerrainEnvironment@@YAKKK@Z" (ByVal TerrainID As UInteger, ByVal Color As UInteger) As UInteger
Public Declare Function AddUpdateHandler Lib "BlitzTerrain.dll" Alias "?BT_RTTMS_AddUpdateHandler@@YAXKP6AXKKKGGPAX@Z@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger, ByVal P3 As UInteger, ByVal P4 As UInteger) As UInteger
Public Declare Function BuildTerrain Lib "BlitzTerrain.dll" Alias "?BT_BuildTerrain@@YAXKK_N@Z" (ByVal TerrainID As UInteger, ByVal ObjectID As UInteger) As UInteger
Public Declare Function BuildTerrainF Lib "BlitzTerrain.dll" Alias "?BT_BuildTerrain@@YAXKK_N@Z" (ByVal TerrainID As UInteger, ByVal ObjectID As UInteger, ByVal BuildFully As Boolean) As UInteger
Public Declare Function ContinueBuild Lib "BlitzTerrain.dll" Alias "'?BT_ContinueBuild@@YAHXZ" ()
Public Declare Function FindVertex Lib "BlitzTerrain.dll" Alias "?BT_RTTMS_FindVertex@@YAGPAXGG@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger) As UInt16
Public Declare Function GetSectorInfo Lib "BlitzTerrain.dll" Alias "?BT_GetSectorInfo@@YAPAXKKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetDependencyID Lib "BlitzTerrain.dll" Alias "?GetDependencyID@@YAPBDH@Z" ()
Public Declare Function GetNumDependencies Lib "BlitzTerrain.dll" Alias "'?GetNumDependencies@@YAHXZ" ()
Public Declare Function GetGroundHeight Lib "BlitzTerrain.dll" Alias "?BT_BuildTerrain@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal X As Single, ByVal Z As Single) As UInteger
Public Declare Function GetGroundHeight Lib "BlitzTerrain.dll" Alias "?BT_GetGroundHeight@@YAKKMM_N@Z" (ByVal TerrainID As UInteger, ByVal X As Single, ByVal Y As Single, ByVal Z As Boolean) As UInteger
Public Declare Function GetPointEnvironment Lib "BlitzTerrain.dll" Alias "?BT_GetPointEnvironment@@YAKKMM@Z" (ByVal TerrainID As UInteger, ByVal p2 As Single, ByVal P2 As Single) As UInteger
Public Declare Function GetPointExcluded Lib "BlitzTerrain.dll" Alias "?BT_GetPointExcluded@@YAKKMM@Z" (ByVal TerrainID As UInteger, ByVal p2 As Single, ByVal P2 As Single) As UInteger
Public Declare Function GetSectorCollumn Lib "BlitzTerrain.dll" Alias "?BT_GetSectorCollumn@@YAKKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetSectorCount Lib "BlitzTerrain.dll" Alias "?BT_GetSectorCount@@YAKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger) As UInteger
Public Declare Function GetSectorExcluded Lib "BlitzTerrain.dll" Alias "?BT_GetSectorExcluded@@YAKKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetLODLevelInfo Lib "BlitzTerrain.dll" Alias "?BT_GetLODLevelInfo@@YAPAXKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger) As UInteger
Public Declare Function GetSectorPositionX Lib "BlitzTerrain.dll" Alias "?BT_GetSectorPositionX@@YAKKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetSectorPositionY Lib "BlitzTerrain.dll" Alias "?BT_GetSectorPositionY@@YAKKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetSectorPositionZ Lib "BlitzTerrain.dll" Alias "?BT_GetSectorPositionZ@@YAKKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetSectorRow Lib "BlitzTerrain.dll" Alias "?BT_GetSectorRow@@YAKKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function GetSectorSize Lib "BlitzTerrain.dll" Alias "?BT_GetSectorSize@@YAKKK@Z" (ByVal TerrainID As UInteger, ByVal p2 As UInteger) As UInteger
Public Declare Function GetStatistic Lib "BlitzTerrain.dll" Alias "?BT_GetStatistic@@YAKK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function GetTerrainObjectID Lib "BlitzTerrain.dll" Alias "?BT_GetTerrainObjectID@@YAKK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function GetTerrainSize Lib "BlitzTerrain.dll" Alias "?BT_GetTerrainSize@@YAKK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function GetTerrainInfo Lib "BlitzTerrain.dll" Alias "?BT_GetTerrainInfo@@YAPAXK@Z" (ByVal TerrainID As UInteger) As Boolean
Public Declare Function GetVersion Lib "BlitzTerrain.dll" Alias "?BT_GetVersion@@YAKXZ" () As String
Public Declare Function LoadTerrain Lib "BlitzTerrain.dll" Alias "?BT_LoadTerrain@@YAKPADK@Z" (ByVal TerrainID As Byte, ByVal TerrainFileName As String) As UInteger
Public Declare Function LoadTerrain Lib "BlitzTerrain.dll" Alias "?BT_LoadTerrain@@YAKPADK_N@Z" (ByVal TerrainID As String, ByVal P2 As UInteger, ByVal P3 As Boolean) As UInteger
Public Declare Function LockSectorVertexData Lib "BlitzTerrain.dll" Alias "?BT_RTTMS_LockSectorVertexData@@YAPAXKKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function DeleteTerrain Lib "BlitzTerrain.dll" Alias "?BT_DeleteTerrain@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function EnableAutoRender Lib "BlitzTerrain.dll" Alias "?BT_EnableAutoRender@@YAX_N@Z" (ByVal TerrainID As Boolean) As UInteger
Public Declare Function Intern_Render Lib "BlitzTerrain.dll" Alias "?BT_Intern_Render@@YAXXZ" () As UInteger
Public Declare Function MakeSectorObject Lib "BlitzTerrain.dll" Alias "'?BT_MakeSectorObject@@YAXKKKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger, ByVal P3 As UInteger, ByVal P4 As UInteger) As UInteger
Public Declare Function MakeTerrainObject Lib "BlitzTerrain.dll" Alias "?BT_MakeTerrainObject@@YAXKKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger, ByVal P3 As UInteger) As UInteger
Public Declare Function RenderTerrain Lib "BlitzTerrain.dll" Alias "?BT_RenderTerrain@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function SaveTerrain Lib "BlitzTerrain.dll" Alias "?BT_SaveTerrain@@YAXKPAD@Z" (ByVal TerrainID As UInteger, ByVal TerrainFileName As String) As UInteger
Public Declare Function SetATMode Lib "BlitzTerrain.dll" Alias "?BT_SetATMode@@YAX_N@Z" (ByVal TerrainID As Boolean) As UInteger
Public Declare Function SetBuildStep Lib "BlitzTerrain.dll" Alias "?BT_SetBuildStep@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function SetCurrentCamera Lib "BlitzTerrain.dll" Alias "?BT_SetCurrentCamera@@YAXK@Z" (ByVal CameraID As UInteger) As UInteger
Public Declare Function SetTerrainDetail Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainDetail@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal ImageID As UInteger) As UInteger
Public Declare Function SetTerrainDetailBlendMode Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainDetailBlendMode@@YAXKE@Z" (ByVal TerrainID As UInteger, ByVal BlendMode As Byte) As UInteger
Public Declare Function SetTerrainDetailTile Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainDetailTile@@YAXKM@Z" (ByVal TerrainID As UInteger, ByVal Tile As Single) As UInteger
Public Declare Function SetTerrainEnvironment Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainEnvironment@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal ImageID As UInteger) As UInteger
Public Declare Function SetTerrainExclusion Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainExclusion@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger) As UInteger
Public Declare Function SetTerrainExclusionThreshold Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainExclusionThreshold@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger) As UInteger
Public Declare Function SetTerrainHeightmap Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainHeightmap@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal HeightMap As UInteger) As UInteger
Public Declare Function SetTerrainLOD Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainLOD@@YAXKE@Z" (ByVal TerrainID As UInteger, ByVal LodLevel As Byte) As UInteger
Public Declare Function SetTerrainLODDistance Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainLODDistance@@YAXKEM@Z" (ByVal TerrainID As UInteger, ByVal LodLevel As Byte, ByVal Value As Single) As UInteger
Public Declare Function SetTerrainQuadReduction Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainQuadReduction@@YAXKM@Z" (ByVal TerrainID As UInteger, ByVal P2 As Single)
Public Declare Function SetTerrainQuadRotation Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainQuadRotation@@YAXK_N@Z" (ByVal TerrainID As UInteger, ByVal P2 As Boolean) As UInteger
Public Declare Function SetTerrainScale Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainScale@@YAXKM@Z" (ByVal TerrainID As UInteger, ByVal Scale As Single) As UInteger
Public Declare Function SetTerrainSmoothing Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainSmoothing@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal P2 As UInteger) As UInteger
Public Declare Function SetTerrainSplit Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainSplit@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal Splits As UInteger) As UInteger
Public Declare Function SetTerrainTexture Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainTexture@@YAXKK@Z" (ByVal TerrainID As UInteger, ByVal TextureID As UInteger) As UInteger
Public Declare Function SetTerrainYScale Lib "BlitzTerrain.dll" Alias "?BT_SetTerrainYScale@@YAXKM@Z" (ByVal TerrainID As UInteger, ByVal Scale As Single) As UInteger
Public Declare Function TerrainExist Lib "BlitzTerrain.dll" Alias "?BT_TerrainExist@@YAKK@Z" (ByVal TerrainID As UInteger) As Boolean
Public Declare Function UnlockSectorVertexData Lib "BlitzTerrain.dll" Alias "?BT_RTTMS_UnlockSectorVertexData@@YAXPAX@Z" () As UInteger
Public Declare Function UpdateTerrain Lib "BlitzTerrain.dll" Alias "?BT_UpdateTerrain@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function UpdateTerrainCull Lib "BlitzTerrain.dll" Alias "?BT_UpdateTerrainCull@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function UpdateTerrainLOD Lib "BlitzTerrain.dll" Alias "?BT_UpdateTerrainLOD@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
Public Declare Function UpdateTerrainObjects Lib "BlitzTerrain.dll" Alias "?BT_UpdateTerrainObjects@@YAXK@Z" (ByVal TerrainID As UInteger) As UInteger
End Class
I could not get BlitzTerrain to work yet, when I "Make Terrain" with an ID, then set the Terrain HeightMap, it states the Terrain does not exist. May be an unseen DLL dependency.
There seems to be a serious lack of support with DarkGDK.NET with plugins.