|
I'm currently developing a plugin for MS Outlook and when I try to access a contact's information, this pops-up in Outlook:
"A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? Blablabla"
Is there a way to tell Outlook to calm down, that my plugin is not a threath? I can't see a user coping with this many times a day!!!
---------------
http://www.edovia.com
|
|
|
|
|
|
You are entering the dark and murky waters of Outlook development. I know them well.
You have some options, but for you the best choice would be to get Outlook Redemption from http://www.dimastr.com. Dmitri has done a lot of work with this, essentially providing a COM wrapper to the low-level MAPI functions that allow you to bypass the warning.
There are some lingering issues, mostly related to the fact that, no matter what you do, there are restrictions imposed by Outlook as to just how far you can get with any add-in.
You should also join the Outlook-Dev Yahoo Group (http://groups.yahoo.com/group/outlook-dev). There you'll find many Outlook developers in the same boat, and plenty of sympathy (if not actual assistance).
|
|
|
|
|
Hi,
i'm not an expert Windows programmer, so please be kind
to me if i ask a stupid question
What happend with COM/OLE in .NET?
I always found the OLE stuff the most valuable difference
between Windows and *nix. I liked the feature to include
e.g. a Visio drawing in a Word document.
So i ask myself: does this still work in .NET?
Is there a new component model? new API's?
Any hints are welcome!
Bye,
Jürgen
|
|
|
|
|
COM is about component based programming. So is DotNet entirely.
- A com factory is now an assembly
- IUnknown is now Object
- QueryInterface is now (simple casting)
- CoCreateInstance is now instantiation of objects who have been referenced at design-time (assembly reference for instance).
- the interface remains the interface :
public interface IDocHandler
{
...
}
- interop mechanisms in DotNet allow to continue to use CLSIDs, though it is now recommended to drop them.
- in optional attributes [...], brackets before class and method declarations, you'll find Marshall stuff, parameters types, and so on.
|
|
|
|
|
Hi Stephane,
i'm more interested in what happend to the
"visual editing" and things like that (e.g.
the menu bar changes when you activate a Visio
object in a Word document).
From your posting, it understand that the whole
component architecture switched from COM to
the CLR, but what happend to the copy/paste and
object containment stuff?
Bye,
Jürgen
|
|
|
|
|
There is no more real COM on native CLR apps.
Using System.Interop services, you have access to some form of lower plummering, even though most of it is totally hidden to the .Net developer. Simple COM structures such like CLSIDs and so on don't even exist, you'll have to recreate them from scratch, and then use interop marshalling (which is easy btw).
This article is an interesting implementation of some interop.
As for Visio menus, OLE, and so on, I am afraid all developers that have such needs will have to stick to mere VC++.
And I swallow a small raisin.
|
|
|
|
|
I often use the IObjectContext in my COM+ components for gaining access to the transaction context. This way, I can access, e.g., ASP's Response, Application and Session objects.
But, although IObjectContext has an Item and a Count methods, it misses an Add method.
Well, if IIS can do it, I can do it too, right ?
So, how can I add a simple string to the transaction context ? Is there a way of doing this ?
What I'm trying to achieve here is passing information between the most external layer of my application to the most internal without having to add an extra parameter to every single method in my interfaces.
Concussus surgo.
When struck I rise.
|
|
|
|
|
I dont know what could happen with my computer, I can not compile COM related projects.
I removed visual studio, deleted all the files from 'program files\microsoft visual studio', installed visual c++. But it happens the same thing.
Has somebody met this error or similar behavior before?
<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oaidl.idl<br />
oaidl.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\objidl.idl<br />
objidl.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\unknwn.idl<br />
unknwn.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\wtypes.idl<br />
wtypes.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl<br />
ocidl.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oleidl.idl<br />
oleidl.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\servprov.idl<br />
servprov.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\urlmon.idl<br />
urlmon.idl<br />
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl<br />
msxml.idl<br />
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl(847) : error MIDL2025 : syntax error : expecting a type specification near "CY"<br />
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl(848) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation <br />
Error executing midl.exe.
|
|
|
|
|
The 'cause' of the problem was that I switched the regional settings to another than US English.
I use win2k sp3, vs6.
|
|
|
|
|
Hello,
I have a web server (a service) that acts as a proxy to translate web pages from English to Swedish.
In order for this to work, I need to set the appropriate values of proxy server and port and activate "Use a proxy server" in IE->Internet Options->Connections->LAN Settings->Advanced.
Now, activating and deactivating frequently will become a pain in the ass jumping to the options dialog all the time, so I figured I could create an IE toolbar button that would do this programmatically.
This turned out to be more complicated than I thought... I can change the options programmatically (at IE runtime) but the changes don't seem to be reflected appropriately. I was trying to simulate the [de]activation behaviour of IE when doing it manually, but something seems to be missing.
Manually my proxy kicks in just fine, but not programmtically... all options are set and visually it all looks fine.
Has somebody dealt with this or does anyone know how to do this?
ANy pointers to material on this would be appreciated,
TIA,
/Tommy
|
|
|
|
|
I like the approach being used in Proxomitron (a popup/midi/ad remover). It is not intrusive, because you point your browser to it and Proxomitron allows you to redirect it to another proxy. This way, in Proxomitron you have a "ByPass" checkbox that disables its use, but still mantains the user's original proxy working.
Check it out, it may be simpler than what you're doing.
Concussus surgo.
When struck I rise.
|
|
|
|
|
Here's the answer... FINALLY!!!
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/wininet/tutorials/options.asp
And now it all works! Thx to all who have helped out!
/Tommy
|
|
|
|
|
I have met a problem of passing a String from my ActiveX to a javascript. I have the following interface:
testFunction([in,out]BSTR* p1, [out,retval]VARIANT* p2)
and my javascript:
var p1 = "ABCDEFGH";
var p2 = "PPPPPPPP";
p2 = testFunction(p1);
alert(p1);
alert(p2);
I can get the value of p2 successfully, however, p1 cannot. How can I pass value of string by reference from my ActiveX to my javascript? Thanks.
|
|
|
|
|
Data are passed by value and not by reference. I was also looking for a way to pass data by reference to a script and so far, I was unsuccessful. But if you have more info, let me know!
VOTD:"5. The Lord loves righteousness and justice;
the Earth is full of his unfailing love. "-Psalm 33:5
|
|
|
|
|
I know Javascript can only use Object or Array to pass by reference between ActiveX and Javascript. However, I am looking for ways that use Javascript String Object to pass the parameter by reference. Do you have any ideas?? Thanks.
|
|
|
|
|
I can't seem to find any example learn how to retreive contacts from Outlook. Or if found any it's in VB
I'm also a bit rusty in COM, so what do I need to do when a function returns an IDispatch pointer? I'm sure that I need to cast the pointer, otherwise what would the IDispatch be use for?
Like in this example:
vIndex.intVal = 2;
pFolders->Item( vIndex, &pMAPIFolder );
pMAPIFolder->get_Name( &bstr1 );
Outlook::_ContactItem* pItem;
if( pMAPIFolder->get_Items( &pItems ) )
{
long i=1;
IDispatch* pItem;
pItems->GetFirst( &pItem );
}
Thanks!
---------------
http://www.edovia.com
|
|
|
|
|
|
Dear All,
i am working in COM , and i want to implement COM server
with out COM ATL. i have the whole implementation of COM
in C++ but i want to know that
which project of visual C++ 6.0 or visual C.NET should i
use ?
|
|
|
|
|
COM without ATL, can be done in any of the projects using pure C++. e.g. an in process dll server is the easiset as long as you include the right headers - <windows.h>
If you need to host it remotely at a later date, or just out of proccess on the same machine you can use DllHost.exe or even MTS or COM+
I would recommend going for an empty dll project, and start from there, but do use MIDL if you want your COM components to be used outside of C++, as it will create the type library that will be needed by other langauges e.g. VB.
The onbe thing to watch out for here is that you will have to implement your own DllRegServer and DllUnRegisterServer, which ATL would handle for you. DllCanUnloadNow, and DllGetClassObject as well thinking about it, but they are much less messy.
And you will need to implement IUnknown, and IClassFactory yourself too, but thats quite straight forward.
Does this make sense or have I missed the point? Thinking about it, you save you have implemented it, but you wnat to put it in a new project? Sounds like the easy bit.
|
|
|
|
|
There is no devstudio wizard for doing COM without ATL.
You'll get full low-level COM samples from the /Samples directory of Devstudio 5.0 or Devstudio 6.0 CDROM.
|
|
|
|
|
I have a COM smart ptr (IMessagePtr) and I would like to keep a vector of them. Is it advisable to make a vector<IMessagePtr>?
I am a bit weary of STL with smart pointers. Does anyone know of any issues with the above vector?
Jeremy.
"Hey man, Taliban, Tali me Banana."
|
|
|
|
|
CComUnkArrary detail in the ATL headers, I've used as a container for all kinds of Com pointers, works
Normski. - the next bit of code is self modifying ... jmp 0xCODE
|
|
|
|
|
You are perfectly fine to use smart pointers in the STL containers. The only caveat is that you should wrap these smart pointers in the CAdapt object like this:
vector<cadapt<imessageptr> >
This is because smart pointers implement the operator& which is needed by STL to refernce the object that is contained with in the containers. The SmartPointers user the operator& to access the interface instead. The CAdapt class will allow you to get around that problem and use the smart pointers safely.
If you have "ATL internals" by Rector and Sells, there is a good section on this in the chapter about containers.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi!
Is it possible to implement IShellView (need support for IShellBrowser) into an excisting shell extension without creating an explorer namspace extension or at least without creating a vissible namspace extension?
As far as I know you´ll have to use the interface IShellView to access IShellBrowser, am I right?
/Jii
|
|
|
|