The H1-B has a "dual intent" and so not prevent you from filing an immigrant visa petition [I-526 or I-360] or for one to be filed on you behalf [I-130 or I-140]. H1-B status may only be held until you are granted a conditional green card. You cannot keep it after that point. However, once an I-485 package has been accepted, you are eligible for an EAD in category (c)(9) based on pending adjustment of status. Even then you can keep the H1-B if qualified and the employer agrees to file for it.