|
Language ID is a WORD from function GetSystemDefaultLangID().
I think there are existing user/system functions which can convert language ID to String, such as:
0x03 (SUBLANG_ARABIC_EGYPT) to string "Arabic (Egypt)"
so that I can save my time to redo them one by one.
Any hints/links?
Thanks
|
|
|
|
|
The mappings are in "winnt.h". If you want to map IDs to strings like "Arabic (Egypt)" you'll have to do it yourself.
|
|
|
|
|
Hi all,
I'm currently doing my final year dissertation, being on wireless transmission in a client-server model. Can anyone suggest any dense literature about technical detailed c++ programming such as enabling communication between server and additional programs (such as ffmpeg), excessing USB devices (such as webcam, mic, video capture card) and the like..
Thanks in advance, any help will be much appreciated
|
|
|
|
|
typedef struct _ABC
{
//....
}ABC;
how to undef ABC here?
this is for correcting/updating VC lib errors.
|
|
|
|
|
includeh10 wrote: this is for correcting/updating VC lib errors.
Could you elaborate a bit on that ? Because I think you are trying to solve the problem in a wrong way.
|
|
|
|
|
Cedric Moonen wrote: Could you elaborate a bit on that ? Because I think you are trying to solve the problem in a wrong way.
how do you get a feeling of "wrong way"?
for this <winbase.h>
typedef struct _OSVERSIONINFOEXA {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[ 128 ];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wReserved[2];
} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
typedef struct _OSVERSIONINFOEXW {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[ 128 ];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wReserved[2];
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
|
|
|
|
|
You cannot remove a typedef.
These are 2 versions of the same struct, one for unicode (W) and one for non-unicode(A)
There should be a third typedef that will use one or the other depending of your project settings.
something like
#ifdef unicode
#define OSVERSIONINFOEXW OSVERSIONINFOEX
#else
#define OSVERSIONINFOEXA OSVERSIONINFOEX
#endif
Normally one will use the third typedef so that the code can be easily converted to/from unicode without having to manually change the code.
So, what't the errors/problems you originally had ? compilation errors ? runtime errors?
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien wrote: So, what't the errors/problems you originally had ? compilation errors ? runtime errors?
Do you know how many reserved data have been used today?
|
|
|
|
|
includeh10 wrote: Do you know how many reserved data have been used today?
huh ? talking about the wReserved field of the structure ? so what about it ? it's reserved, you should not really care about that. use GetVersionEx to get the structure and be done with it; me think the usage is simple, unless you want to make it complex for no reason at all.
please refer to this[^] post if you want more help... because now, I'm not certain what question you are asking; we're not mind readers.
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien wrote: you should not really care about that.
You are far away from my post.
If you don't care about this, you just use it, no one blames you.
This struct and many others have been redefined for many times by many programmers, people have their own reasons to redefine them, I suggest you do not tell them what you said as quoted sentence.
|
|
|
|
|
includeh10 wrote: This struct and many others have been redefined for many times by many programmers, people have their own reasons to redefine them, I suggest you do not tell them what you said as quoted sentence.
Once again you seem to be losing the plot here. If you have a problem with your code then show what you have tried, explain the problem, including any error messages, and people will try to help you. But don't start being abusive just because you don't get the answer you think is due to you.
|
|
|
|
|
Richard MacCutchan wrote: Once again you seem to be losing the plot here. If you have a problem with your code then show what you have tried, explain the problem, including any error messages, and people will try to help you. But don't start being abusive just because you don't get the answer you think is due to you.
You lost point for who is first "start ..."
Is my post clear? is any replies of the post clear?
|
|
|
|
|
includeh10 wrote: Is my post clear?
No it is not clear, which is why I suggested that you explain what you are trying to do and what is not working.
|
|
|
|
|
His replies were very clear while most of your posts fall into the belligerent a**hole category. If you'd learn to ask a reasonable question and display a few manners, you might do a lot better.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Tim Craig wrote: ...while most of your posts fall into the belligerent a**hole category.
While he does display that characteristic on occasion, this time he is just asking outright senseless questions. The term "chasing rabbits" comes to mind.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I beleave the ruler in any forum:
"answer question if you can, or leave it."
|
|
|
|
|
includeh10 wrote: answer question if you can, or leave it.
A number of people are trying to answer your question, but first they need to understand what the problem is. That is why they have asked for more information.
|
|
|
|
|
Richard MacCutchan wrote: Once again you seem to be losing the plot here. If you have a problem with your code then show what you have tried, explain the problem, including any error messages
Is "plot here" only "any error messages"?
I s my post a C++ question?
|
|
|
|
|
includeh10 wrote: Is "plot here" only "any error messages"?
I apologise if that statement is not clear, it is a common English expression, which means that we are arguing about the wrong things. Let's get back to your question and find out what it is that you are having trouble with.
includeh10 wrote: I s my post a C++ question?
That is what we are trying to find out.
|
|
|
|
|
Try to find any replies related to the topic you posted then create your personal policies for public.
|
|
|
|
|
includeh10 wrote: Try to find any replies related to the topic you posted then create your personal policies for public.
I have no idea what this is supposed to mean.
Do you have a programming problem or not?
|
|
|
|
|
Richard, your patience is awesome.
|
|
|
|
|
Hans Dietrich wrote: Richard, your patience is awesome.
Thanks, but I've seen you do the same! I'm actually trying to follow Chris's rules that a) we help people and b) we don't make them feel stupid. But with some of our questioners it really is a challenge.
|
|
|
|
|
includeh10 wrote: how do you get a feeling of "wrong way"?
He is a clever guy.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
First: You cannot undef a typdef.
Second: Can you give us an real example (not just struct declaration) where you have a problem; give as much information as possible.
Third: Let's work together and try to find a solution to your problem.
Fourth: I have some errands to take care of, will be back in a couple of hours.
---------
According to you, there's an issue with the OSVERSIONINFOEX structure (and maybe their variants ...A and ...W)
Can you give us an example on how you use them ? actual code that use that structure and please highlight sections where you think there's a an error in either you code, MSDN documantation and MSDN usage of said stucture.
If it's a compilation error, please report the errors given by the compiler (and what compiler/ide you are using).
If it's a runtime error, please report the call stack and the input values that could be generating that error.
Please, we are not mind readers, and you do not give us much meat to even start giving you a good answer.
Have a good one,
M. (will be back in a couple of hours)
This signature was proudly tested on animals.
|
|
|
|