i've made .NET exposes its structures to COM according to examples which
provided by msdn .
some snippet codes list below
....
public string sayhello()
{
return "hello world";
}
....
public void writedata(string s)
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(
IsolatedStorageScope.User
| IsolatedStorageScope.Domain
| IsolatedStorageScope.Assembly
, null, null);
isoStore.CreateDirectory("TestDir");
IsolatedStorageFileStream isoStream1 = new
IsolatedStorageFileStream("TestDir//test.txt", FileMode.Create, isoStore);
StreamWriter writer = null;
writer = new StreamWriter(isoStream1);
writer.WriteLine(s);
writer.Close();
isoStream1.Close();
}
....
then i build the solution and test it in vb 6..
the member sayhello works ok but writedata failes and raises an Exception:
Unable to determine the identity of domain.
howerver if i comment this line
// | IsolatedStorageScope.Domain
there's no exception and it works corretly
this is very strange to me . can anybody make it clear?
thanks in advance
|