Suppose I get a pointer to a COM interface in a totally untyped way as just a raw address
void *p
How do I find the addresses of methods and access them? Is *p the address of the virtual table and then **p is the address of the first method? Are all the pointers involved 32-bit always in COM? So that to find a particular method I just need to index at multiples of 4-bytes into **p assuming I know which index the method will appear at. Is there any potential issue of BIG endian vs LITTLE endian?
Yes, technically it should point to the vtable. Methods in vtable appear in the order they were declared, starting with IUnknown methods.
But calling method using indexing will make your code type unsafe. Compiler has no way to ensure the parameters you will pass are correct or not. Big endian vs little endian matters if your COM object is out of proc and on other host. Proxy objects take care of that stuff so it will be transparent to the client.