Civ.R. 12(B)(6); Civ.R. 12(C); Standard of Review
Kaylor asserts that the court of appeals erred in dismissing his prohibition action. In his second proposition of law, Kaylor contends that the court of appeals erroneously construed Judge Bruening’s Civ.R. 12(B)(6) motion to dismiss for failure to state a claim upon which relief can be granted as a Civ.R. 12(C) motion for judgment on the pleadings.
Loc.App.R. 18 of the Eleventh Appellate District provides that original actions filed in the court of appeals “shall proceed as any civil action under the Ohio Rules of Civil Procedure” and that any party may file “a motion to dismiss or a motion for judgment.” LocApp.R. 18(A) and (B). Civ.R. 12(C) provides that “[a]fter the pleadings are closed but within such time as not to delay the trial, any party may move for judgment on the pleadings.” (Emphasis added.)
The court of appeals erred in treating Kaylor’s dismissal motion as a Civ.R. 12(C) motion for judgment on the pleadings. If all pleadings are not closed, a Civ.R. 12(C) motion is premature and cannot be considered by the trial court. *144Piersant v. Bryngelson (1989), 61 Ohio App.3d 359, 363, 572 N.E.2d 800, 802. Since Judge Bruening had not yet pled at the time she filed her dismissal motion, her motion could not be construed as a Civ.R. 12(C) motion for judgment on the pleadings. Id.; McCormac, Ohio Civil Rules Practice (2 Ed.; Supp.1996) 15, Section 6.31. The court of appeals should have considered the dismissal motion under Civ.R. 12(B)(6).
Nevertheless, any error by the court of appeals in treating Judge Bruening’s motion as a Civ.R. 12(C) motion is harmless if dismissal was otherwise appropriate. See, e.g., State ex rel. Meyers v. Columbus (1995), 71 Ohio St.3d 603, 605, 646 N.E.2d 173, 174 (“[A] reviewing court is not authorized to reverse a correct judgment merely because erroneous reasons were assigned as a basis thereof.”). Therefore, we must proceed to determine whether dismissal was appropriate under Civ.R. 12(B)(6).
Pursuant to Civ.R. 12(B)(6), in order to dismiss a complaint for failure to state a claim upon which relief can be granted, it must appear beyond doubt that Kaylor could prove no set of facts warranting relief, after all factual allegations of the complaint are presumed true and all reasonable inferences are made in his favor. State ex rel. Findlay Publishing Co. v. Schroeder (1996), 76 Ohio St.3d 580, 581, 669 N.E.2d 835, 837.
With the foregoing standard in mind, we now address Kaylor’s specific contentions.
Prohibition; Patent and Unambiguous Lack of Jurisdiction;
R.C. 3107.15; Adoption Decree
In his first proposition of law, Kaylor asserts that the court of appeals erred in dismissing his prohibition action because R.C. 3107.15(A)(1) patently and unambiguously divested Judge Bruening and the domestic relations court of jurisdiction to proceed after adoption on a visitation motion filed by a biological parent whose rights had been terminated.
To be entitled to a writ of prohibition, Kaylor must establish that (1) Judge Bruening is about to exercise judicial power, (2) the exercise of that power is unauthorized by law, and (3) denial of the writ will cause injury to him for which no other adequate legal remedy exists. State ex rel. Jones v. Garfield Hts. Mun. Court (1997), 77 Ohio St.3d 447, 448, 674 N.E.2d 1381, 1382. Kaylor sufficiently alleged in his complaint that Judge Bruening is about to exercise judicial power by proceeding with the biological mother’s motions concerning visitation.
Regarding the remaining requirements for a writ of prohibition, in general, absent a patent and unambiguous lack of jurisdiction, a court having general subject-matter jurisdiction can determine its own jurisdiction, and a party challenging the court’s jurisdiction has an adequate remedy by appeal. State ex *145rel. Fraternal Order of Police, Ohio Labor Council, Inc. v. Franklin Cty. Court of Common Pleas (1996), 76 Ohio St.3d 287, 289, 667 N.E.2d 929, 931. If, however, an inferior court patently and unambiguously lacks jurisdiction over the cause, prohibition will lie to prevent the unauthorized exercise of jurisdiction and to correct the results of previous jurisdictionally unauthorized actions. State ex rel. Litty v. Leskovyansky (1996), 77 Ohio St.3d 97, 98, 671 N.E.2d 236, 238.
Judge Bruening and the domestic relations court had basic statutory jurisdiction under R.C. 3109.051 to grant visitation to a biological parent. But if another statute patently and unambiguously divests a court of its basic statutory jurisdiction to proceed in a matter, a writ of prohibition is appropriate. State ex rel. Sanquily v. Lucas Cty. Court of Common Pleas (1991), 60 Ohio St.3d 78, 80, 573 N.E.2d 606, 609 (“Although R.C. 2305.01 gives common pleas courts original jurisdiction in civil matters generally, R.C. 2743.02[F] patently and unambiguously takes it away from them in a specific class of civil cases.”).
R.C. 3107.15(A) provides that a final decree of adoption issued by an Ohio court has the effect of terminating all parental rights of biological parents and creating parental rights in adoptive parents. State ex rel. Smith v. Smith (1996), 75 Ohio St.3d 418, 419, 662 N.E.2d 366, 368; In re Adoption of Greer (1994), 70 Ohio St.3d 293, 298, 638 N.E.2d 999, 1003. In particular, R.C. 3107.15 states:
“(A) A final decree of adoption * * * as issued by a court of this state * * * shall have the following effects as to all matters within the jurisdiction or before a court of this state * * *:
“(1) Except with respect to a spouse of the petitioner and relatives of the spouse, to relieve the biological or other legal parents of the adopted person of all parental rights and responsibilities, and to terminate all legal relationships between the adopted person and the adopted person’s relatives, including the adopted person’s biological or other legal parents, so that the adopted person thereafter is a stranger to the adopted person’s former relatives for all purposes * * *.” (Emphasis added.)
Judge Bruening contends that arguments concerning R.C. 3107.15(A)(1) merely raise issues concerning standing and res judicata, which are not remediable in prohibition. It is certainly true that the general rule provides that issues of standing and res judicata do not attack a court’s jurisdiction and can be adequately raised by postjudgment appeal. Smith, 75 Ohio St.3d at 420, 662 N.E.2d at 369; State ex rel. Lipinski v. Cuyahoga Cty. Court of Common Pleas, Probate Div. (1995), 74 Ohio St.3d 19, 21, 655 N.E.2d 1303, 1305-1306.
It is equally true, however, that R.C. 3107.15 has been construed to divest courts of jurisdiction or statutory authority to grant visitation to relatives of biological parents whose rights have been terminated by an adoption decree. Sweeney v. Sweeney (1994), 71 Ohio St.3d 169, 170, 642 N.E.2d 629, 629 *146(reinstating judgment of a domestic relations court refusing to grant visitation rights to former grandparents after stepparent adoption based on lack of jurisdiction due to R.C. 3107.15); In re Adoption of Ridenour (1991), 61 Ohio St.3d 319, 325, 574 N.E.2d 1055, 1060 (R.C. 3107.15 precluded any court from considering possibility of postadoption visitation by biological grandparents following an adoption by nonrelatives); In re Adoption of Zschach (1996), 75 Ohio St.3d 648, 652, 665 N.E.2d 1070, 1074, and fn. 2 (“R.C. 3107.15[A][1] prohibits a court from granting visitation rights to a biological relative that survive a final decree of adoption” and “[a] court is without authority to incorporate visitation rights in favor of any biological relative into any final decree of adoption * * *.”); Krnac v. Starman (1992), 83 Ohio App.3d 578, 580-581, 615 N.E.2d 344, 345 (“[T]he legislature has not provided the juvenile court with the authority to grant visitation rights to biological grandparents following an adoption.”); Farley v. Farley (1992), 85 Ohio App.3d 113, 117, 619 N.E.2d 427, 429 (the adoption statute terminates the jurisdiction of all courts with respect to biological grandparents); see, also, In re Apple (Sept. 21, 1994), Miami App. No. 93-CA-59, unreported, 1994 WL 515116, following Ridenour and Krnac.
Although Judge Bruening attempts to distinguish Sweeney and Ridenour because they involve postadoption visitation requested by biological grandparents rather than parents, the language of R.C. 3107.15(A)(1) does not distinguish between parents and other relatives in terminating relations to the adopted person. See, e.g., In re Martin (1994), 68 Ohio St.3d 250, 254, 626 N.E.2d 82, 84-85 (“With respect to appellees’ argument that in determining grandparent visitation rights a distinction should exist between adoptions by strangers and nonstrangers * * * we discern no mandate or suggestion to make such a distinction in any of the relevant Ohio statutes, especially R.C. 3107.15 * * *.”).
Therefore, while Judge Bruening and the domestic relations court possessed basic statutory jurisdiction to grant visitation to a natural parent in a divorce, dissolution, legal separation, or child support proceeding, R.C. 3107.15(A)(1) patently and unambiguously divested them of jurisdiction to proceed on the biological mother’s motions relating to visitation following the adoption decree terminating the natural mother’s parental rights. Cf. State ex rel. Koren v. Grogan (1994), 68 Ohio St.3d 590, 595, 629 N.E.2d 446, 450 (affirming issuance of writ of prohibition to prevent criminal trial because “[although R.C. 2945.44[B] does not specify that it divests courts of ‘jurisdiction’ to proceed as does the statute in Sanquily, R.C. 2945.44[B] does manifestly prevent the prosecution or criminal liability of a defendant accorded transactional immunity under that statute.”). (Emphasis sic.)
The court of appeals erred in determining that Judge Bruening “has colorable jurisdiction to determine the issue of [the natural mother’s] visitation rights, even *147though JoAnna has been adopted.” R.C. 3109.051(B), which permits a court in a divorce, dissolution of marriage, legal separation, annulment, or child support proceeding that involves a child to grant visitation rights to “any other person other than a parent,” does not apply following an adoption. Ridenour, 61 Ohio St.3d at 326, 574 N.E.2d at 1062 (“[Tjhere is nothing in the language of [former R.C. 3109.05 and its current analogue, R.C. 3109.051, that] suggests that through their passage the legislature intended to indirectly liberalize the strict dictates of R.C. 3107.15 to allow post-adoption visitation * * *.”); Krnac, 83 Ohio App.3d at 580, 615 N.E.2d at 345 (“R.C. 3109.051 is not to be read as an indirect amendment of R.C. 3107.15.”). In addition, R.C. 3109.051(B)(1)(b) requires that before the court may grant visitation to a “person other than a parent,” the other person must have an interest in the welfare of the child. Here, Cola’s only interest in JoAnna was premised on her status as her biological mother and that interest was terminated by the probate court’s adoption decree.
Judge Bruening’s reliance on our dicta in Smith is also misplaced. First, the Smith holding that the South African adoption decree did not patently and unambiguously divest the common pleas court of jurisdiction over a parentage action was primarily based on the fact that South African law did not require any notice to the biological father of an illegitimate child to effectuate the adoption decree. There is no similar defect concerning the adoption decree here. Second, while in Smith, 75 Ohio St.3d at 420, 662 N.E.2d at 369, we opined that “R.C. 3107.15 does not divest juvenile courts of jurisdiction to proceed in parentage actions,” that was dicta, which was unnecessary to our holding. Finally, for the reasons previously discussed, the Smith dictum is incorrect to the extent it might be inferred therefrom that R.C. 3107.15 does not divest courts of jurisdiction to grant postadoption visitation rights.
Based on the foregoing, with the material allegations of Kaylor’s complaint and all reasonable inferences being construed most strongly in his favor, it is not beyond doubt that he can prove no set of facts entitling him to the requested relief in prohibition. Therefore, the court of appeals erred in dismissing the prohibition action. Kaylor’s first proposition of law is sustained.
Issuance of Writ
Kaylor contends that we should reverse the court of appeals’ judgment and grant the requested relief in prohibition. Normally, reversal of a court of appeals’ erroneous dismissal of a complaint requires a remand for further proceedings. State ex rel. Natl. Emp. Benefit Serv., Inc. v. Cuyahoga Cty. Court of Common Pleas (1990), 49 Ohio St.3d 49, 50, 550 N.E.2d 941, 943, fn. 1. But if the parties are in agreement about the pertinent facts, we can exercise our plenary authority in extraordinary actions and address the merits. State ex rel. Fogle v. Steiner (1995), 74 Ohio St.3d 158, 163, 656 N.E.2d 1288, 1293. Here, *148based on the parties’ essential agreement concerning the adoption decree, we grant the writ because Judge Bruening patently and unambiguously lacks jurisdiction to proceed in the underlying action. Id.
Adequate Legal Remedy
It also appears that the court of appeals erred in dismissing the prohibition action even assuming it properly determined that Kaylor did not allege facts showing a patent and unambiguous lack of jurisdiction on the part of Judge Bruening. Kaylor contends in his second proposition of law that even if the lack of jurisdiction was not patent and unambiguous, he could still have proven that appeal did not constitute an adequate legal remedy because it was not complete, beneficial, and speedy. State ex rel. Keenan v. Calabrese (1994), 69 Ohio St.3d 176, 178, 631 N.E.2d 119, 121 (“While neither mandamus nor prohibition may be employed as a substitute for appeal from an interlocutory order, an appeal is inadequate if not complete in its nature, beneficial and speedy.”). Kaylor’s allegations of “no adequate remedy in the ordinary course of law” and “irreparable harm to the minor child and to the relationship between [Kaylor] and his family” should the domestic relations court proceedings not be stopped were sufficient to preclude dismissal under Civ.R. 12(B)(6). See, e.g., State ex rel. Harris v. Toledo (1995), 74 Ohio St.3d 36, 37-38, 656 N.E.2d 334, 335-336 (The court of appeals erred in requiring relator to plead specific facts rather than unsupported conclusions in order to withstand dismissal because the case did not fall within one of the limited exceptions to the general rule requiring notice pleading.); State ex rel. Williams Ford Sales, Inc. v. Connor (1995), 72 Ohio St.3d 111, 113, 647 N.E.2d 804, 806.
Conclusion
Accordingly, based on the foregoing, we reverse the judgment of the court of appeals and grant the writ of prohibition because Judge Bruening patently and unambiguously lacks jurisdiction to proceed in the underlying action.
Judgment reversed and unit granted.
Moyer, C.J., Douglas, Resnick, F.E. Sweeney, Pfeifer, Cook and Lundberg Stratton, JJ., concur.