Newbie error trying to create HW adapter 
Author Message
 Newbie error trying to create HW adapter

Using W2000, VB6, DX8, Intel 82815 chipset w/latest driver

I input MSDN graphics tutorial step 1 and 2
( http://www.*-*-*.com/
url=/library/en-
us/dx8_vb/directx_vb/Graphics/ProgrammersGuide/GettingStart
ed/Tutorials/VB/1/step2.asp).  

This tutorial simply initilizes DX8 and creates display
adapter, but I get 'automation error' when i perform
obj.CreateDevice

MSDN help for this method is at
http://www.*-*-*.com/
url=/library/en-
us/dx8_vb/directx_vb/Graphics/reference/VB/D3D/Classes/Dire
ct3D8/createdevice.asp

I have tried all different combinations of parameters, but
it always ends with automation error.  
I have already created a reference to DirectX 8 for Visual
Basic Type Library.  Am I missing something more
fundamental?

See code below for err output.

Thanks,
L

Code is verbatim from MSDN:

Private Sub Form_Load()
    BorderStyle = 2 - Sizeable
    Caption = "Create Device"
    Height = 3600
    Left = 0
    Top = 0
    Width = 4800
    LinkTopic = "Form1"
    'MaxButton = True
    'MinButton = True
    ScaleHeight = 3195
    ScaleMode = 1 - Twip
    ScaleWidth = 254
    'StartUpPosition = 3   '- Windows Default

    Me.Show

    Initialize

End Sub

Public Function Initialize() As Boolean
    Dim g_DX As DirectX8  'Laine added
    Set g_DX = New DirectX8 'Laine added

    Dim g_D3D As Direct3D8  'Laine added
    Set g_D3D = g_DX.Direct3DCreate()
    If g_D3D Is Nothing Then Exit Function

    Dim Mode As D3DDISPLAYMODE
    g_D3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, Mode

    Dim d3dpp As D3DPRESENT_PARAMETERS
    d3dpp.Windowed = 1
    d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
    d3dpp.BackBufferFormat = Mode.Format

    Set g_D3DDevice = g_D3D.CreateDevice
(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, Form1.hWnd, _
        D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)
    'This code returns the following error (ERR output)
    '    : Description  : "Automation error"            :
String    : Form1.Initialize
    '    : HelpContext  : 1000440                       :
Long      : Form1.Initialize
    '    : HelpFile     : "C:\WINNT\Help\VBENLR98.CHM"  :
String    : Form1.Initialize
    '    : LastDllError : 0                             :
Long      : Form1.Initialize
    '    : Number       : -2005530516                   :
Long      : Form1.Initialize
    '    : Source       : "Project1"                    :
String    : Form1.Initialize

    If g_D3DDevice Is Nothing Then Exit Function

End Function



Mon, 25 Apr 2005 02:43:31 GMT  
 Newbie error trying to create HW adapter


Fri, 19 Jun 1992 00:00:00 GMT  
 Newbie error trying to create HW adapter
