wie weet wat deze runtime error betekend

Run-time error '-2147417848 (80010108)':
Automation error

ik krijg deze error altijd als ik een vb6 bestandje hebt gemaakt, dus een exe van heb gemaakt

dit is de code,

' Deze public array wordt gebruikt om de toestand van elke uitgang bij te houden
Public Output(8) As Integer
Public KnightRiderValue As Integer
Public KnightRiderDirection As String
Public KnightRiderSteps(100) As Integer
Public KRStep As Integer

Public Sub SetPort()
' Wanneer deze subroutine wordt aangeroepen, dan:
' - worden alle Outx-waarden opgeroepen
' - wordt de waarde berekend die op de poort gezet moet worden
' (deze is afhankelijk van de Outx-waarden)
' - wordt de berekende waarde op de poort gezet

' Bereken de waarde die op de parallelle poort moet gezet worden
OutputValue = Output(8) * 128
OutputValue = OutputValue + (Output(7) * 64)
OutputValue = OutputValue + (Output(6) * 32)
OutputValue = OutputValue + (Output(5) * 16)
OutputValue = OutputValue + (Output(4) * 8)
OutputValue = OutputValue + (Output(3) * 4)
OutputValue = OutputValue + (Output(2) * 2)
OutputValue = OutputValue + (Output(1) * 1)

' Laat een rode indicator zien wanneer de uitgang "uit" is en
' een groene als de uitgang "aan" is
For Counter = 1 To 8
If Output(Counter) = 1 Then
Form1.Indicator(Counter).FillColor = 65280
Else
Form1.Indicator(Counter).FillColor = 255
End If
Next Counter

' Zet de berekende waarde op de parallelle poort
Form1.PortOutput.Caption = OutputValue
Form1.Ioport1.Value = OutputValue
End Sub

Public Sub TurnOffOutput(ByVal OutputNumber As Integer)
' Zet de uitgang op 0
Output(OutputNumber) = 0
End Sub

Public Sub InvertOutput(ByVal OutputNumber As Integer)
' Als de uitgang "aan" staat, zet hem "uit" en omgekeerd
If Output(OutputNumber) = 1 Then
Output(OutputNumber) = 0
Else
Output(OutputNumber) = 1
End If
End Sub

Public Sub TurnOffTimer(ByVal TimerNumber As Integer)
' Zet de timer uit
Form1.Timer(TimerNumber).Enabled = False
End Sub

Public Sub ActivateTimer(ByVal TimerNumber As Integer, ByVal IntervalDuration As Integer)
' Zet de timer uit, zet het interval en zet de timer terug aan
Form1.Timer(TimerNumber).Enabled = False
Form1.Timer(TimerNumber).Interval = IntervalDuration
Form1.Timer(TimerNumber).Enabled = True
End Sub

Public Sub DoButtonOnOff(ByVal OutputNumber As Integer)
' Schakel de KnightRiderTimer uit
Form1.KnightRiderTimer.Enabled = False

' Zet in ieder geval de timer "uit"
Call TurnOffTimer(OutputNumber)

' Als Uitgang 1 "aan" is, zet deze uit.
' Zoniet, zet de uitgang dan aan.
Call InvertOutput(OutputNumber)

' Vernieuw de waarde op de parallelle poort
Call SetPort
End Sub

Public Sub DoButtonWissel1(ByVal OutputNumber As Integer)
' Schakel de KnightRiderTimer uit
Form1.KnightRiderTimer.Enabled = False

' Bij het inschakelen van het "Wissel"-commando,
' - Schakel timer uit
' - zet het interval op 0,5 seconden
' - schakel timer terug in
Call ActivateTimer(OutputNumber, 500)
End Sub

Public Sub DoButtonWissel2(ByVal OutputNumber As Integer)
' Schakel de KnightRiderTimer uit
Form1.KnightRiderTimer.Enabled = False

' Bij het inschakelen van het "Wissel"-commando,
' - Schakel timer uit
' - zet het interval op 1 seconde
' - schakel timer terug in
Call ActivateTimer(OutputNumber, 1000)
End Sub

Public Sub DoButtonReset(ByVal OutputNumber As Integer)
' Schakel de KnightRiderTimer uit
Form1.KnightRiderTimer.Enabled = False

' Zet in ieder geval de timer "uit"
Call TurnOffTimer(OutputNumber)

' Zet de uitgang op "0" (= UIT)
Call TurnOffOutput(OutputNumber)

' Vernieuw de waarde op de parallelle poort
Call SetPort
End Sub

Public Sub DoButtonResetAll()
' Schakel de KnightRiderTimer uit
Form1.KnightRiderTimer.Enabled = False

' Hier wordt een variabele gebruikt om van 1 tot 8 te tellen.
' Per keer dat er opgeteld wordt:
' - wordt de timer afgezet
' - wordt de uitgang uitgezet
' Zodoende worden alle timers en uitgangen op 0 gezet
For Counter = 1 To 8
Call TurnOffTimer(Counter)
Call TurnOffOutput(Counter)
Next Counter

' Vernieuw de waarde op de parallelle poort
Call SetPort
End Sub

Public Sub DoButtonKnightRider()
' Hier wordt een variabele gebruikt om van 1 tot 8 te tellen.
' Per keer dat er opgeteld wordt:
' - wordt de timer afgezet
' - wordt de uitgang uitgezet
' Zodoende worden alle timers en uitgangen op 0 gezet
For Counter = 1 To 8
Call TurnOffTimer(Counter)
Call TurnOffOutput(Counter)
Next Counter

