Every body has a linked list of the joints connected to it. This command will return the ID of the first Joint Node on the specified body. If it returns 0, there are no joints attached to the body. You can then use the returned ID to find information about this joint node with b2GetJointNodeBody and b2GetJointNodeJoint. You can use b2GetNextJointNode to get the next joint node on the body. The parameter should be the integer handle of the body to be checked.
Syntax
Return as Integer = b2GetBodyFirstJointNode(ID as Integer)