Habe folgendes Problem:
Ich habe schon mehrmals mittels DllImport dlls in meinen C# Projekten verwendet.. allerdings bekomme ich jetzt haufenweise Kompilierfehler wenn ich versuche mittels
[DllImport("user32.dll",EntryPoint="FindWindow")]
private static extern int FindWindow(string _ClassName, string _WindowName);
user32.dll einzubinden.
System.Runtime.InteropServices ist eingebunden.. und ein älteres Projekt verwendet denselben Code, kann allerdings immer noch kompiliert werden.
Fehler:
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): Invalid expression term '['
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): Invalid expression term ']'
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'private'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'static'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'extern'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Expected ; or = (cannot specify constructor arguments in declaration)
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'string'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'string'
Ich habe schon mehrmals mittels DllImport dlls in meinen C# Projekten verwendet.. allerdings bekomme ich jetzt haufenweise Kompilierfehler wenn ich versuche mittels
[DllImport("user32.dll",EntryPoint="FindWindow")]
private static extern int FindWindow(string _ClassName, string _WindowName);
user32.dll einzubinden.
System.Runtime.InteropServices ist eingebunden.. und ein älteres Projekt verwendet denselben Code, kann allerdings immer noch kompiliert werden.
Fehler:
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): Invalid expression term '['
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): Invalid expression term ']'
c:\reflection_test\WindowsApplication2\Form1.cs(79 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'private'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'static'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'extern'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): ; expected
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Expected ; or = (cannot specify constructor arguments in declaration)
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'string'
c:\reflection_test\WindowsApplication2\Form1.cs(80 ): Invalid expression term 'string'
Comment