RE: Value class initialization rules

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Diana, thank you for the message.

> Value types do not have "this" pointer.

In ECMA, I found many paragraphs where the value types have a "this" pointer
and I have no doubt about it.

Here is a paragraph from Partition I, chapter 8.9.7 "Value Type Definition":

"When a non-static method (i.e. an instance or virtual method) is called on
the value type its this pointer is a managed reference to the instance"

More exactly, the type of the "this" pointer for a value class "vc" is the
managed pointer "vc&".

My question was referring to the exact time when the "this" pointer in a
..ctor is considered initialized.

For example, "this" is not considered initialized upon exiting an object
class ".ctor" that didn't call the base ".ctor". This is one verification
rule.

My question relative to value classes was triggered after looking at the
error messages that a verifier can throw. They can be found in the file
"mscorrc.rc" in Rotor.

It's about this error message: VER_E_THIS_UNINIT_V_RET "Return from ctor
before all fields are initialized".

When exactly is thrown this error?

Thank you.
Cheers,
George
.



Relevant Pages

  • Re: C89, size_t, and long
    ... I was reading C99 Rationale, and it has the following two QUIET CHANGE ... Was it required by C89 that result of sizeof() fits into unsigned long, ... and get pointer arithmetics which needs more than ... If no, why these two paragraphs, if programs which relied on long ...
    (comp.lang.c)
  • C89, size_t, and long
    ... "With the introduction of the long long and extended integer ... Was it required by C89 that result of sizeof() fits into unsigned long, ... and get pointer arithmetics which needs more than ... If no, why these two paragraphs, if programs which relied on long ...
    (comp.lang.c)
  • Re: word 2000, multiple dashes
    ... Stan, it's a paragraph border. ... > i need a pointer for this problem. ... paragraphs at times, as i shift pages and paragraphs around. ...
    (microsoft.public.word.newusers)
  • Re: Virtual Machine implementation problem, Please help me to spot the bug
    ... I kept on getting error messages. ... You don't allocate enough memory here. ... Again conversions between pointer and integer types. ...
    (comp.lang.c)
  • C# 2.0 Generics: how to get address of data?
    ... obtain a pointer to a buffer so that I ... The two error messages are pretty self explanatory. ...
    (microsoft.public.dotnet.languages.csharp)