|
And, as usual, the responses from Microsoft demonstrate that their tech support are pretty useless.
|
|
|
|
|
Quote: And, as usual, the responses from Microsoft demonstrate that their tech support are pretty useless.
That is something a too hard judgment I think. MS does document the API pretty well, take into acount the amount of Information...
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Well that is a different issue; I was talking about the answers posted to questions in some of the Microsoft forums. I have always found (with a few exceptions that are less important) the information on MSDN to be useful and well presented.
|
|
|
|
|
Richard MacCutchan wrote: But when I built the program all the version related functions gave LNK2019 errors, unresolved external symbol.
Go back and #define WINVER and _WIN32_WINNT and recompile. The old version.lib is for legacy desktop applications. It sounds like you are either using an older compiler or targeting an older operating system < Windows 8.
It's basically a documentation issue. The documentation is incorrect if you are targeting older platforms. Much of the documentation will be moving to GitHub.
Best Wishes,
-David Delaune
|
|
|
|
|
No, none of those, it's a linker problem, not compiler. The issue has nothing to do with versions of Visual Studio or Windows (I'm using VS2017 on Windows 10), it's purely the fact that the A versions of those functions are not in Mincore.lib, despite the statement in the documentation.
|
|
|
|
|
Yeah,
The documentation is incorrect.
Best Wishes,
-David Delaune
|
|
|
|
|
You work for Microsoft, yes? If so, then I would take your word as truth here. Just saying...
|
|
|
|
|
Hi,
Don't take my word for it. Here is how you would check if the documentation was correct for GetFileVersionInfoA
1.) Open a CMD prompt and use dumpbin to check the export table of mincore.lib.
Here are the results:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x64>dumpbin /exports mincore.lib | findstr "GetFileVersion"
GetFileVersionInfoExW
GetFileVersionInfoSizeExW
GetFileVersionInfoSizeW
GetFileVersionInfoW
The ANSI version is not exported from mincore.lib as Richard MacCutchan describes and does indeed conflict with what the GetFileVersionInfoA function documentation states.
Best Wishes,
-David Delaune
|
|
|
|
|
Who still targets the ANSI versions nowadays anyway?
|
|
|
|
|
Anyone who still uses C or C++, where the default for character data is ASCII rather than Unicode.
|
|
|
|
|
I sometimes use a library that is wrapper for four others and it would be a PITA to make all of that work with Unicode. That's the only time I don't use Unicode these days and that is not very often.
One of these days I'll do it but it's pretty low on my priority list.
|
|
|
|
|
I realize it's still the default - but why should anyone not use the Unicode version? It's built-in, it's well understood, well-tested, and lets you target any number of languages.
|
|
|
|
|
dandy72 wrote: target any number of languages. But this issue is purely about the C/C+ Windows libraries. And there are still many programs around that use ASCII. And judging by questions here, many new programmers are not being taught to use Unicode.
|
|
|
|
|
Richard MacCutchan wrote: But this issue is purely about the C/C+ Windows libraries
...which pretty much all support Unicode, so you might as well use it if there's any possibility you might need to internationalize your app...no?
Richard MacCutchan wrote: And judging by questions here, many new programmers are not being taught to use Unicode.
That's not an excuse for anyone else to fall back to purely ANSI APIs just to accommodate them.
|
|
|
|
|
dandy72 wrote: you might need to internationalize your app Who would want to do that? Mercans?
But seriously. I am not defending either stance, merely saying what is the reality. Bjorn had the chance when he created C++ to make Unicode the default, but since he didn't it is still a PITA to do it.
|
|
|
|
|
Richard MacCutchan wrote: Bjorn had the chance when he created C++ to make Unicode the default, but since he didn't it is still a PITA to do it.
Is it?
I haven't done C++ in a dozen years (never looked back after C#), and I remember that the Windows SDK had a pretty decent set of macros that invoked either the A or W variants of pretty much all APIs based on compiler flags. Once I had settled into a routine of writing all my code "following that style", it was pretty much a no-brainer.
Or so I recall. OTOH it's not like I have any reason to be trying to paint a prettier picture of C++ than what it was actually like for me.
|
|
|
|
|
That is all very true, but I was talking about the use of character constants:
TCHAR* psomething = TEXT("some text");
WCHAR* psomethingElse = L"sometext";
as opposed to
char text = "some text";
and even wstring is the same, and try using wcout to print some Unicode characters.
|
|
|
|
|
Agreed...took me a while to get used to it, but once you've settled into the pattern, it became second nature to me. But making the transition was painful.
My surprise was that this isn't what newcomers are getting exposed to from the get-go in this day and age, so they don't have to "unlearn everything they thought they already knew about string manipulation".
|
|
|
|
|
|
Hilarious! Loved Jamie Olivers christmas turkey as well!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
I know the vid without even watching it, they are funny as f***!
Watch the rest, they will have you in stitches!
|
|
|
|
|
I must definitely be in the minority here as I did not find this one bit funny. Not even mildly amusing. Don't try to explain it to me though, as I do understand it. But don't find it funny. At all.
Just so you know I'm not a dry, emotionless maniac. I do find people like Patrice O'Neal, George Carlin, Dave Chappelle, Bill Burr, etc. to name a few, to be absolutely hilarious.
If someone had me in stitches, and did it consistently, that would be Carlin. Here's an example: George Carlin - Stupid Bullshit - YouTube[^] (COARSE language warning)
|
|
|
|
|
You need to be British to get it I guess.
|
|
|
|
|
If you're not familiar with the Gordon Ramsey F-Word tutorial shorts, this won't make sense. I get it.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
I agree. Comical, but not hilarious.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|