|
Check out Paul Dilascia's MSDNMag article at http://msdn.microsoft.com/msdnmag/issues/02/02/c/default.aspx.
Regards,
--
Roy
|
|
|
|
|
Help, can anyone please tell me the different between COM ActiveX and OLE?
How about atomation server?
|
|
|
|
|
I am a beginner but here's how I see things!
+ OLE is an older version of COM
+ COM and ActiveX are the same. ActiveX components are usually graphical e.g. a form control whilst COM are often UI-less controls such as a Database object
+ Automation server is an app that enables a client app use OLE. For example MSWord uses OLE to open up MSPaint to edit a graphic file. The menus change depending which app is working on the document.
Hope this helps!
Davy
Blog for Software Testing, Bugs, Quality, Security and Stability - www.latedecember.com
News From Scotland - The Angus Blog and The Dundee Blog
My Personal Blog - Homepage.
|
|
|
|
|
Compiles fine using MIDL. (VC++6 SP4)
|
|
|
|
|
Yeah, I'm able to compile the genrated IDL with MIDL. However, when I import the generated ID into another IDL, MIDL still gives me the error.
|
|
|
|
|
MIDL2020: error generating type library
The type library could not be generated. One possible cause of this error is specifying a path to the IDL file that is longer than 126 characters. Oleaut32.dll does not support path names longer than 126 characters.
With best wishes,
Vita
|
|
|
|
|
The IDL file is in the same directory as the project.
|
|
|
|
|
I can't seem to find any examples of how to use IMAPI (Image Mastering API) in VB.Net to burn cd's with. I saw a couple of thing indicating it was possible, but I can't find any samples.
Well, I take that back I found one sample, but it's for the WinXP environment using C++, and we are not and will not be using XP at work anytime soon. So, if anybody has any example, it would be greatly appreciated.
Daniel
|
|
|
|
|
|
Were can I get a SDK/Control/API for AuthenTec FingerLogic USB Scanner...
Namely a free one, don't want to pay 300US just so I can find out that what I want to do won't work anyway.
Please Help.
|
|
|
|
|
Hi All
I have a Active X container application which implements the following
interfaces
IDataObject
IDispatch
IOleContainer
IOleInPlaceActiveObject
IOleInPlaceObject
IOleItemContainer
IOleObject
IOleWindow
among others . I have got this info from OLEVIEW..
The source code for this container application is not under my control. I
just have the .exe.. The internals are also hidden. I have only
the required header files..
Now my requirement is to come up with a ActiveX control (a simple dialog
with 2 buttons controls).
The click event of one of these button controls should embed a word
document/excel document in the container....
Now I am not able to make this work....
I was just wondering that with the interfaces the container exe supports,
whether it's at all possible to do such a thing.. Is it necessary for the
container app to implement IOleDocument. It's not doing that. I got this
info through OleView...
If not then how should I approach.
I am trying to do the following way. I have this code in OnCreate function
of my Active X controll...
IOleClientSite* pCSite = GetClientSite();
IDispatch *ptr = NULL;
//pCSite-QueryInterface(&ptr);
//IOleObject *pObject;
//pCSite-QueryInterface(&pObject);
IOleContainer* pOleContainer = NULL;
pCSite-GetContainer(&pOleContainer);
IOleInPlaceActiveObject *ptr1 = NULL;
pOleContainer-QueryInterface(&ptr);
ptr-QueryInterface(&ptr1);
IOleObject* ptr2 = NULL;
ptr1-QueryInterface(&ptr2);
IMoniker *pMon;
CLSID clsid;
CLSIDFromProgID(L"Word.Application",&clsid);
CreateClassMoniker(clsid,&pMon);
ptr2-SetMoniker(OLEWHICHMK_CONTAINER, pMon);
MSG msg;
CWnd* parent;
parent = GetParent();
m_parentWnd = parent-m_hWnd;
parent-GetClientRect(&(m_aClientRect));
pSite-DoVerb(OLEIVERB_INPLACEACTIVATE,
&msg,m_CSite,0,m_parentWnd,&m_aClientRect);
I have come up with code with my own intuition. I am not very sure whether
I have understood the functionality of SetMoniker properly..
Any suggestions will be of great help..
Regards
Rajdeep
Rajdeep
|
|
|
|
|
Hello!
I wrote a simple DCOM client(MFC)/server(ATL) application.
All seem to work perfectly when both client and server run on the same WinNT 4.0 machine.
When I try to move the server to another WinNT 4.0 remote machine (on the same NT domain) I get an error from the IConnectionPoint::Advise() function.
The situation is:
- the client calls CoInitializeSecurity() to give full access to the server when it calls back the client
- the server is registered on both machine and the .tlb as well.
- dcomcnfg has been used on the server to launch the server application as a specific user (a domain user that is also in the administrators' group of that machine)
- dcomcnfg has been used on the server to allow EVERYONE to "launch", "access" and "configure" the server application.
- dcomcnfg has been used on the client to allow EVERYONE to "launch", "access" and "configure" avery DCOM application (as default DCOM property)
- obviously the "Enable DCOM on this machine" is set for noth client and server.
I've found thousand of Q&A on the net describing this problem, but the solutions given were always not fitting.
I've used MS Visual C++ 6.0
P.S. the application is a sort of messanger that I would use to use in my office network among friends to inform each other when it's lunch time to have a common appointment. If somebody coud helpme I can send the copmlete code as zip file.
Thank you in advance
Faberge
Faberge
|
|
|
|
|
Howdy,
Can someone pass me a pointer to a "how to" on adding a toolbar to Internet Explorer, similar to the Google toolbar?
Or just give me the bumpersticker version here to help get started.
thanks
Jim H
|
|
|
|
|
See this article on CP[^].
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi all,
My applicaiton needs to look for and use a currently open IE (Using IE 6) and if there's not one, then start one. The problem I'm having is that GetActiveObject will see other programs such as Excel and Word, but it always fails to see IE running. I've tried both the CLSID_InternetExplorer and using the CLSIDFromProgID function. Neither seen to work. I've also read that some Office programs need to loose focus before they register running objects, but that does not seem to help in this case either. Any ideas? Is there something with IE that I'm not setting? Can CoCreateInstance or CoGetClassObject be used to detect? Thanks for any info. -rob.
HRESULT hr;
hr = ::CLSIDFromProgID(L"IExplorer.Application",&prog_clsid);
assert(SUCCEEDED(hr));
hr = ::GetActiveObject(prog_clsid, NULL, &pUnk);
// hr = ::GetActiveObject(CLSID_InternetExplorer, NULL, &pUnk);
assert(SUCCEEDED(hr));
|
|
|
|
|
It cannot work, there are several errors :
- The COM library is not initialized. Add ::CoInitialize(NULL);
- IExplorer.Application does not exist. Use InternetExplorer.Application
- GetActiveObject returns hr which is non-null if there is an error. The error you get clearly tells you the COM library is not initialized. To get the error message, put a breakpoint just after ::GetActiveObject, run the program, then go in the watch window and type "hr, hr". You'll get the error message.
Here is a code replacement :
::CoInitialize(NULL);
HRESULT hr;
CLSID prog_clsid;
hr = ::CLSIDFromProgID(L"InternetExplorer.Application",&prog_clsid);
IUnknown *pUnk = NULL;
hr = ::GetActiveObject(prog_clsid, NULL, &pUnk);
...
::CoUninitialize();
|
|
|
|
|
I have a local server that I thought was pretty standard. When my client goes to launch it, it pauses for about a minute before returning 0x80080005 (CO_E_SERVER_EXEC_FAILURE). I broke it down and just called CoGetClassObject(), but it behaved the same way.
I googled for the error message and came up with a few postings, but all of them were in reference to remote objects and security issues. This is most definitely a local object, and the security settings are all defaults.
Anyone else seen this before?
J
"You can get anything you want at Alice's Restaurant."
|
|
|
|
|
Have a compile time error. Trying to compile a COM object - when the compile gets to
"Linking...
Creating library Debug/C2PCGWSettings.lib and object Debug/C2PCGWSettings.exp
Registering ActiveX Control.."
Error reading key....
C2PCGWSettings.dll - 1 error(s), 0 warning(s)
Any ideas?
Thanks
|
|
|
|
|
Hi,
I'm kinda stuck at the moment so i hope some of you guys can help me out. Ok here's the question:
How can you get the method id's of a [default, source] interface using smart pointers only. It is not a dispinterface (since then you had to supply id's), but a normal interface which derives from IDispatch. I can't create an instance or query for the interface, because it's a [source] interface...right. So how can i get these id's.
Any help would be greatly appreciated.
|
|
|
|
|
nevermind....already found it out myself.......but thanx for not replying though.
|
|
|
|
|
hi there!
i wanted to know the EXACT purpose that The Macros DECLARE_DISPATCH_MAP and DECLARE_OLECREATE_EX do?
and where are they used?
thanks...
&
regards
safee
|
|
|
|
|
Hi, I wonder if anyone else stumbled on this problem - I have an ATL/COM server, which normally works just fine, being instantiated from both ASP and MFC projects.
However, once in a while, w/o any apparent reason, ::CoCreateInstance fails, returning "Class Not Registered". Usually a reboot and or rebuilding the COM component helps, but sometimes it doesnt.
Needless to say, that the class *is* registered, and can be seen using the OLE/COM Viewer.
Any ideas?
VL
|
|
|
|
|
check if the dll is already in use some where else in some other process...i think this should solve your problem....
regards
|
|
|
|
|
If your COM server happens to be a .exe, then be sure to know that by default IIS won't start more than 2 .exe COM instances.
|
|
|
|
|
Hi All,
I’m handling events of ADO in an ATL out-of-process server, and for some reasons when I use _ATL_FREE_THREADED declaration event ConnectComplete is not called when I establish an asynchronous connection, thou it is called when I use a synchronous connection. Changing the memory model to _ATL_APARTMENT_THREADED solves the problem, but what is the reason of such strange behaviour anyway, and what’s the
proper solution?
Regards,
Vitaly Tomilov
|
|
|
|