i have a .net 2, visual basic app im developing, and im trying to make it single instance via the apps config menu. i also placed a msgbox in the StartNextInstance event of the application just to see if it gets there.
the thing is, it shows me the form, and after a second or 2, i get an accessviolationerror, "attempted to read/write protected memory...".
i used to get this a while ago when i was programming internet access for my app, if i had Eset's NOD32 antivirus engine active i got that message, otherwise i didnt.
so i feel it has something to do with the threading or something like that. maybe its trying to access something that its already accesed by another process? did anybody face this problem before? how do i go about debugging and solving this? i really need this app to be single instance, and in the event of a second instance, pass the command line args to the first instance and then kill the second instance.