Results 1 to 3 of 3

Thread: Parsing .x files : conversion problem ...

  1. #1

    Parsing .x files : conversion problem ...

    Hi all !

    I was trying to create a little algorithm in order to parse .x files.

    So I used the .x file structures(IdirectXfileObject, etc ...) but I got a problem when attempting to get the data.

    Just look at that line of code in C++ :

    "pData->GetName(pName, &dwSize);"

    I had some problems to translate it to Delphi...

    pData is a IDirectXFileData
    pName if a PCHAR
    and dwSize if a DWORD

    So ... Chat would be the delphi translation ?
    I tried this :

    pData.GetName(pName, @dwSize);

    But I get bad result ...

    Can someone help me ?

    Thx a lot

    Bye
    Avatar

    ps : Sorry if I made any mistake in my sentences

  2. #2

    Parsing .x files : conversion problem ...

    [pascal][background=#FFFFFF][normal=#000000][number=#0000FF][string=#0000FF][comment=#248F24][reserved=#000000]var
    pXofChildData: IDirectXFileData;
    name: array[0..255] of Char;
    nameLen: DWORD;
    begin
    ...
    nameLen:= SizeOf(name);
    pXofChildData.GetName(@name, nameLen);
    ...
    end;[/pascal]

    This is implemented in: http://clootie.narod.ru/delphi/downl..._MeshHierarchy
    There are only 10 types of people in this world; those who understand binary and those who don't.

  3. #3

    Parsing .x files : conversion problem ...

    That's right, just found it, but there's still a problem ...

    pXofChildData.GetName(@name, nameLen);

    doesn't work ... I had to type :

    pXofChildData.GetName(@name, @nameLen);

    Perhaps it's because I'm using DX8.1 and not DX9

    Anyway thanks a lot !

    bye
    Avatar

Bookmarks

Posting Permissions

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