Access Violation to ntdll.dll
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Access Violation to ntdll.dll

  1. #1
    Join Date
    Dec 2010
    Posts
    593

    Access Violation to ntdll.dll

    Code:
    if(FAILED(hr=D3DXLoadSkinMeshFromXof( (LPD3DXFILEDATA) pDataObj, TempLoadFlags,
                                           pDevice, &AdjacencyBuffer,
                                           &MaterialBuffer, NULL,
                                           &NumMaterials, &pSkin,
                                           &pLoadMesh)))
    In here, pDataObj and AdjacencyBuffer have an valid address.
    MaterialBuffer, pSkin and pLoadMesh contains 0x00000000
    and NumMaterials is on the stack, having initialized to 0
    Any ideas why I have access violation to ntdll.dll?
    Thanks
    Jack

  2. #2
    Join Date
    Apr 1999
    Posts
    27,426

    Re: Access Violation to ntdll.dll

    Quote Originally Posted by lucky6969b View Post
    Code:
    if(FAILED(hr=D3DXLoadSkinMeshFromXof( (LPD3DXFILEDATA) pDataObj, TempLoadFlags,
                                           pDevice, &AdjacencyBuffer,
                                           &MaterialBuffer, NULL,
                                           &NumMaterials, &pSkin,
                                           &pLoadMesh)))
    In here, pDataObj and AdjacencyBuffer have an valid address.
    Why did you need to cast the first argument?

    How do you know that the address of pDataObj is valid? And in any case, the documentation for that function implies that what is needed is the address of an existing item and you then pass this address, not just a pointer.

    Why is argument #6 a NULL? Looking at the documentation for the function here:
    http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

    I don't see it documented that NULL values are accepted.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Dec 2010
    Posts
    593

    Re: Access Violation to ntdll.dll

    I think the interface has changed, it accepted a IDirectXFileData * as a parameter before.
    But it is now changed to LPD3DXFileData, not sure the later inherits from the former.
    D3DX is an extension to plain vanilla DirectX
    Thanks
    Jack

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center