I'm trying to access parts of engine via com objects but i'm stuck on path parameter io::path as it need i presume object bound to that file.
Is there a way of inputing path parameter with no io::path included, like string path, or whud i need to IReferenceCounted some func with string input and to link it to do what io::path do?
getTexture(const io::path& filename) via com
Re: getTexture(const io::path& filename) via com
I think strings will automatially be cast to io::path when you use them.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: getTexture(const io::path& filename) via com
i thought so too, but when i declare passed input parameter as string it crashe the process. If i use virtual const io::path& getFileName(u32 index) const = 0;
and set the return value to be a pointer type, calling getTexture parametar with it declared as pointer works.
So that's why i was looking the solution so that i would not need to pass anything, but to form pointer directly from string input or at least calling directly io::path, but i didn't find what part of engine that do allow me access to io::path so that i can call him with com.
Im not saying that i done that call correctly (i probably mesed up on declaring tupe of string) so can you at least tell me what exact type of string is need (and is it byte depended) to be passed to io::path so that i can try one more time?
and set the return value to be a pointer type, calling getTexture parametar with it declared as pointer works.
So that's why i was looking the solution so that i would not need to pass anything, but to form pointer directly from string input or at least calling directly io::path, but i didn't find what part of engine that do allow me access to io::path so that i can call him with com.
Im not saying that i done that call correctly (i probably mesed up on declaring tupe of string) so can you at least tell me what exact type of string is need (and is it byte depended) to be passed to io::path so that i can try one more time?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: getTexture(const io::path& filename) via com
io::path is just a typedef for either stringc or stringw, depending on your settings of UTF usage for file system access.