Autor Beitrag
blutengel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59

Win XP, WIN 7
VS#2008 Prof
BeitragVerfasst: Mo 27.12.10 22:52 
Hi!

möchte mit einem Programm etwas auf meinem LPT Port ausgeben. Leider bekomme ich immer eine Fehlermeldung:

Es wurde versucht, eine Datei mit einem falschen Format zu laden. (Ausnahme von HRESULT: 0x8007000B)

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices; //externe Klassen einbinden

namespace LPT_Test
{
    class Program
    {
        static void Main(string[] args)
        {
            LptAccess.Output(0x37864);
        }
    }
    public class LptAccess
    {
        [DllImport("inpout32.dll", EntryPoint = "Out32")]
        public static extern void Output(int address, int val);
        [DllImport("inpout32.dll", EntryPoint = "Out32")]
        public static extern void Input(int address);


Ich sollte noch dazu sage das ich Win 7 nutze.Liegt es vielleicht daran. Unter XP lief es immer

MFG

blutengel
Greenberet
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 339
Erhaltene Danke: 20

Win 10
C# (VS 2012), C++ (VS 2012/GCC), PAWN(Notepad++), Java(NetBeans)
BeitragVerfasst: Mo 27.12.10 23:01 
Google...erster treffer liefert die Antwort