|
We get a similar situation with our ASP.NET site that uses CDO to access our Exchange server. I never have figured it out and usually just "kicked" it to get it going again (kill the ASP.NET worker process). I'm betting it's a similar issue...except we don't use interop. At least, not directly. But we don't use impersonation, either. ASP.NET uses the System.Web.Mail namespace classes, which do use CDO. I'm guessing this problem is with CDO.
As far as configuring the Outlook email security, this shouldn't affect anything. They only affect MAPI, not Extended MAPI (or CDO, which seems to use some EMAPI).
I wish I could be of more help, but like I said, I never figured it out myself.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
i compiled a atl project to implement dhtm binary behavior by vc6.0.
but, the error, 'IElementBehavior' : base class undefined, had appeared.
i included mshtml.h in my project.but i find that the interface 'IElementBehavior' is not in it. why?help me.thanks.
vc++6.0 winxp pro
|
|
|
|
|
Are you sure your INCLUDE path is setup right? Sure, it is supposed to throw an error when a header file isn't found, but one never knows. Are you sure you have the latest Platform SDK? I have the most recent PSDK and IElementBehavior is showing up in my mshtml.h header file.
If all you have is the PSDK that came with VC++ 6.0, chances are you don't have it. Go to http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm[^] and update the PSDK on your machine. This could take a while, so make sure you have a fast connection or get the CD, in which case you pay only for S&H.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
That is ok! thanks to Heath Stewart.;)
|
|
|
|
|
Hi guys,
I'm pretty sure what I'm going to ask is impossible, (I can't think of a way round it), however I'm trying to write a program which can get past a software firewall (outgoing) on a local machine (I KNOW there is not much you can do if someone has a linux firewall on a remote machine). Is there anyway to defeat software level (ie ZoneAlarm) packet filtering.
The reasoning behind this request is a program for stolen computers to report back to a server.
regards,
entr0py
|
|
|
|
|
|
I have an application which represents the filesystem of a device connected via a serial link. I do navigate the device's filesystem and copy files to/from using drag/drop or clipboard. Here comes the problem. I implemented Drag/Drop and Clipboard using CF_FILEDESCRIPTOR and CF_FILECONTENTS with IStream. But i donno how to copy the nested folders from the application to the Windows Explorer. Should i enumerate the contents of folder and all itz subfolders? It can be timeconsuming over the serial link.
Somewhere i read that 'IStorage' can be used for the purpose. But how ? No information or examples regarding "how to implement IStorage" is not available. Can anybody help me to solve out this, pleeeeeeeease?
|
|
|
|
|
Our applicatiosn hosts the WebBrowser control. I need to catch the onclick event on a web page from our application.I am able to catch the onclick event except for frames in my handler in the event sink. When I click on a frame in a webpage, I am not able to get the onClick event to be handled in my code. Can anyone tell me why it is behaving this way?
|
|
|
|
|
Each frame hosts it's own document. You'll have to advise each document by enumerating all the frames and getting the documents for each (remembering to clean them up later).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thank you very much. It really helped.
|
|
|
|
|
I have developled a SDI application using MFC (VC++ 6.0) which may be launched with an ini file as a parameter or directly from the executable.
If the ini file is provided this is read to ascertain a number of parameters, including details for a sockets connection which creates a telnet type user interface, processed via OnOpenDocument.
If no ini file is provided the program derives this from the name of the executable, processed via OnNewDocument which then calls OnOpenDocument passing in the correct file as though read from the command line.
I am now trying to invoke the Automation, which I requested when I created the original program via the wizard, so I can drive it from a script, but am having some difficulties.
From VBA I want to be able to either
create the application then via an automation function pass in the address of the ini file and process as though I had launched it from a shortcut
or
pass in the ini file with the original CreateObject.
I am getting a number of errors when I follow the normal documentation which I think means that I am going through the startup process multiple times.
Does anyone know of a diagram of the process followed when an object is created via Automation or have any hints which may put me on the correct path.
I had expected it to behave like Word or Excel where you CreateObject the application then Open a "Document" but that doesn't seem to be the process which the wizard has created in my application.
Sara
|
|
|
|
|
Checking that box mostly just includes the right headers. The MFC class wizard does have things to help you add automation support to classes (I think it is the "Automation" tab, but it's been a while since I've used any MFC).
As far as starting an application, it is usuall in the form of "ProductName.Application", like new Word.Application or CreateObject("Word.Application") . This finds the ProgID in the registry which finds (perhaps first, a version-dependent ProgID) a CLSID which is used to start the server (either out-of-proc, or in-proc and optionally remote, if supported). The exe is started in these cases.
Word, Excel, and other Office buddies are entirely different beasts from MFC apps. While similar in apparent concept, they are definitely not. They're automation servers will automatically open a new or existing document. To do the same, you're going to have to make sure that when your applicaiton is launched for automation (takes the automatically defined /automation command-line parameter) you'll have to take your application through the steps.
I know this is very specific, but it wasn't a very specific question. This is roughly the process that is followed and I hope I could give you some pointers about how to complete automation in your application (i.e., it isn't done completely for free).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
How can I manipulate BSTR typed string in ATL3COM?
Can I convert it to some manipulateable String type?
If yes in which?
Kindly guide me.
Kind Regards
Atif
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
Anything that can deal with UNICODE (such as CString, from WTL3.1 or MFC), or any of the wide character functions can handle a BSTR, but to change the BSTR you will effectively need to SysFreeString the old one and SysAllocString the new one, unless you're doing something trivial like making it upper/lowercase.
It's managed, in that there's a length prefix, but other than that, it appears to the developer to be a WCHAR block.
Steve S
|
|
|
|
|
|
We've currently got a Visual Basic coded ActiveX DLL that implements ISMTPOnArrival::OnArrival to intercept messages as they arrive -- we have a website that lets users send/receive emails so they're added to an SQL DB within this DLL.
However, over the past few months we've had severe performance problems as load has increased. We're in the process of re-examining the code to determine what can be done to speed things up.
One of the things I found mentioned that because of VB6's threading requests had to be serialised and queued before being fulfilled by the Mail Sink object that was housed by the SMTP service.
Consequently, one option is to re-write (the essentially simple code) as a Visual C++ ATL project and all it to support MTA and be free threaded, being careful about being thread-aware.
The Mail Sink DLL uses other ActiveX COM DLLs to access the DB as per usual DNA architecture. If I were to re-code the mail sink using Visual C++ and support multi-threaded request fulfilment, will this be supported by making subsequent calls to the various other COM DLLs that will be STA/Apartment threaded?
I've probably not made myself especially clear, but I'd really appreciate your thoughts.
Thanks,
Paul
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
We are developing a C# application using .Net AsyncCallback delegates. The application currently executes, as expected,
using these asynchronous methods. Once this application is converted to a COM+ component (i.e. a .NET serviced component)
the program ceases to execute properly and 'hangs' without asynchronously executing the callback delegates.
Any help with .Net asynchronous programming under COM+ would be grealty appreciated. Thanks. Rick
|
|
|
|
|
Hi,
I try to print some HTML from a NT service, using IHTMLDocument2 and Print Template. I manage to load some html in the document, but printing is somewhat freezing. I think the problem is the
lpTarget->Exec(NULL, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL)
return without waiting for the job to complete (i know that), but then my service go back in the message loop, waiting for connection/message. I tried to put the IHTMLDoc2 and print function in a separated thread but the pb is the same.
can i really print directly from IHTMLDocument2 (without WebBrowser ctrl) ??
i don t want to have any window (i want a service), does printing need a window?
thx
modified 17-Jun-21 21:01pm.
|
|
|
|
|
I'm a novice in C++ and is working on a ATL/COM UNICODE component in VC++ .NET 2003.
I have a need to store Text strings in a 2D Array of some kind inside the component. It should be possible to add and remove complete rows in it (always a fixed number of columns). No need for sorting. It seems like most people recommend an STL Vector of CStrings, but what about the new collection classes in ATL 7 like CAtlArray. Can they be used for my 2D purposes of text strings?
One of the 2D arrays will be passed to and from another COM component. What is the best format to do that in? It will always be made from C++, never VB or something else.
Can someone with more knowledge than me please take the time to explain this for me.
|
|
|
|
|
For passing a 2D array of strings via a COM object, in ATL 7 its best to use a CComSafeArray, which can support what ever dimensions you choose. There is an article on CP that uses it to create a 2D Safe array, that should be fine for passing BSTR's.
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
Hi,
I'm building a secure web browser in MFC. My project is based on the CHTMLView wrapper.
Currently, my problem is that for exemple when you open a pdf file on the internet, you can directly open it in ie. I mean, ie will launch a pdf viewer component. And in this pdf viewer, you'll be able to do everything you want, for exemple saving the pdf file.
So, I'd like to find a way to get control over this component in order, for exemple, to unable the user to save the pdf doc. The problem is that as soon as the component is launched, all windows messages are mapped to this component and not to the CHTMLView object anymore. Furthermore, I didn't find any messages (if only there is one) that is send to CHTMLView to "tell" it that a component such as a pdf viewer will now be opened inside it.
Is anyone knowing how to do such a thing ?
thanks
Ed
|
|
|
|
|
I'm about to begin an IE toolbar that I would like to make use of the IPersistStream implemenation instead of the registry. While I can store various values in statics, some of those property changes to one instance of the toolbar should be immediately reflected in the other instances (if any).
What is the best way to do this? Should the toolbar have sinks to its own connection points? If this was the case, wouldn't the points have to be implemented statically? Is this even possible (or, if possible, is just a BAD idea).
Ideas? TIA
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
First off, I'm a real COM neophyte....that said.....
Situation:
I have a win32 dll which exports approx 100 functions. These functions use data structures (some with upwards of 50 data fields) passed in/out of the function calls.
All the structures have intrinsic types for fields (char*, doubles, ints bools) etc. There are no linked lists, pointer to other structures, unions etc in the structures that are passed.
Requirement:
I have to "wrap" this dll into a COM/ActiveX object so that the entire functionality of this dll is "visible" as a COM object. But, I really don't have a real good idea where to start with this. Do I:
1. Convert all structures to MIDL equivalents? (is there a tool for this?)
2. Create an ATL object to contain the dll and simply forward all calls to the DLL?
3. How does one convert large structured data through this kinds of mechanism?
Please advise, and thank you in advance...
Just trying to keep the forces of entropy at bay
|
|
|
|
|
Well this is not really an answer but a question.
Why are you in need of wrapping this dll?
Yes, I have done this. No, I didn't enjoy it.
My preference is to rescope the entire project
and hey just do away with the old dll if possible.
If its not possible then I create a COM object
that calls the other dll.
Basically all calls on the old dll would be new methods on
the COM object.
I think you may be pushing the boundaries on the structure
sizes but I am not entirely sure. If you have no requirements
to use IDispatch then I would create a custom interface
and just pass in the structures or pointers of structures
as the case may be.
You will need to look at each structure on a case by case basis
to see if it is okay. You can pass the char* if you know the
size.
This is a big topic. I feel an article coming on.
Mike "Cop" Pulice
mike@puliceworx.com
|
|
|
|
|
In one of the parameters of this method, we can specify the size of the window(height and width can be specified). Can anyone let me know how I can retrieve/get the size of the window?
|
|
|
|