Home All Groups Group Topic Archive Search About
Author
10 Mar 2005 7:27 PM
sombra negra via .NET 247

(Type your message here)

--------------------------------
From: sombra negra

I'm using a VC++ dll in c#, I thing i know how to import functions with DLLIMPORT and use the callback but when i use a function of the dll that fired a callback  the code call to the function that manage the callbacks but when the code go out of this function the message System.NullReferenceException i run the program with out the callback and everything ok!!. Someone can help me please

this is the function that fire the callback

[DllImportAttribute("mydll.dll")] public static extern int cfm_start(sbyte system,uint acqui, ref IMAGE_STRUCT);

IMAGE_STRUCT is a struct that has two strcuts

public struct IMAGE_STRUCT
{
public IMAGE_MEM a;
public IMAGE_PAR b;
}

the important one is IMAGE_MEM that has a void *.


public struct IMAGE_MEM
{
public void* imagePtr
}

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>X2un0/MbFE+Ydh7h4CYGXw==</Id>

Bookmark and Share