COM is weired, but the errors are helping you. Your message means that the input pointer is invalid or not correct for the desired action.
Are you sure, that all calls before are OK. I dont like the line
hr = pGraph->AddFilter(peconsCX3RDKwithOV5640,"e-con's CX3 RDK with OV5640");
And split the ConnectDirect call to check the GetPin calls at first. Maybe they are the source of your problem.
Separate the code and check all results.