DirectX 7 Automation Error 
Author Message
 DirectX 7 Automation Error

Please help me. I am using DX7VB.DLL and I get an error - in any app with
this - on the line below. Please help. Thanks.

---------------------

Option Explicit
Private DX7 As DirectX7
Private DXD As DirectDraw7
Private DXDS As DirectDrawSurface7
Private DXSD As DDSURFACEDESC2

Private Sub Form_Load()
    Dim i As Long, j As Long

    Form1.Show
    'Create a DirectX7-Object and a DirectDraw-Object
    Set DX7 = New DirectX7

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Set DXD = DX7.DirectDrawCreate("")      'LINE GIVES AUTOMATION ERROR!!!
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    With DXSD
        .lFlags = DDSD_CAPS
        .ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE
    End With
    'Fullscreen and set the resolution to 640 X 480
    DXD.SetCooperativeLevel Form1.hWnd, DDSCL_EXCLUSIVE Or DDSCL_FULLSCREEN
    DXD.SetDisplayMode 640, 480, 16, 0, DDSDM_DEFAULT
    'Create the Surface using the Surfacedescription DXSD
    Set DXDS = DXD.CreateSurface(DXSD)
    i = 0

    Do Until DoEvents()

        For j = 0 To ScaleWidth Step 50
            'Set the Linecolor
            DXDS.SetForeColor i
            'Draw the line
            DXDS.DrawLine Rnd * Screen.Width, Rnd * Screen.Height, j, 0
            i = i + 1
            'Change the color

            If i = 65536 Then
                i = 0
            End If
        Next j
    Loop
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
    Call endp
End Sub

Private Sub endp()
    'Clean up things
    DXD.RestoreDisplayMode
    Set DX7 = Nothing
    Set DXD = Nothing
    Set DXDS = Nothing
    End
End Sub

-------------------------------

Please Help me. This is meant to be a chaotic line generation thingy.



Wed, 15 Oct 2003 08:20:38 GMT  
 DirectX 7 Automation Error
that line shouldnt give an automation error.
maybe u got the wrong line?

--
www.cintelsoftware.com

Quote:
> Please help me. I am using DX7VB.DLL and I get an error - in any app with
> this - on the line below. Please help. Thanks.

> ---------------------

> Option Explicit
> Private DX7 As DirectX7
> Private DXD As DirectDraw7
> Private DXDS As DirectDrawSurface7
> Private DXSD As DDSURFACEDESC2

> Private Sub Form_Load()
>     Dim i As Long, j As Long

>     Form1.Show
>     'Create a DirectX7-Object and a DirectDraw-Object
>     Set DX7 = New DirectX7

> '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Set DXD = DX7.DirectDrawCreate("")      'LINE GIVES AUTOMATION ERROR!!!
> '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>     With DXSD
>         .lFlags = DDSD_CAPS
>         .ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE
>     End With
>     'Fullscreen and set the resolution to 640 X 480
>     DXD.SetCooperativeLevel Form1.hWnd, DDSCL_EXCLUSIVE Or
DDSCL_FULLSCREEN
>     DXD.SetDisplayMode 640, 480, 16, 0, DDSDM_DEFAULT
>     'Create the Surface using the Surfacedescription DXSD
>     Set DXDS = DXD.CreateSurface(DXSD)
>     i = 0

>     Do Until DoEvents()

>         For j = 0 To ScaleWidth Step 50
>             'Set the Linecolor
>             DXDS.SetForeColor i
>             'Draw the line
>             DXDS.DrawLine Rnd * Screen.Width, Rnd * Screen.Height, j, 0
>             i = i + 1
>             'Change the color

>             If i = 65536 Then
>                 i = 0
>             End If
>         Next j
>     Loop
> End Sub

> Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As
Single,
> Y As Single)
>     Call endp
> End Sub

> Private Sub endp()
>     'Clean up things
>     DXD.RestoreDisplayMode
>     Set DX7 = Nothing
>     Set DXD = Nothing
>     Set DXDS = Nothing
>     End
> End Sub

> -------------------------------

> Please Help me. This is meant to be a chaotic line generation thingy.



Wed, 15 Oct 2003 19:46:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DirectX 7 Automation Error

2. DirectX 7 Automation Error

3. Automation errors in DirectX 8.0

4. Compile error: Automation error, Error 32811: Unexpected error

5. Automation Error during Remote Procedure Call (RPC) using DCOM and Automation Manager

6. Compilation error: Automation Error (Error 440)

7. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

8. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

9. Compilation error/Automation error

10. Compile error: Automation error

11. Automation error (Error 440)

12. Error: Automation Error and other problems

 

 
Powered by phpBB® Forum Software