' Begin bij stap 0 voor het knightrider effect
KRStep = 0
' Begin met omhoog te tellen
KnightRiderDirection = "Up"

' Start het effect (start de knightrider-timer)
Form1.KnightRiderTimer.Enabled = True
End Sub

Public Sub DecodeKnightRiderValue()
' Maak een tijdelijke variabele aan
Dim TempValue As Integer

' Bewaar de KnightRiderValue in deze tijdelijke variabele
TempValue = KnightRiderValue

' Decodeer de waarde in TempValue in de 8 afzonderlijke bits voor elke uitgang
If TempValue >= 128 Then
TempValue = TempValue - 128
Output(8) = 1
Else
Output(8) = 0
End If

If TempValue >= 64 Then
TempValue = TempValue - 64
Output(7) = 1
Else
Output(7) = 0
End If

If TempValue >= 32 Then
TempValue = TempValue - 32
Output(6) = 1
Else
Output(6) = 0
End If

If TempValue >= 16 Then
TempValue = TempValue - 16
Output(5) = 1
Else
Output(5) = 0
End If

If TempValue >= 8 Then
TempValue = TempValue - 8
Output(4) = 1
Else
Output(4) = 0
End If

If TempValue >= 4 Then
TempValue = TempValue - 4
Output(3) = 1
Else
Output(3) = 0
End If

If TempValue >= 2 Then
TempValue = TempValue - 2
Output(2) = 1
Else
Output(2) = 0
End If

If TempValue >= 1 Then
TempValue = TempValue - 1
Output(1) = 1
Else
Output(1) = 0
End If
End Sub

wie weet wat der fout aan is

Kijk een bij MyCrow-soft voor dit soort vragen. Ben ik niet zo in thuis. Een lcd'tje is nog elektronica maar dit is puur software. Hoort niet thuis op dit forum

Google is je vriend, probeer je foutmelding maar eens.

MvgEat

Direct IO error? Win XP?

ik heb gevonden dat het hier ergens tussen moet zitten

' Zet de berekende waarde op de parallelle poort
Form1.PortOutput.Caption = OutputValue
Form1.Ioport1.Value = OutputValue
End Sub
als ik deze regel

Form1.Ioport1.Value = OutputValue

weg haal dan start hij de exe file wel op maar dan schrijft hij niet naar de poort

ik heb io dll geinstalleert in mijn systemmap en ik draai idd xp.

Ik ken VB niet. Maar als je deze fout melding via Google opzoekt blijk je niet de enige te zijn die hem krijgt. Zie de diverse fora.

Zou een bug in VB zijn, die te maken heeft met verouderde versies van ocx en dll bestanden of het gebruiken van Win2000 of WinNT ocx-en/dll's onder XP.

Dit is wat ik op de website van Micro$oft gevonden heb, hopelijk kan je er iets mee doen:

SYMPTOMS
You are using the Add method of the Forms collection to load a form. The code works correctly in the Visual Basic development environment, but fails with the following error when the application is made into an executable:
Run-time error '-2147417848 (80010108)':
Automation error.

RESOLUTION
You can work around this problem by creating your own Forms collection. A reference to the form can be added to a collection, and keyed by the Form's name. This will let you load a form by specifying a text string and referencing the matching key field in the collection.

There are two options with this approach. You can pre-load the collection with a reference to all of the forms in the application at startup, which is the approach used in the following example. You may also load the forms into the collection as needed. There is slightly more programmatic overhead with the second approach, because you must check to see if the form is already in the collection. It is also important to note that adding the forms to the collection does not load the forms.

Steps to work around this problem are:
1. Start a new Standard EXE project in Visual Basic. Form1 is created by default.
2. From the Project menu, add a second form to the project.
3. From the Project menu, add a standard module to the project.
4. Add the following code to the code window of Form1:

Private Sub Form_Click()
Dim strFormToLoad As String
strFormToLoad = "Form2"
loadForm (strFormToLoad)
End Sub

Private Sub Form_Load()
colForms.Add Form2, "Form2"
End Sub

5. Add the following code to Module1:

Public colForms As New Collection

Public Sub loadForm(strFormName As String)
Dim frm As Form
Set frm = colForms(strFormName)
frm.Show

End Sub

6. Run the project and click on Form1.
7. Form2 should be loaded.
8. Stop the project.
9. Choose Make Project1.exe from the File menu.
10. Run Project1.exe, and click on Form1.
11. Form2 should load successfully.

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
MORE INFORMATION
Steps to Reproduce Behavior
1. Start a new Standard EXE project in Visual Basic. Form1 is created by default.
2. From the Project menu, add a second form to the project.
3. From the Project menu, add a standard module to the project.
4. Add the following code to the code window of Form1:

Private Sub Form_Click()
Dim strFormToLoad As String
strFormToLoad = "Form2"
loadForm (strFormToLoad)
End Sub

5. Add the following code to Module1:

Public Sub loadForm(strFormName As String)
Dim frm As Form
Set frm = Forms.Add(strFormName)
frm.Show
End Sub

6. Run the project, and click on Form1.
7. Form2 should be loaded.
8. Stop the project.
9. Choose Make Project1.exe from the File menu.
10. Run Project1.exe, and click on Form1.
11. You should receive the error message listed above.