While the later one is as expected, can anyone please explain the Big-Endian counterpart? Considering the showBits() method to be correct, how can PSR=0x3F00003D give rise to IMPL=15, VER=3, CWP=7 values? How is the bit-field is being arranged and interpreted in memory on a Big-Endian system?
As far as I recall the bit fields in a structure are described in right to left order on x86. I cannot recall if this is true for Sparc also; it's been a while. However, the best way to check is to look at the compiler documentation: this is Microsoft's take on the issue[^].
One of these days I'm going to think of a really clever signature.
The short answer is that bit-field allocation/alignment is pretty much totally at the mercy of the implementation, according to the standards. In other words, the compiler writer can do almost anything she wants, as long as it's internally consistent.
Have fun! Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
I have checked your link but I dont know why its result is different with Task manager Task manager shows 3 threads for calc.exe but this code generate these info Thread ID = 0x00016E0 base priority =8 delta priority =0 Thread ID= 0x0000558 base priority =8 delta priority =0
Thread ID= 0x0000115C base priority =15 delta priority =0
Who's got experience with this class then? Examples and documentation seem pitifully thin on the ground.
I'm just playing with it to see if it's the right control for a new development.
At the moment I'm wondering how to add a button to a property. The doc suggests overloading the protected "HasButton" function
"Indicates whether a property contains a button." says MSDN
So I don't know if I'll get a button by overloading this and returning TRUE because my overloaded function never gets called; other protectesd functions that don;t ever seem to be called are Init, CreateCombo or IsValueChanged
maybe I'm contructing my CMFCPropertyGridProperty wrong?
I need some clarification on one point. We normally use static variables in C/C++. We say when we have used a static variable inside a function, it persists its previous value when that function is called again & again, e:g: to say, static variable retains its last value when that function is called again.
Can anybody explaing me the logic behind this. How a static variable knows its last value and how it is not initialized everytime on the function call.
Because a static variable, even when declared in side a func, is created in the DATA section of a programs run space. Think of it like a global static variable that gets initialised to zero and whose value is of course persistent.
An ordinary variable declared inside a func is created on the stack. This of course winds back and forwards so when the func returns the space that variable used is lost to the next func you call.
I am in over my head again. I am getting error C2664 and I did read the Tech note ( something about ANSI improvement) about it and frankly I just do not understand what is the problem and <b>how to fix it in VC6.0.</b>
Do I have to redefine the GUID_DEVCLASS_COMPUTER?
The parameter GUID is defined in both functions as “const GUID*”
The API fails with this error C2664 and C_GetClassImgIndex compiles OK
error C2664: 'SetupDiGetClassImageIndex' : cannot convert parameter 2 from 'const struct _GUID *' to 'struct _GUID *' Conversion loses qualifiers
Fails b = SetupDiGetClassImageIndex(&m_imgList, &GUID_DEVCLASS_COMPUTER, &nRootImg);
OK int n = C_GetClassImgIndex(&GUID_DEVCLASS_COMPUTER);
Any help would be greatly appreciated. Cheers Vaclav