NYS ecu swap question

How do you go about getting your car inspected after you install a Used ecu. I know with the new laws you cant just swap ECUs, obd2 anyway. I heard I would have to take the new ecu to a honda dealer and they can reprogam the used ecu with my VIN so it would belong to My car. Anyone know exactly how it works.
Car deatials
Ok so my Woman has a 98 honda with an evap cel that i can't make go away. After some digging and replacing about every solenoid and sensor it looks as though the ecu may be the culprit. Apperently some times when you get the p1475 code on these car the problem can take the ecu with it, so the cel never goes out. I even took it to a shop locally that is suppose to be excellent with this kind of shit. Basically said he can't find anything wrong with the actually evap components. He basically said he can't fix it. The cool thing was he didn't charge me anthing for messing with it half the day. Ecu's for this car are pretty cheap so i would like to get a used one.

try pulling the 7.5 amp back up fuse under the hood to clear the codes on the ecu it might solve your problem,
the vins dont need to match just make sure its the same ecu code and its obd2a and 5speed or auto whatever you have

I have cleared the code 5 or 6 times in the process of replacing parts. My concern here is the NYS inspection laws. I don't know if i can just switch ecu's and have it pass inspection because NYS inspection computers will think it's a different car.

their computers wont know the difference at all. however if your state tests emissions like arizona does, you'll fail the test for having a check engine light. test a known good ecu and see if the light goes out.