Critical problem Working with D3D in thread!

IDirect3DDevice9 created outside in main process. task is to load DirectX model inside a new thread in order to realize runtime load,

ThreadProc created using CreateThread in MainProcess

All Device ptr passed to the thread confirmed.

Prob. discribtion:

Loading model using D3DXLoadMeshFromX, D3DXLoadMeshHierarchyFromX ... will triggler randsom error over E_OUTOFMEMOTY, or other exceptions. the bigger the file the more frequently the problem pop up.

ALREADY TRIED: set thread stack size. dont work!

Can anybody help?

[596 byte] By [SimonCore] at [2007-12-23]
# 1
Try using the D3DCREATE_MULTITHREADED flag when you create your device and ensure that you're not violating any of the restrictions given in the "Multithreading Issues" topic in the DirectX SDK documentation.
RossRidge at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: General...