One of the fundamental problem in rings of continuous function is to extract those spaces for which C(X) determines X, that is to investigate X and Y such that C(X) isomorphic with C(Y ) implies X homeomorphic with Y. Later S. Banach and M. Stone proved independently with slight variance, that if X is compact Hausdorff space, C(X) also determine X. Their works were maximally extended by E. Hewitt by introducing realcompact spaces and later Melvin Henriksen and Biswajit Mitra solved the problem for locally compact and nearly realcompact spaces. In this paper we tried to develop a unified theory of this problem to cover up all the works in the literature introducing a notion called P-compact spaces.