xboxscene.org forums

Author Topic: Read File With Xdk  (Read 53 times)

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Read File With Xdk
« on: March 14, 2003, 04:34:00 AM »

QUOTE (yberen @ Mar 14 2003, 08:17 AM)
How can I read a file using xdk?

I always get 'file not found' or 'path not found' errors

my code is:
   HANDLE hFile = CreateFile (_T(D:Miasmediacosa.txt), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

and

   hr = D3DXLoadSurfaceFromFile (imagen, NULL, NULL, _T("D:Miasmediapompas.bmp"), NULL, D3DX_FILTER_TRIANGLE, 0, NULL);

D:\ is remapped to the directory where your app was launched.

If your app resides in "Mias" subdirectory, you need to access cosa.txt as "D:\media\cosa.txt"
Logged

Yursoft

  • Archived User
  • Newbie
  • *
  • Posts: 9
Read File With Xdk
« Reply #1 on: March 16, 2003, 01:44:00 AM »

wink.gif

UPdate: I see that the forum engine eliminate 2 backlashes. Sorry

bye
Yursoft
Logged