Compiler Error C3618
'function': a method marked DllImport cannot be defined
A method marked with DllImportAttribute is defined in the specified.DLL.
Example
The following sample generates 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
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir