Joe Dash February 2016

What does this code do? DllImport ExactSpelling

What does this code do? I have tried researching it but I have had no luck.

[DllImport("kernel32.dll", ExactSpelling = true)]

Answers


Dave February 2016

This code is an attribute tag which is supposed to be placed above an external declaration of a method located in the kernel32.dll library.

In practice, you would see it associated with a method declaration similar to:

[DllImport("kernel32.dll", ExactSpelling = true)]
public static extern bool MoveFile(string src, string dst);

See this MSDN article for details on its usage.

Post Status

Asked in February 2016
Viewed 2,830 times
Voted 10
Answered 1 times

Search




Leave an answer