List Info

Thread: Pointer




Pointer
user name
2006-12-04 08:27:08
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# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )