dllimport confusion

  • Thread starter Thread starter vidalsasoon
  • Start date Start date
V

vidalsasoon

ok, I have a DLL(c++) i would like to use in my C# project. The only
hint I have as to what is in this dll is the specification that came
with it. here is an example on how the dll should be used.

// 1) Initialize the creation structure
OPCODECREATE OPCC;
OPCC.NbTris = ...;
OPCC.NbVerts = ...;
OPCC.Tris = ...;
OPCC.Verts = ...;
OPCC.Rules = ...;
OPCC.NoLeaf = ...;
OPCC.Quantized = ...;
OPCC.KeepOriginal = ...;

bool Status = Sample.Build(OPCC);


I'm very new at this and my c++ is very poor. any tips on how I could
use this with c#? im stuck at

[DllImport("Opcode.dll")]
public static extern void noideawhatgoeshere();
 
a little more info...
I need instances of a class from the dll (not just static methods).
 
Back
Top