Vb -> C#

  • Thread starter Thread starter Lews
  • Start date Start date
L

Lews

Guest
Hi!

I need to translate this operation from VB to C#:

Private Declare Sub Generate Lib "g:\code\PatternGenerator.dll" (ByVal x As Long, ByVal y As Long)

The PatternGenerator .dll is a normal C project and it cant be added as a normal COM reference. However the declaration above works in VB but how do I do the same thing in C#?
 
I found a solution. If anyone is interested you do like this:

[DllImport("g:\\code\\PatternGenerator.dll")]
public static extern void Generate(int x,int y)
 

Similar threads

Back
Top