Filing for H1b and H4 visa for same person

Hi there,

My spouse’s company is initiating H1b, along with my H4. Meanwhile, I am also searching for job in US and if I get, would like to start my own H1b. My question is, if there are two petitions for my name, one for H1b and one for H4, will it considered illegal? What should I do?

Thanks in Advance…