I'm trying to call a C++ function in a dll from a GUI I made with Winforms in VS.NET. I'm doing it something like this:

[DllImport("Data.dll")]
private static extern bool IsOpen();
...
static void Main(){
IsOpen();
//do something
}

The error I keep getting is
"Unable to find an entry point named IsOpen in DLL Data.dll"

Since the function is actually CDataApp::IsOpen() in the .dll I tried to make a wrapper function like this:

BOOL IsOpen(){
return theApp.IsOpen();
}

but I get the same error...Any suggestions?