I finally solved my dilemma just now.  Today I had DLed
SDK8.1, tried to run a couple samples & got the same thing
(couldn't create adapter).

Finally, one diag tool told me switch to 16 or 32 bit
color mode!  I had been in 24-bit (true color).  I changed
to 16-bit (high color) & all errors went away.  Why why
why?

And how should I have known this?

Thanks to anyone who will listen,
L

Quote:
>-----Original Message-----
>Using W2000, VB6, DX8, Intel 82815 chipset w/latest driver

>I input MSDN graphics tutorial step 1 and 2
>(http://msdn.microsoft.com/library/default.asp?
>url=/library/en-
>us/dx8_vb/directx_vb/Graphics/ProgrammersGuide/GettingStar
t
>ed/Tutorials/VB/1/step2.asp).  

>This tutorial simply initilizes DX8 and creates display
>adapter, but I get 'automation error' when i perform
>obj.CreateDevice

>MSDN help for this method is at
>http://msdn.microsoft.com/library/default.asp?
>url=/library/en-
>us/dx8_vb/directx_vb/Graphics/reference/VB/D3D/Classes/Dir
e
>ct3D8/createdevice.asp

>I have tried all different combinations of parameters,
but
>it always ends with automation error.  
>I have already created a reference to DirectX 8 for
Visual
>Basic Type Library.  Am I missing something more
>fundamental?

>See code below for err output.

>Thanks,
>L

>Code is verbatim from MSDN:

>Private Sub Form_Load()
>    BorderStyle = 2 - Sizeable
>    Caption = "Create Device"
>    Height = 3600
>    Left = 0
>    Top = 0
>    Width = 4800
>    LinkTopic = "Form1"
>    'MaxButton = True
>    'MinButton = True
>    ScaleHeight = 3195
>    ScaleMode = 1 - Twip
>    ScaleWidth = 254
>    'StartUpPosition = 3   '- Windows Default

>    Me.Show

>    Initialize

>End Sub

>Public Function Initialize() As Boolean
>    Dim g_DX As DirectX8  'Laine added
>    Set g_DX = New DirectX8 'Laine added

>    Dim g_D3D As Direct3D8  'Laine added
>    Set g_D3D = g_DX.Direct3DCreate()
>    If g_D3D Is Nothing Then Exit Function

>    Dim Mode As D3DDISPLAYMODE
>    g_D3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, Mode

>    Dim d3dpp As D3DPRESENT_PARAMETERS
>    d3dpp.Windowed = 1
>    d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
>    d3dpp.BackBufferFormat = Mode.Format

>    Set g_D3DDevice = g_D3D.CreateDevice
>(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, Form1.hWnd, _
>        D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)
>    'This code returns the following error (ERR output)
>    '    : Description  : "Automation error"            :
>String    : Form1.Initialize
>    '    : HelpContext  : 1000440                       :
>Long      : Form1.Initialize
>    '    : HelpFile     : "C:\WINNT\Help\VBENLR98.CHM"  :
>String    : Form1.Initialize
>    '    : LastDllError : 0                             :
>Long      : Form1.Initialize
>    '    : Number       : -2005530516                   :
>Long      : Form1.Initialize
>    '    : Source       : "Project1"                    :
>String    : Form1.Initialize

>    If g_D3DDevice Is Nothing Then Exit Function

>End Function

>.



Mon, 25 Apr 2005 09:17:07 GMT  
 Newbie error trying to create HW adapter
Hardware accelleration is generally not supported in 8 or 24 bit modes for
efficiency reasons. For simplicity, error checking in samples is generaly
quite basic...

Patrice



Quote:
> I finally solved my dilemma just now.  Today I had DLed
> SDK8.1, tried to run a couple samples & got the same thing
> (couldn't create adapter).

> Finally, one diag tool told me switch to 16 or 32 bit
> color mode!  I had been in 24-bit (true color).  I changed
> to 16-bit (high color) & all errors went away.  Why why
> why?

> And how should I have known this?

> Thanks to anyone who will listen,
> L

> >-----Original Message-----
> >Using W2000, VB6, DX8, Intel 82815 chipset w/latest driver

> >I input MSDN graphics tutorial step 1 and 2
> >(http://msdn.microsoft.com/library/default.asp?
> >url=/library/en-
> >us/dx8_vb/directx_vb/Graphics/ProgrammersGuide/GettingStar
> t
> >ed/Tutorials/VB/1/step2.asp).

> >This tutorial simply initilizes DX8 and creates display
> >adapter, but I get 'automation error' when i perform
> >obj.CreateDevice

> >MSDN help for this method is at
> >http://msdn.microsoft.com/library/default.asp?
> >url=/library/en-
> >us/dx8_vb/directx_vb/Graphics/reference/VB/D3D/Classes/Dir
> e
> >ct3D8/createdevice.asp

> >I have tried all different combinations of parameters,
> but
> >it always ends with automation error.
> >I have already created a reference to DirectX 8 for
> Visual
> >Basic Type Library.  Am I missing something more
> >fundamental?

> >See code below for err output.

> >Thanks,
> >L

> >Code is verbatim from MSDN:

> >Private Sub Form_Load()
> >    BorderStyle = 2 - Sizeable
> >    Caption = "Create Device"
> >    Height = 3600
> >    Left = 0
> >    Top = 0
> >    Width = 4800
> >    LinkTopic = "Form1"
> >    'MaxButton = True
> >    'MinButton = True
> >    ScaleHeight = 3195
> >    ScaleMode = 1 - Twip
> >    ScaleWidth = 254
> >    'StartUpPosition = 3   '- Windows Default

> >    Me.Show

> >    Initialize

> >End Sub

> >Public Function Initialize() As Boolean
> >    Dim g_DX As DirectX8  'Laine added
> >    Set g_DX = New DirectX8 'Laine added

> >    Dim g_D3D As Direct3D8  'Laine added
> >    Set g_D3D = g_DX.Direct3DCreate()
> >    If g_D3D Is Nothing Then Exit Function

> >    Dim Mode As D3DDISPLAYMODE
> >    g_D3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, Mode

> >    Dim d3dpp As D3DPRESENT_PARAMETERS
> >    d3dpp.Windowed = 1
> >    d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
> >    d3dpp.BackBufferFormat = Mode.Format

> >    Set g_D3DDevice = g_D3D.CreateDevice
> >(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, Form1.hWnd, _
> >        D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)
> >    'This code returns the following error (ERR output)
> >    '    : Description  : "Automation error"            :
> >String    : Form1.Initialize
> >    '    : HelpContext  : 1000440                       :
> >Long      : Form1.Initialize
> >    '    : HelpFile     : "C:\WINNT\Help\VBENLR98.CHM"  :
> >String    : Form1.Initialize
> >    '    : LastDllError : 0                             :
> >Long      : Form1.Initialize
> >    '    : Number       : -2005530516                   :
> >Long      : Form1.Initialize
> >    '    : Source       : "Project1"                    :
> >String    : Form1.Initialize

> >    If g_D3DDevice Is Nothing Then Exit Function

> >End Function

> >.



Tue, 26 Apr 2005 00:48:34 GMT  
 Newbie error trying to create HW adapter
Hi,

In addition to what Patrice mentions, you may have been lucky to get your eyes falling on the small
sentence:

"Note that render target formats are restricted to D3DFMT_X1R5G5B5, D3DFMT_R5G6B5, D3DFMT_X8R8G8B8,
and D3DFMT_A8R8G8B8."

which is the first Remark under the topic  "CONST_D3DFORMAT", in the help file.  Not obvious, not
obvious at all, and given that this error is very frequent, and STOP any further interest, for a
beginner that fall on that limitation, it is something that indeed SHOULD be more "in evidence",
imho.

Vanderghast, Access MVP


Quote:
> I finally solved my dilemma just now.  Today I had DLed
> SDK8.1, tried to run a couple samples & got the same thing
> (couldn't create adapter).

> Finally, one diag tool told me switch to 16 or 32 bit
> color mode!  I had been in 24-bit (true color).  I changed
> to 16-bit (high color) & all errors went away.  Why why
> why?

> And how should I have known this?

> Thanks to anyone who will listen,
> L

> >-----Original Message-----
> >Using W2000, VB6, DX8, Intel 82815 chipset w/latest driver

> >I input MSDN graphics tutorial step 1 and 2
> >(http://msdn.microsoft.com/library/default.asp?
> >url=/library/en-
> >us/dx8_vb/directx_vb/Graphics/ProgrammersGuide/GettingStar
> t
> >ed/Tutorials/VB/1/step2.asp).

> >This tutorial simply initilizes DX8 and creates display
> >adapter, but I get 'automation error' when i perform
> >obj.CreateDevice

> >MSDN help for this method is at
> >http://msdn.microsoft.com/library/default.asp?
> >url=/library/en-
> >us/dx8_vb/directx_vb/Graphics/reference/VB/D3D/Classes/Dir
> e
> >ct3D8/createdevice.asp

> >I have tried all different combinations of parameters,
> but
> >it always ends with automation error.
> >I have already created a reference to DirectX 8 for
> Visual
> >Basic Type Library.  Am I missing something more
> >fundamental?

> >See code below for err output.

> >Thanks,
> >L

> >Code is verbatim from MSDN:

> >Private Sub Form_Load()
> >    BorderStyle = 2 - Sizeable
> >    Caption = "Create Device"
> >    Height = 3600
> >    Left = 0
> >    Top = 0
> >    Width = 4800
> >    LinkTopic = "Form1"
> >    'MaxButton = True
> >    'MinButton = True
> >    ScaleHeight = 3195
> >    ScaleMode = 1 - Twip
> >    ScaleWidth = 254
> >    'StartUpPosition = 3   '- Windows Default

> >    Me.Show

> >    Initialize

> >End Sub

> >Public Function Initialize() As Boolean
> >    Dim g_DX As DirectX8  'Laine added
> >    Set g_DX = New DirectX8 'Laine added

> >    Dim g_D3D As Direct3D8  'Laine added
> >    Set g_D3D = g_DX.Direct3DCreate()
> >    If g_D3D Is Nothing Then Exit Function

> >    Dim Mode As D3DDISPLAYMODE
> >    g_D3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, Mode

> >    Dim d3dpp As D3DPRESENT_PARAMETERS
> >    d3dpp.Windowed = 1
> >    d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
> >    d3dpp.BackBufferFormat = Mode.Format

> >    Set g_D3DDevice = g_D3D.CreateDevice
> >(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, Form1.hWnd, _
> >        D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)
> >    'This code returns the following error (ERR output)
> >    '    : Description  : "Automation error"            :
> >String    : Form1.Initialize
> >    '    : HelpContext  : 1000440                       :
> >Long      : Form1.Initialize
> >    '    : HelpFile     : "C:\WINNT\Help\VBENLR98.CHM"  :
> >String    : Form1.Initialize
> >    '    : LastDllError : 0                             :
> >Long      : Form1.Initialize
> >    '    : Number       : -2005530516                   :
> >Long      : Form1.Initialize
> >    '    : Source       : "Project1"                    :
> >String    : Form1.Initialize

> >    If g_D3DDevice Is Nothing Then Exit Function

> >End Function

> >.



Tue, 26 Apr 2005 19:34:21 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie trying to create wee app.

2. Run time error when trying to save a created file

3. Getting error 429a when trying create database

4. Error 429 trying to create Word objects - help!

5. Error 48 trying to create an instance of Outlook.Application

6. VB4 Setup problem--Error trying to create program icon-repost

7. trying to create account - how to interpret error?

8. Error Trying to create a db connection

9. Getting an Error 429 when trying to create an ADO connection

10. newbie's db adapter problem

11. Networking, Disabling An Adapter And Re-enabling An Adapter

12. !Really off the wall question: Mapping Network adapter key value to adapter name

 

 
Powered by phpBB® Forum Software