All v4.1 apps would share the activevfp.dll. That was a change starting with version 4 so that deployment and maintenance would be simpler. Conversion to v4.1 should be simple though - everything pretty much works the same.
You should be able to call or set library, etc. just like normal from main.prg or even any HTML.
If you're interested in how activevfp.prg is loaded, proxystub.prg is the first prg called from asp.net or asp and subclasses the activevfp class in activevfp.prg. Main.prg (and all html script code) is executed as an external prg from proxystub.prg.
If you wanted to include your own class in activevfp.prg, that would work too..