468,771 Members | 1,784 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

"W" version does not work but "A" version does

I have a couple of instances where using "Auto" did not work so I tried the
"A" version of the DLL and it works.
Tried the "W" version and it doesn't.
Anyone have any idea why that might happen?
It is true that with XP Auto uses the "W" version is it not?
Thanks
Nov 17 '05 #1
6 1733

" **Developer**" <RE*************@a-znet.com> wrote in message
news:eC**************@TK2MSFTNGP14.phx.gbl...
I have a couple of instances where using "Auto" did not work so I tried the
"A" version of the DLL and it works.
Tried the "W" version and it doesn't.
Anyone have any idea why that might happen?
It is true that with XP Auto uses the "W" version is it not?
Thanks


Please be more specific, what exactly doesn't work?
Which API are you calling, how does it's signature looks like, how did you
declare it and how was it compiled?

Willy.

Nov 17 '05 #2
OK. It'll take a while. Maybe I can put one into an example.

Looking through my files I not find these, which suggest to me I found these
did not work until I changed to "A"

SHGetFileInfoA

OpenPrinterA

GetPrinterA

DocumentPropertiesA

SetPrinterA

As I remember it, the SetPrinter just didn't change the values with Auto.

The SHGetFileInfoA I just found out did not return the vales of Type and
Name with Auto

So do you know of any situation at all where it is necessary to was the "A"
version?

Thanks

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...

" **Developer**" <RE*************@a-znet.com> wrote in message
news:eC**************@TK2MSFTNGP14.phx.gbl...
I have a couple of instances where using "Auto" did not work so I tried
the "A" version of the DLL and it works.
Tried the "W" version and it doesn't.
Anyone have any idea why that might happen?
It is true that with XP Auto uses the "W" version is it not?
Thanks


Please be more specific, what exactly doesn't work?
Which API are you calling, how does it's signature looks like, how did you
declare it and how was it compiled?

Willy.

Nov 17 '05 #3
I see these are all Win32 API's, what OS are you running this on?
NT4 and higher all have both ANSI and UNICODE versions of these API's, so it
should work with Auto.

Willy.
" **Developer**" <RE*************@a-znet.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
OK. It'll take a while. Maybe I can put one into an example.

Looking through my files I not find these, which suggest to me I found
these did not work until I changed to "A"

SHGetFileInfoA

OpenPrinterA

GetPrinterA

DocumentPropertiesA

SetPrinterA

As I remember it, the SetPrinter just didn't change the values with Auto.

The SHGetFileInfoA I just found out did not return the vales of Type and
Name with Auto

So do you know of any situation at all where it is necessary to was the
"A" version?

Thanks

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...

" **Developer**" <RE*************@a-znet.com> wrote in message
news:eC**************@TK2MSFTNGP14.phx.gbl...
I have a couple of instances where using "Auto" did not work so I tried
the "A" version of the DLL and it works.
Tried the "W" version and it doesn't.
Anyone have any idea why that might happen?
It is true that with XP Auto uses the "W" version is it not?
Thanks


Please be more specific, what exactly doesn't work?
Which API are you calling, how does it's signature looks like, how did
you declare it and how was it compiled?

Willy.


Nov 17 '05 #4
Inline
Willy.

" **Developer**" <RE*************@a-znet.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
OK. It'll take a while. Maybe I can put one into an example.
The SHGetFileInfoA I just found out did not return the vales of Type and
Name with Auto
Please post your code or a repro case, guess your structure definitions are
wrong, normaly you should never explicitely call a W or A version.

So do you know of any situation at all where it is necessary to was the
"A" version?


Nov 17 '05 #5
Thanks, It'll take a while to collect anything that's meaningful and short.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Inline
Willy.

" **Developer**" <RE*************@a-znet.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
OK. It'll take a while. Maybe I can put one into an example.

The SHGetFileInfoA I just found out did not return the vales of Type and
Name with Auto

Please post your code or a repro case, guess your structure definitions
are wrong, normaly you should never explicitely call a W or A version.

So do you know of any situation at all where it is necessary to was the
"A" version?

Nov 17 '05 #6
I see now why the "A" version worked:
The default enumeration member for C# and Visual Basic is CharSet.Ansi

I needed to change the structure to CharSet.Auto
Then I believe both the structure and function expects/generates Unicode for
XP
Thanks, this is something that's been bothering me for a long while.

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Inline
Willy.

" **Developer**" <RE*************@a-znet.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
OK. It'll take a while. Maybe I can put one into an example.

The SHGetFileInfoA I just found out did not return the vales of Type and
Name with Auto

Please post your code or a repro case, guess your structure definitions
are wrong, normaly you should never explicitely call a W or A version.

So do you know of any situation at all where it is necessary to was the
"A" version?

Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by monkey | last post: by
2 posts views Thread by David Graham | last post: by
8 posts views Thread by mdh | last post: by
1 post views Thread by =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.