473,386 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

DSO(data source object) Interop problem in IE

Hi, all
I wanna make dso that implements OLEDBSimpleProvider interface to interact
mshtml.dll. but meet problem in doing it. Could anybody help me?

I do the following tasks:
1. use VS.NET IDE to create interop assembly dll about
simpledata.dll(OLEDBSimpleProvider and its listener stuff). and use it in my
class
2. create dispatch interface for defining msDataSourceObject and
addDataSourceListener which should be invoked by IE.

then create html which to download this asembly and bind its datum to html
tags.

when debug it, I could make breakpoint for constructor, but IE doesn't
invoke msDataSourceObject and addDataSourceListener, of course the result is
make me sorrow. woewoe...... no data binding to html tags.

Could anyone help me? I will really appreicate your help....
Vince Chang

the following is details about my testing code.
-----------------------------------------------------------------------
using System;
using Capital.Web.Client;
using msdatasrc;
using MSDAOSP;
using System.Runtime.InteropServices;

[assembly: ClassInterface(ClassInterfaceType.None)]
namespace ClassLibrary22
{
#region IEDSO Interface
[ComVisible(true)]
[Guid("4F8F38C3-B441-4755-B6E7-0C3F90188869")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatc h)]
public interface IDSO
{
[PreserveSig]
void msDataSourceObject( [MarshalAs(UnmanagedType.BStr)] string
qualifier, [MarshalAs(UnmanagedType.IUnknown)] ref object ppUnk);
void addDataSourceListener(DataSourceListener pEvent);
void removeDataSourceListener(DataSourceListener pEvent);
}
#endregion
public class Class1:IDSO,OLEDBSimpleProvider
{
public DataSourceListener DSListener;
public OLEDBSimpleProviderListener OleDbListener;

public Class1()
{
System.Console.WriteLine("test");
}

#region IDSO Members

public void msDataSourceObject(string qualifier, ref object ppUnk)
{
ppUnk =(OLEDBSimpleProvider) this;
}

public void addDataSourceListener(DataSourceListener pEvent)
{
DSListener = pEvent;
}

public void removeDataSourceListener(DataSourceListener pEvent)
{
DSListener = null;
}

#endregion

private string getRaw(int iRow, int iColumn)
{
return "iRow=" + iRow + ",iColumn=" +iColumn;
}

#region OLEDBSimpleProvider Members

public int getColumnCount()
{
// TODO: Add Class1.getColumnCount implementation
return 1;
}

public int isAsync()
{
// TODO: Add Class1.isAsync implementation
return 0;
}

public void stopTransfer()
{
// TODO: Add Class1.stopTransfer implementation
}

public void addOLEDBSimpleProviderListener(OLEDBSimpleProvider Listener
pospIListener)
{
OleDbListener =pospIListener;
}

public void removeOLEDBSimpleProviderListener(OLEDBSimpleProvi derListener
pospIListener)
{
OleDbListener = null;
}

public int find(int iRowStart, int iColumn, object val, OSPFIND findFlags,
OSPCOMP compType)
{
// TODO: Add Class1.find implementation
return 0;
}

public string getLocale()
{
// TODO: Add Class1.getLocale implementation
return "";
}

public int insertRows(int iRow, int cRows)
{
// TODO: Add Class1.insertRows implementation
return 0;
}

public int deleteRows(int iRow, int cRows)
{
// TODO: Add Class1.deleteRows implementation
return 0;
}

public object getVariant(int iRow, int iColumn, OSPFORMAT format)
{
string test;
if (iRow==0)
{
switch ( iColumn )
{
case 1:
test= "test";
break;
default:
test = "error";
break;
}
}
else
{
test =getRaw(iRow,iColumn);

}
return (object) test;

}

public int getRowCount()
{
// TODO: Add Class1.getRowCount implementation
return 1;
}

public OSPRW getRWStatus(int iRow, int iColumn)
{
// TODO: Add Class1.getRWStatus implementation
return OSPRW.OSPRW_READONLY;
}

public void setVariant(int iRow, int iColumn, OSPFORMAT format, object
Var)
{
// TODO: Add Class1.setVariant implementation
}

public int getEstimatedRows()
{
// TODO: Add Class1.getEstimatedRows implementation
return 0;
}

#endregion
}
}


Nov 15 '05 #1
0 2311

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: DCount17 | last post by:
I receive the following error when attempting to connect to Analysis Services: Cannot open connection to Analysis server '172.20.0.163'. Error in data '' The code is below: DSO.Server asServer...
0
by: wwalkerbout | last post by:
Greetings, Although, this relates to Analysis Services administration, I thought I'd post it here in case someone with the administrative side of SQL Server who subscribes to this Group may also...
4
by: bobdedogh | last post by:
can anyone add live hyperlinks to the sortable table made by the code supplied by Machi, or know of a simple alternative bob Machi wrote Mar 10 1999, 8:00 am >>>>>>>>>>>>>> .... Hello...
0
by: GMG | last post by:
Background : with XML data islands you can bind data to HTML tags. If you do not provide a DTD it will display the information as is. If you provide a DTD IE will display the data according to its...
2
by: intrader | last post by:
Is it possible to perform two way Data Binding (at the client) using and XML DSO? I am interested in dynamic update of a web page (including update of the data source - the source for the XML). ...
0
by: Kris Rudin | last post by:
I have written a C# .NET application that uses Decision Support Object Type library 5.1 to access an analysis server. The problem is that when the application ends (and all processes complete...
2
by: Marco | last post by:
Hello, I have to use the propertyReader of DSOFile.dll for reading/writing custom document properties in a closed document. In the msdn http://support.microsoft.com/?scid=kb;en-us;Q224351...
1
by: AMDRIT | last post by:
Hi gang, this is pretty critical to me. Any help you can provide is appreciated. I have a WebBrowser control placed on a form. I am not getting the same results as I am in IE. Here is the...
2
by: Richard Maher | last post by:
Hi, Recently on the web I came across documentation discussing Data Source Objects (DSO) in relation to browser and html functionality (in particular the ability to declare a Java applet as a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.