   DX10 problem with ID3D10Buffer::Map
  Hii´ve created a ID3D10Buffer which will store all the object´s vertices with...D3D10_BUFFER_DESC vertex_buffer_desc;vertex_buffer_desc.Usage = D3D10_USAGE_DYNAMIC;vertex_buffer_desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;vertex_buffer_desc.BindFlags = D3D10_BIND_VERTEX_BUFFER;vertex_buffer_desc.MiscFlags = 0;vertex_buffer_desc.ByteWidth = ...;i want the buffer to be updated from the cpu sometimes, so i set the appropiate flags. The buffer is created ok, cause i can render the object and it looks as it should, and the createbuffer function returns ok.my problem is that whenever i try to access this buffer from the cpu i get thisfloat *data = NULL;HRESULT hr = dx10_vertex_data_buffer->Map(D3D10_MAP_WRITE, 0, (void **) &data);if (FAILED(hr))    return false;this gives me an EINVALIDARG in the hresult and of course it failswhat am i missing??? any ideas????   
  Pass the debug flag to your device on device creation, and you will get extremely verbose error messages in your output window that tell you what you're doing wrong.   ;  thanksnow i have a nice message showing me what i did wrongreally useful info ;)   