Hello, didn't know where to post this, since you don't have a vbscript section. I thin k however that this applies to javascript as well. I have an asp.net web application which allows the staff to swipe a variety of cards as input. I have a magtek card reader (their tech support is incompetent) for that purpose. It requires an activex component, albeit a reference to a .cab file through an embedded <object> on the webpage. Then I have a vbscript that references that object by its id, and opens the port on window load and closes the port on window unload event on every page.
The web application has over 100 pages, and this is on every page (it's on master page). So eventually what happens is that the clerk gets the following error:
Out of memory at line 28. The line 28 looks something like USBHID.PortOpen = true in vbscript. USBHID is the ID of the embedded <object> mentioned before. Now mind you, the clerk doesn' t necessarily even swipe cards. It just happens after a while. I've looked around over the web, and all i know is that its some kind of a memory leak, which I knew before looking around on the web. If you would like to take a look at the client side code, it's on magtek's demo code page:
http://www.magtek.com/support/softwa...read_parse.asp
Please note this doesn't happen on the demo page since it's just one page. It however happens on my web app since the clerk goes through several pages over time.
I don't think there's a problem with the vbscript really. All it is doing is referencing the object in order to read in and parse some values when a card is swiped in the event handler. But then again, most of the time the clerk doesn't swipe any cards. I think the problem is in the component that they've written, and their tech support is horrible. They don't even respond. Maybe if somebody has encountered something like this before, they could help. I couldn't find of anyway in vbscript to explicitly free the memory taken up by USBHID. If maybe there was a way to free the memory, i think the problem would be solved. Thanks.