S
Sheikko
Hi, friends. I am new in this group and I have a problem. I am just
started to program in cSharp and I need a help.
I need to import a ddl and to use one of its function. The function, in
C language, require in input a pointer char:
OpenFile(char* filename);
To use this function in cSharp I have writing the following code:
=============================================
[DllImport("My.dll")]
unsafe public static extern int OpenFile(char* filename);
......
unsafe private void buttonGetDllTypes_Click(object sender, EventArgs e)
{
fileToOpen = "C:\\myFile.ext";
fixed (char* p = fileToOpen)
{
OpenFile(p);
}
}
=============================================
But it doesn't work. I don't know if this function is deprecated or
there is a problem in the calling him. When I build or run my project
there is not any error.
I want to know the list of functions in the dll. Can I retrieve these
from the dll?
Can someone Help me. Thanks
started to program in cSharp and I need a help.
I need to import a ddl and to use one of its function. The function, in
C language, require in input a pointer char:
OpenFile(char* filename);
To use this function in cSharp I have writing the following code:
=============================================
[DllImport("My.dll")]
unsafe public static extern int OpenFile(char* filename);
......
unsafe private void buttonGetDllTypes_Click(object sender, EventArgs e)
{
fileToOpen = "C:\\myFile.ext";
fixed (char* p = fileToOpen)
{
OpenFile(p);
}
}
=============================================
But it doesn't work. I don't know if this function is deprecated or
there is a problem in the calling him. When I build or run my project
there is not any error.
I want to know the list of functions in the dll. Can I retrieve these
from the dll?
Can someone Help me. Thanks