Click here to Skip to main content
15,910,234 members
Home / Discussions / COM
   

COM

 
GeneralRe: Passing a structure through VARIANT from VC++ Client to COM Server Pin
Lim Bio Liong6-May-07 1:03
Lim Bio Liong6-May-07 1:03 
GeneralRe: Passing a structure through VARIANT from VC++ Client to COM Server Pin
Lim Bio Liong7-May-07 5:40
Lim Bio Liong7-May-07 5:40 
Questionconverting COM object to an ActiveX control Pin
Abu Mami1-May-07 2:26
Abu Mami1-May-07 2:26 
AnswerRe: converting COM object to an ActiveX control Pin
CPallini1-May-07 10:15
mveCPallini1-May-07 10:15 
GeneralRe: converting COM object to an ActiveX control Pin
Abu Mami1-May-07 20:13
Abu Mami1-May-07 20:13 
GeneralRe: converting COM object to an ActiveX control Pin
CPallini1-May-07 21:28
mveCPallini1-May-07 21:28 
GeneralRe: converting COM object to an ActiveX control Pin
Abu Mami2-May-07 2:59
Abu Mami2-May-07 2:59 
QuestionOLE DB Notification Pin
x_yan_y27-Apr-07 22:18
x_yan_y27-Apr-07 22:18 
Hello everyone:
i write a win32 c++ program,then i add ATL OLE DB consumer in my project.now i need the function that when the SQL database's data change,my main program's window can refresh view.so i refer to msnd:
==========================================================================
Visual C++
Receiving Notifications

OLE DB provides interfaces for receiving notifications when events occur. These are described in OLE DB Object Notifications in the OLE DB Programmer's Reference. Setup of these events uses the standard COM connection-point mechanism. For example, an ATL object that wants to retrieve events through IRowsetNotify implements the IRowsetNotify interface by adding IRowsetNotify to the class-derived list and exposing it through a COM_INTERFACE_ENTRY macro.

IRowsetNotify has three methods, which can be called at various times. If you want to respond to only one of these methods, you can use the IRowsetNotifyImpl class, which returns E_NOTIMPL for the methods you are not interested in.

When you create the rowset, you must tell the provider that you want the returned rowset object to support IConnectionPointContainer, which is needed to set up the notification.

The following code shows how to open the rowset from an ATL object and use the AtlAdvise function to set up the notification sink. AtlAdvise returns a cookie that is used when you call AtlUnadvise.
---------------------------------------------------
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_IConnectionPointContainer, true);

product.Open(session, _T("Products"), &propset);

AtlAdvise(product.m_spRowset, GetUnknown(), IID_IRowsetNotify, &m_dwCookie);
============================================================================
the code is so little that i don't know how to implement in my code,did anyone can help me?
thanks a lot!


QuestionDOM object transfers from C# to C++ Pin
DaveLand27-Apr-07 15:51
DaveLand27-Apr-07 15:51 
QuestionBeginner In COM where to start first? Pin
viral_umang@hotmail.com26-Apr-07 20:26
viral_umang@hotmail.com26-Apr-07 20:26 
AnswerRe: Beginner In COM where to start first? Pin
Roger Stoltz26-Apr-07 21:16
Roger Stoltz26-Apr-07 21:16 
AnswerRe: Beginner In COM where to start first? Pin
lafleon27-Apr-07 9:00
lafleon27-Apr-07 9:00 
AnswerRe: Beginner In COM where to start first? Pin
User 21559727-Apr-07 12:04
User 21559727-Apr-07 12:04 
AnswerRe: Beginner In COM where to start first? Pin
Michael Dunn28-Apr-07 18:26
sitebuilderMichael Dunn28-Apr-07 18:26 
AnswerRe: Beginner In COM where to start first? Pin
georgekjolly2-May-07 1:50
georgekjolly2-May-07 1:50 
QuestionWord data transfer Pin
Aggressor26-Apr-07 1:05
Aggressor26-Apr-07 1:05 
AnswerRe: Word data transfer Pin
kanduripavan15-May-07 0:37
kanduripavan15-May-07 0:37 
Questionurgenttttttttttttttttttttttttttttt Pin
imanos24-Apr-07 23:24
imanos24-Apr-07 23:24 
QuestionRe: urgenttttttttttttttttttttttttttttt [modified] Pin
imanos25-Apr-07 1:12
imanos25-Apr-07 1:12 
QuestionIDispatch Pin
ragavan24-Apr-07 20:34
ragavan24-Apr-07 20:34 
AnswerRe: IDispatch Pin
Gospodin Baron24-Apr-07 23:17
Gospodin Baron24-Apr-07 23:17 
AnswerRe: IDispatch Pin
software_rjhjj25-Apr-07 14:38
software_rjhjj25-Apr-07 14:38 
AnswerRe: IDispatch Pin
sthotakura30-Apr-07 5:03
sthotakura30-Apr-07 5:03 
Questionbool from C++ to C# Pin
Stevo Z24-Apr-07 2:25
Stevo Z24-Apr-07 2:25 
AnswerRe: bool from C++ to C# Pin
prasad_som24-Apr-07 2:32
prasad_som24-Apr-07 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.