@kotelric, another thing about pointers: sometimes they are a child or a parent object of a struct, a class. so you can use -> for dereferncing child objects of what you just dereferenced.
here's an example:
if (device) {
device->lpVtbl->Release(device);
}
the device variable holds a pointer to a COM object, and every COM object has a Release() method to clean up the object from memory. considering it's a COM object, you need to dereference lpVtbl, which is a pointer to a table with lots and lots of COM functions, and then dereference Release() from that table.
@kotelric, another thing about pointers: sometimes they are a child or a parent object of a struct, a class. so you can use->for dereferncing child objects of what you just dereferenced.here's an example:
the device variable holds a pointer to a COM object, and every COM object has a Release() method to clean up the object from memory. considering it's a COM object, you need to dereference
lpVtbl, which is a pointer to a table with lots and lots of COM functions, and then dereference Release() from that table.