Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Unicode Problem - D3DXCreateTextureFromFile

Started by parksp2 Sep 23, 2006 at 11:46 PM 1 replies 550+ views
Original Post
parksp2
parksp2
Hi~ i have some problems.. ------------- if(d3dxMaterials.pTextureFilename!=NULL&&lstrlen(d3dxMaterials.pTextureFilename)>0) { D3DXCreateTextureFromFile(m_pD3DDevice,d3dxMaterials.pTextureFilename),&g_pMeshTextures); } ------------- i can't cast LPCSTR to LPCWSTR (LPCWSTR)d3dxMaterials.pTextureFilename -> don't work... how can i solve the problem?
xyzzy00
xyzzy00
Easiest way is probably to just stick an 'A' on the end of the name.. D3DXCreateTextureFromFileA.. to call the non-unicode version of the function.

xyzzy
parksp2
parksp2
thank you xyzzy00 :)

I always use D3DXCreateTextureFromFileW. :(

also I always use lstrlenW() ..

....

..............

Aaaaaakkkk!!!!

thank you :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.