KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
While going through SWig generated wrappers, I find that the PInvokes don't have any entry point defined, but some places do have an entry point. So what is the difference between them? When do I need to define an EntryPoint, and when do I not need to? Defined without EntryPoint : [DllImport("Kernel32.dll", CharSet = CharSet.Unicode)] public static extern bool ReadFile( HandleRef hndRef, StringBuilder buffer, int numberOfBytesToRead, out int numberOfBytesRead, int flag); Defined with Entrypoint : [DllImport("Kernel32.dll", CharSet = CharSet.Unicode, EntryPoint = "ReadFile")] public static extern bool ReadFile2( HandleRef hndRef, StringBuilder buffer, int numberOfBytesToRead, out int numberOfBytesRead, Overlapped2 flag); Also why does the function have to be static as in public static extern ? I assume that extern is telling the compiler that this method is defined externally?
Tags (comma-separated)
Save Edits
Cancel