|
|
Just off the top of my head, you should be able to use the get_parent, get_child and get_sibling methods to navigate around the DOM.
|
|
|
|
|
Hi,
thanks for your suggestion. Can I use the IHTMLElement::get_sourceIndex, which hands me a long index, to uniquely identify an element? I can then come back to the same element using the index after calling IHTMLDOcument2::get_all() and navigating the resultant IHTMLElementCollection? Is a source index guranteed to be unique? Then I can bypass any complex notation and this would make things very simple. Have you ever used this or something similar?
Thanks.
#define MOSTLY_LEAN_AND_MEAN
|
|
|
|
|
Hi,
I want to pass a metafile to an ATL server, so I encapsulated it on a PictureBox object, and then saved it on one IStream, then I try to recover it in the ATL object, and it gives me on error, the code that I use is:
MFC client:
if(IPict) {
IStorage *pIStg;
Res = ::StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &pIStg);
if(pIStg) {
IStream *TempStream = NULL;
Res = pIStg->CreateStream(OLESTR("MyPicture"), STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0,0, &TempStream);
HRESULT HRes = IPict->SaveAsFile(TempStream, TRUE, 0);
m_GDIGr.SetMetafile(TempStream);
}
}
ATL Server:
IPicture *Pict = NULL;
HRESULT Res = ::OleLoadPicture(pStream, 0, FALSE, IID_IPicture,(void **) &Pict);
What I had made wrong ?, Thanks in advance, Bye !
Braulio
|
|
|
|
|
Hi Braulio
you say an error, what kind of error? An exception, a wrong hres or what.
PS: You have to resolve ANY HRESULT as a MFC-Client.
cheers
Kurt Muellner
Fast Prototyping
|
|
|
|
|
Has anybody successfully converted a COM object to SOAP using the WSDL wizard (part of v2.0 SOAP SDK)?.
Basically you have a working COM Server and client, you Convert the COM server to a web service using WSDL generator. if you write a SOAP client to use you new web service you should be able to communicate with the server.
Sounds simple, but it hasn't worked for me, my probkem is getting the result from the return parameter!
Cheers
|
|
|
|
|
How do I catch connection points events in com objects, I can catch them in MFC apps but I am failing so far to catch them in my dlls.
Any help would be good.
Cheers
Andy
|
|
|
|
|
thru sink interfaces. If your source is a dispinterface create disp sinks thru ATL template classes (IDispEventSimpleImpl<> or IDispEventImpl<>). By yourself, you'd use the IConnectionPoint interfaces to connect to the sources IConnectionPointContainer interface and call AtlAdvise() and AtlUnadvise() to setup and breakup the sink.
#define MOSTLY_LEAN_AND_MEAN
|
|
|
|
|
Hi,
I made a full ActiveX control using ATL ( so it inerhits form IDataObjectImpl as well).
I´m using the control in an MFC application ( well pasted on a Word automated instance...), and I would like to pass to that ActiveX control a Metafile from the Mfc app.
Somebody points me to use that IDataObject, but I don´t see it quite clear, How can I use that, using setdata/getdata ?, Should I have to implement an eventSink, or is there any easier way to do that ?
Thanks, Bye !
Braulio
|
|
|
|
|
I 'm developing a ISAPI appication and using a COM(Proxy/stub) service to retrieve information form a library.
I have a problem in error handling part as the error returned by APIs wrapped under the service are required to be shown on the page(client requiremnt). I thought about saving the error returned in TLS( in thread local storage)and recalling it through other interface function returning that last stored TLS value.
But doing that has one problem, for each function call it seems a new thread is created and TLS value is lost.
can u suggest a better idea. I can't use HRESULT as error value returned is very large.
thanks
Gaurav
|
|
|
|
|
Gaurav, you could use IStream(*) family interface to persist the information
or use structed storage to persist your information .
One detail, think you couldn't use TLS on apartment threading COM dlls.
Cheers,
Joao Vaz
|
|
|
|
|
How to implement drag and drop in windows explorer to a CD/DVD Writer drive using shell programming.Drag and drop must be supported from list view,tree view and also from Desktop.
Keep Smiling )
N.Bharadwaj
|
|
|
|
|
Hey, I have an ATL class in a .dll that I want to use the functions dynamically in VB (kinda like LoadLibrary() in VC)
I found one tutorial in CodeProject, but it has to deal with making it
"Super Ultra Fast", when i just want to make it work. is there just something i can put in front of the declarations of the functions to make it work?
Thanks!
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
When you say ATL Class do you mean your dll is a COM server? You already have the means, CreateObject.
|
|
|
|
|
Hi,
I'm trying to create a program that implements MSN Messenger's features (not a client, an addon) in C++. I've already successfully created an IMessenger object and managed to use it to sign the user in... now there's two things I need to do, but can't find a way to do them.
- Send a message
- Handle a message when recived
That's all. I'm pretty sure I have to somehow create a DMessengerEvents, but i'm not sure how to do that. If anyone has experience in "modding" MSN Messenger, please help!
Thanks,
:-: PsychoBrat :-:
jiffo666@hotmail.com
http://kickme.to/cspot
|
|
|
|
|
I need a little advice from someone that's needed to write multi-threaded COM objects to perform time consuming tasks, but that are loaded by IIS and exist on a web server.
My problem is that my COM object provides communication to a set of API's that retrieve data from an IMS database. Most requests for information through my component take 5-7 seconds, but some can take as long as 3-5 minutes depending on the data requested. At any rate, a regular COM component can (to my knowledge) only be loaded once by IIS allowing only a single instance to be loaded at a time. Since this component services a web client, I obviously need to be able to deal with constant incoming requests for data. Originally my component was a straight ATL COM component, developed as an STA (to allow use by scripting code from an ASP page). However, though it's apartment may be Single Threaded, it spun threads for each request so it could always be handling incoming requests without users having to wait on the previous request to complete. I handled adding in a message pump to deal with the problems of having a multi-threaded STA COM component. This worked very well for all the shorter requests. However, the longer requests would cause instability that I could never track down. Ultimately I had to remove the mult-threaded behavior in lieu of handling one call at a time.
The next thing I tried (I've had COM training, but not COM+) was rebuilding my component as a COM+ DLL. I didn't get very advanced, but now the component can be loaded in Component Services and allows pooling (if wanted) and most of the other things available to COM+ DLL's. My hope was to utilize object pooling to let COM+ Services sustain a collection of objects. I thought this would allow IIS to simply take one of the existing pooled objects and use it, basically allowing multiple objects to be created and used and end this wait in line crap. Apparently I've missed something.
If anyone has more experience in this area I could sure use some pointers.
Thanks,
Matt Philmon
|
|
|
|
|
I am currently looking at PHP.
I want to be able to generate my HTML pages from a
spreadsheet. I see that the windows version of PHP
supports COM and I have found a PHP example that puts
text in a word document.
Where can one find out what COM requests applications
support in particular EXCEL.
Thanks
|
|
|
|
|
you can go to msdn and look at the function from mso9.dll
if you have vb
open new project standard EXE
[project] - references find microsoft office
[view] - object browser
from<all libraries=""> dropdown select office
this list all object and functions
|
|
|
|
|
Keith Sloan wrote:
Where can one find out what COM requests applications
support in particular EXCEL.
There are several ways you can do that:
- Browse MSDN
- Within the application being explored (Excel, Word, ...) press Alt+F11 to invoke the VBA environment, which can display the objects structure
- To find out how to perform the particular action via OLE, use 'Record a Macro' and then study the generated code (by pressing Alt+F11)
- Insert the object into ActiveX Control Test Container and browse the methods list
- Launch OLE/COM Object Viewer and browse the type library
The most effective way is IMHO recording a macro and then experimenting with the code...
(H) Serge
* Origin: Silence Must Be Heard (2:5030/844.235)
|
|
|
|
|
Hi, I've embeded IE in my VB app using the WebBrowser control. I have IE 5.5 on my machine.
When I install my app on a test machien with IE4, the app crashes as soon as the ie control fires a trapped event!
ie. the browser control displays the webpage fine, but when the user clicks a link, and I catch the beforenavigate2 event, it crashes, it works fine however on my machien.
anyone seen this before?
any ideas?
Thanks!
- Alex
|
|
|
|
|
I am working on an in-house "phone book" application. I want to add the functionality such that if the user double clicks on an email address within the program, it will bring up an Outlook mail message with that address as the recipient (Outlook being the default mail package here; I'm not going to worry about anything else at this point).
I am totally new to COM and know generally what I need to do (call CoCreateInstance on the email message class, whatever that may be). However, I am having a very hard time figuring out exactly which CLSID/IID to use to pull up the application. Any help for this newbie would be greatly appreciated!
|
|
|
|
|
Have you tried looking into MAPI?
|
|
|
|
|
Just posted an article on writing an Outlook2K addin with ATL. Maybe you might find it interesting read when in gets published in a few days? Also lookup MSDN for Outlook object model info and related code and articles. You might also find the outlook.addin useful at the msnews.micorosft.com newsgroup. I certainly did.
HTH.
#define MOSTLY_LEAN_AND_MEAN
|
|
|
|
|
Does anybody have any idea how can I read the MS DTC log file ? I have found on MSDN a reference about a tool named "msdtcvtr.exe" which converts from the DTC log file to a text file, but I can't find that tool anywhere ... Not between DTC files, nor in Platform SDK or whatever. Thanks.
|
|
|
|
|
Hi All,
I have made simple COM componenet using ATL. having methods do_a(),
do_b(). Now I have added a dialog resource using Insert->ATL Object in COM
and added a button on that dialog , I want to call methods of COM do_a() on
the click event of that button. Can any one tell me how i do this ? Its
about getting the running com pointer in the dialog.
Thanking you.
Rizi.
|
|
|
|