http://www.purebasic.fr/english/viewtopic.php?t=8668
Was testing that code, and since I by default have unicode enabled on new sources that example failed at once.
Turning off unicode and it works.
Now... trying to make it work with unicode is a pain
as all the unicode/ansi stuff has to be reversed manually.
I'm also curious as to why there is still a IShellLinkA and IShellLinkW
Should this not be simply IShellLink now and automatic A and W like most other structures?
*scratches head*
IShellLinkA and IShellLinkW unicode
Unlike the WinAPI in general, COM is by design unicode only. Thats why PB does not
do any automatic substitution of unicode/ansi commands.
The fact that this Interface is provided in an ansi and unicode version is very
rare.
You will have to do this manually.
Btw, the IShellLinkA and W are the exact same in PB, so you just have to
swap the IID value and remove the unicode-conversion for the IPersistFile:Save
and it will work again.
do any automatic substitution of unicode/ansi commands.
The fact that this Interface is provided in an ansi and unicode version is very
rare.
You will have to do this manually.
Btw, the IShellLinkA and W are the exact same in PB, so you just have to
swap the IID value and remove the unicode-conversion for the IPersistFile:Save
and it will work again.
quidquid Latine dictum sit altum videtur
"Fixed" for those interested: http://www.purebasic.fr/english/viewtopic.php?t=24533
PS! I still think it should just be IShellLink
and let PB itself handle IShellLinkA and IShellLinkW like it does with other unicode stuff these days.
No idea what Microsoft docs say on this though, might be a reason why Fred left it like this?
PS! I still think it should just be IShellLink
and let PB itself handle IShellLinkA and IShellLinkW like it does with other unicode stuff these days.
No idea what Microsoft docs say on this though, might be a reason why Fred left it like this?
Last edited by Rescator on Thu Nov 09, 2006 4:05 am, edited 1 time in total.
Why should we go through the trouble for just this one interface !?Rescator wrote:PS! I still think it should just be IShellLink
and let PB itself handle IShellLinkA and IShellLinkW like it does with other unicode stuff these days.
A I said, COM is per design unicode only. It makes no sense to add automatic switches there.
This Interface is Microsofts stupid design decision, not ours...
quidquid Latine dictum sit altum videtur

