Error del compilador C3618
"function": no se puede definir un método marcado como DllImport
Un método marcado con DllImportAttribute se define en specified.DLL.
Ejemplo
El ejemplo siguiente genera el error C3618.
// C3618.cpp
// compile with: /clr /c
using namespace System;
using namespace System::Runtime::InteropServices;
[ DllImport("user32.dll", EntryPoint="MessageBox", CharSet=CharSet::Ansi) ] // CHANGED
void Func();
void Func() {} // C3618, remove this function definition to resolve