void DoSomething(DWORD *p)
{
// …
}
In essence, the preceding code takes a pointer to a DWORD. However, there are
numerous things that this could actually mean: p could actually be an array of
DWORDs, the function might modify the value of p, or the function may read the
value of p. If, for example, the value of PVOID were used instead, it would be wholly
ambiguous what the function does. In writing C++ applications, it typically isn’t neces-
sary to have concrete bound type information. However, in terms of calling methods in
a different address space, it is very important.
Because of the necessity for interface definitions to be strongly typed, COM uses a
language called Interface Definition Language (IDL) for describing COM interfaces and
COM objects. ...