|
Hello,
I have written an outlook addin which retrieves the recipeint exchange address intead og SMTP mail id. Pls. can u help me get the SMTP address using vc++. Pls help with some sample code.
Thanks and regards,
Sujatha Raj
Sujatha.raj@india.rsystems.com
|
|
|
|
|
I have declared a linked list(requirement is like that) which contains another list. Now i wanted to pass that linked across DCOM. For communication i am using connection point. Please help me out in this or provide any alternate solution.
|
|
|
|
|
Hi
That is not possible, you can only pass arrays or more simpler types through DCOM. Please read MSDN about 'IDL', or a good COM book.
see ya kurt
Fast Prototyping
|
|
|
|
|
Plz anybody can tell me how to fire an event from within a thread since the threads method is static.
AKshay(CMMSoft)
|
|
|
|
|
Pass a pointer to the event's target to the thread function.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I don't undersatnd.Plz tell me in more detail.
|
|
|
|
|
Hello Akshay,
Event firing in a COM server is a very tricky process. This is especially true if your COM server is based on the apartment-threaded-model.
You must be able to obtain the event handling functions of your object's client application. This can be a complicated process involving going through the connection point clients of your COM object. From there, you can obtain the event handling functions of your Com object's events. Firing an event is simply invoking these event handling functions (of your client).
If you are using the apartment-threaded-model, you also will not be able to fire these events directly from within your thread. These event handling functions must be marshalled to your thread.
I really do not wish to disappoint you, Akshay, but event firing from within a thread (separate from the thread in which your COM object is created) is simply -NOT- a trivail or simple task.
I hope to write an article on this topic in the near future. I'll keep you posted on this. Meantime, I'll try to search for some good book references that can help you along.
Best Regards,
Bio.
|
|
|
|
|
Hi, I just need to fire a single event.Plz tell me how to do it in case of single threaded model.
|
|
|
|
|
Hello Akshay,
I'm preparing to write an article on event firing and event handling in threads. Please be patient with me on this However, for now, I -can- recommend to you some pointers and a reference to a good book on this subject.
The book's name is :
The Essense of COM with ActiveX (A Programmer's Workbook).
The author is David S. Platt.
Get a latest edition of this book. It is excellent. It presents COM subjects as a series of tutorials which are simple to follow.
Some pointers on event firing :
1. Events are essentially "outgoing" interfaces. They are methods of an interface which is not implemented by the COM Object itself but rather, by the -client- of the COM Object.
2. COM Objects which implement events must expose 2 additional interfaces from their COM object :
2.1 Connection Point Container.
2.2 Connection Point.
Please read up more on this in MSDN or in David Platt's book.
3. If you intend to fire your events inside a separate thread, you must marshall your client's event handler functions to this separate thread.
Hope the above helps, Akshay,
Bio.
|
|
|
|
|
Hello all,
I am working on an editor that automatically applies some formatting as the user types. Among these operations are syntax highlighting and character string insertions. I am currently using the ITextRange interface to apply syntax highlighting since it has been suggested elsewhere that this is the key to maintaining undo/redo ability in this context. Unfortunately I am not having any luck preserving the undo buffer in any useful state! Does anyone have any experience with this? Is it a matter of grouping operations with the (TextDoc) Begin/EndEditCollection functions? So far they have not yielded their secrets to me either
Any advice would be greatly appreciated!
Thanks,
Jon
|
|
|
|
|
In a vc++ project, I have a dialog box with a grid (m_flexGrid) and a
remote data control (m_rdc). In OnInitDialog, I set up m_rdc and then
try to set it to m_flexGrid with:
<br />
LPUNKNOWN rdcunk = m_rdc.GetControlUnknown();<br />
LPDISPATCH rdcdisp = NULL;<br />
HRESULT hr;<br />
hr = rdcunk->QueryInterface(IID_IDispatch, (void**)&rdcdisp);<br />
if (SUCCEEDED(hr)) {<br />
m_flexGrid.put_DataSource(rdcdisp);<br />
<br />
... ...<br />
<br />
}<br />
The put_DataSource give me a "Type mismatch" error. If I set up the
datasource property for grid in design time, everything works just fine.
Any suggestions?
|
|
|
|
|
how to write code using vb 6.0 to bar code reader from serial port?
|
|
|
|
|
Hi,
I am very much interested to learn what is COM. And how to create my own components using Visual Basic.
Rajesh.J
mail to:rajesh.nathan@rediffmail.com
|
|
|
|
|
If you want to know COM then there are many excellent tutorial about COM in Code Project site.
You can check out my weblog on COM for some good URL i have posted-
http://lovecom.blogspot.com[^]
But this is all about C++ implementation of COM specification
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
(My COM Blog - http://lovecom.blogspot.com)
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I am trying to develop an IE plugin that
a- Show its Icon on the toolbar
b- Interact with IE and record every site the user goes to.
Any ideas?
P.S. Dont be concerned, im not interested in writing spyware. Im more concerned with getting the IE COM model to interact with C# and logging every http request is one way i know that its working.
|
|
|
|
|
Hi
Look in MSDN for the word "BHO" Browser Helper Objects.
cu kurt
Fast Prototyping
|
|
|
|
|
Hello,
I have a C# command line program that reads data from an Excel workbook and creates an Xml file from it. The Excel workbook is not modified, and the Excel app is hidden from the user.
Everything works fine except when I quit my program before it finishes. When I do this, Excel stays open. The only way to tell this is to look in the task bar; the first time I did this I was surprised to see 8 Excel processes running!
There must be a way to tell Excel to quit when the process that started it quits... anybody know how I can do this? Thanks!
Jeremy O
PM Logic
http://www.jeremyo.com
Jeremy O
PM Logic
http://www.jeremyo.com
|
|
|
|
|
It's been years since I fiddled with automation and excel. But if memory serves me right, simply call the Quit() method on the application object, and it should go away immediately.
--
Wir müssen leben bis wir sterben.
|
|
|
|
|
This is what I do (code is at the bottom of the page), and if I press the 'X' button in the Command Line window before my program finishes, it seems that the finally{...} block never executes. I thought that I was guarenteed it would, am I incorrect in thinking that?
Somebody said something about an Excel Automation COM library... I don't know the difference between using that and doing what I am doing. Is my head under a rock? If it is, please point me towards an explaination, perhapse an article explaining which to use and maybe even a programmers reference.
Thank you! Following is the code I use:
<br />
class XmlBuilder<br />
{<br />
<br />
private Excel.Application excelApp;<br />
<br />
[STAThread]<br />
static int Main(string[] args)<br />
{<br />
XmlBuilder app = new XmlBuilder();<br />
<br />
try<br />
{<br />
app.excelApp = new Excel.ApplicationClass();<br />
<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.<br />
.<br />
}<br />
finally<br />
{<br />
if(excelApp != null)<br />
excelApp.Quit();<br />
}<br />
return 0;<br />
}<br />
}<br />
|
|
|
|
|
I'm sorry, but C# and .NET/COM-bridges isn't my cup of tea. I have no idea why your finally clause isn't executed.
--
Wir müssen leben bis wir sterben.
|
|
|
|
|
|
Yes, that's it!
I'll be able to finally finish this up now. Thank you much!
Jeremy O
PM Logic
http://www.jeremyo.com
|
|
|
|
|
Hi guys!
I noticed that the previously asked question is very similar to mine, but I will "sharpen" my inquiry: I have a DCOM server revealing API that is supposed to accept a structure as a parameter. The client using server, will be located on a remote PC and can be written on any language :(c++,VB,.NET). Could you please tell me what will be the best way to transfer the struct as an input parameter in my case?
|
|
|
|
|
Just define the struct in the IDL file of your project. See this page[^] for more information.
--
Wir müssen leben bis wir sterben.
|
|
|
|
|
Jorgen, thank you very mach.
God bless you, my friend!
|
|
|
|