Duplicate 'DllImport' attribute
The error occurs when two 'DllImport' attributes are placed next to each other without specifying the staic extern function - the attributed method exposed by an unmanaged dynamic-link library (DLL) as a static entry point. For example,
Code: [DllImport("decrypt.dll", EntryPoint = "_GetSerialRegData"/*, ExactSpelling = false*/, SetLastError=true)]
[DllImport("decrypt.dll", EntryPoint = "_GetActivationCode"/*, ExactSpelling = false*/, SetLastError = true)]
static extern void GetSerialRegData(...);
static extern void GetActivationCode(...);
So don't separate the attributed method:
Code: [DllImport("decrypt.dll", EntryPoint = "_GetSerialRegData"/*, ExactSpelling = false*/, SetLastError=true)]
static extern void GetSerialRegData(...);
[DllImport("decrypt.dll", EntryPoint = "_GetActivationCode"/*, ExactSpelling = false*/, SetLastError = true)]
static extern void GetActivationCode(...);