Hi,
I am trying to implent a graphic script into the script I already got... it's with DirectX 9.0 and C++... The error is "Unhandled exception at 0x004a5a94 in Code Name RLS.exe: 0xC0000005: Access violation reading location 0x00000000."

And the error is near that code:

Code:
HRESULT CMyD3DApplication::InitDeviceObjects()
{

    m_pFont->InitDeviceObjects( m_pd3dDevice );
    m_pFontSmall->InitDeviceObjects( m_pd3dDevice );
    m_pFontLoad->InitDeviceObjects( m_pd3dDevice );

    Vertex* Vertices;
	if(FAILED(Vertex_Buffer->Lock(0, sizeof(Polygon_Data), (void**)&Vertices, 0)))
      return false;

    memcpy(Vertices, Polygon_Data, sizeof(Polygon_Data));

    Vertex_Buffer->Unlock();
   
		if(FAILED(m_pd3dDevice->CreateVertexBuffer(sizeof(TexCoords_Data), 0, 0,
                                            D3DPOOL_DEFAULT, &TexCoord_Buffer, NULL)))
      return false;
	
    TexCoords* TexC;

    if(FAILED(TexCoord_Buffer->Lock(0, sizeof(TexCoords_Data), (void**)&TexC, 0)))
      return false;

    memcpy(TexC, TexCoords_Data, sizeof(TexCoords_Data));

    TexCoord_Buffer->Unlock();

    D3DVERTEXELEMENT9 Declaration[] = 
	   {
	      {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
		   {1, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0},
		   D3DDECL_END()
	   };
	   m_pd3dDevice->CreateVertexDeclaration(Declaration, &VertexDeclaration);

    if(D3DXCreateTextureFromFile(m_pd3dDevice, "ugp.tga", &Texture) != D3D_OK)
      return false;

	return S_OK;
}
I'm not getting it... can someone help me? There is no warnings at build time either errors codes...