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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups-beta.google.com/group/C_Sharp?hl=en
-~----------~----~----~----~------~----~------~--~---
|