. ZeroMemory . NULL... , .
. , p o "":
struct Type
{
int i;
float f;
bool b;
};
Type o;
Type* p = &o;
ZeroMemory :
ZeroMemory(&o, sizeof(o));
ZeroMemory(p, sizeof(o));
o 0:
cout << o.i;
cout << o.f;
cout << o.b;
cout << p->i;
cout << p->f;
cout << p->b;
NUll -ify pointer:
p = NULL;
p, undefined:
int a = p->i;
NUll -ify object:
, Type =()
o = NULL; // error C2679: binary '=' : no operator found
// which takes a right-hand operand of type 'int'
// (or there is no acceptable conversion)
DirectX
DirectX , API. . ZeroMemory 0, , , ( - -, ).