Hi there,
I have written a COM-Exposed dll using Framwork 2.0 which implements MS Excel. The dll saves the provided data (usually a datasource that populates a grid) splinted in as many xls files as needed with x rows per sheet and y sheets per file (both user-provided params) using a given name + datetime (sufix) and storing the files in the provided path (param as well).
It does work like a charm when invoked from a .Net or VB6 app in my development machine, but when I try to deploy it so that it can be used by apps (.Net or VB6) residing in a network machine it gives me all sort of headaches.
After dealing with a number of things including having to give Local Intranet :) & Internet:confused: zones full trust using the Framework's configuration wiz, registering dependat dlls, etc, I got to what I think is the "last" issue which offers this error message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs(Object Filename, blah, blah, blah..." and it would simply not work passed this.
Well, once I got out of ideas I changed the save-path from "C:\" + userprovidedparam to Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + userprovidedparam and now I still get the nasty message but then, the system asks me if I want to save the changes to my xls file(s). When I select the "retry" button I get the Save as dialogue and are able to save my file(s); this does behave differently in XP and Vista, but bottom line is: I get to save the files.
Question is: How do I get rid of both the error message and the Save as prompt?
Thank you so much for your time and interest in my "little" problem.
Alex.
PD. Yes, I have searched the web for clues, but I found myself clueless.