Well, the DllImport attribute tells the CLR what the name of the DLL is
to load to find the function in (as well as other information, like the .
The CLR will then use function information to figure out the signature of
the function and load it from the dll, and subsequently call it.
The "extern" keyword here, combined with the attribute indicates that
the function is found in an unmanaged DLL (there should be a static keyword
here as well).
- Nicholas Paldino [.NET/C# MVP]
"Phil Hunt" <aaa@xxxxxx> wrote in message
> Can you help me with converting a VB6 Declare Function construct to C#
> systax. I think it is in the form of
> [DLLImport ("A.DLL")]
> public extrn void someFunction(.....);
> But I don't see the association between the 2 statements. Can someone
> explain ?