|
Hi.
I read that there is a way to display addition attributes in Active directory on the context menu of Microsoft Window Shell and Active Directory administrative adds-in. Does anyone has a sample code for this or know where it is available?
Thank you.
|
|
|
|
|
In our shop we utilize an application generator "Cool Plex". It builds C++ code and compiles it into dlls. One of its abilities is to include ActiveX controls on a screen. We have written an ActiveX control that dynamically creates a form using Combo box, ListBox and Ms MaskEdBox control. A typical usage might include 2 or 3 instances of each.
The Problem:
Inside our ActiveX we capture the Tab key in each control (control_OnKeyUp) and set focus to the next control, except for the MaskedEdit controls. We get other keys in the KeyUp event, but not the Tab key!!??
If I create a VB app and embed the control in it, the tabbing works as normal, So far, even worse. Now it appears the PLEX generated application is inhibiting the Tab key from getting to the MaskedEdit control which is encapsulated in our ActiveX control. Other encapsulated controls seem to work fine.
It seems to me that these symptoms are mutually exclusive. I don't see how this is possible, but the developer on this project has convinced me that this is what is happening.
1. PLEX container passes (or never gets) Tab key presses to the ActiveX control.
2. PLEX container inhibits the Tab key when the focus inside the ActiveX control is in a MaskedEdit control.
3. I believe the encapsulated control with the focus, gets the events before PLEX, precluding inhibiting the tab key at all.
4. PLEX container has no way to differentiate the encapsulated control with the focus from any other.
5. PLEX container has no way to differentiate the type of control. How could it know that the focus in our Activex control is on a MaskEdBox?
Thanks for the help,
Bill
|
|
|
|
|
Hi,
I am using a COM component(Local Server) from a VB Client.
My client is a System-Tray Application.
In Client, During Form_Unload, I am calling a COM interface function
because, I have to call that Interface function whenever the
client exits.
When I restart the machine without exiting the client application,
i get an Automation Error...
An Outgoing Call cannot be made since the Application is dispatching
an Input Synchronous call.
This is happening because of the Interface method I am calling
from the clients Form_Unload event.
How can I Resolve this...?
I have to call that Interface function whenever the
client exits.
I dont understand which "Input Synchronous call" this error
is referring to ?
Is it Form_Unload ??
But it doesnt give this error when the Client is exited
manually (from an option in the clientUI)
Please somebody help me out...
Thanks
Firoz
|
|
|
|
|
Hi,
Use Form_QueryUnload instead of Form_Unload, this might help, becuase Form_QueryUnload called before the client exists, but Form_Unload is called when the application is already being unloaded. By the way, you can stop existing the client using Form_QueryUnload event using Cancel argument.
ShadiK.
Shadi Al-Kahwaji
|
|
|
|
|
I am new at COM and I am not understanding why when I call
hr = CoCreateInstance ( CLSID_ITvVgaOutPut,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITvVgaOutPut,
(void**) &pITVO );
I get this--> error C2065: 'CLSID_ITvVgaOutPut' : undeclared identifier
and this --> error C2065: 'IID_ITvVgaOutPut' : undeclared identifier
i thought if the Interface is not found that it return a bad value that i could test with SUCCEEDED(hr)but it wont compile. Any suggestions would useful or tips. Thanks!!
|
|
|
|
|
Hi,
You need to have the Header file which defines all the
CLSIDs and IIDs.
or
You should #import the TypeLibrary/Dll/Exe of the Component.
Firoz
|
|
|
|
|
I do have the header files however even when I do a #include of the file I still get the error. Now this interface is to a video card that I do not have installed on my machine. Would that be a factor? I know that the CLSID are in the registry and it would make the most logical sense to develope on a machine where the card was located, but I did not have a machine available.
|
|
|
|
|
The problem your having is that the compiler does not know the CLSID and IID. This means that you did not include them. This has absolutely nothing to do with the COM object not being registered, this would only cause a runtime error -> CoCreateInstance returns a class or interface not registered error.
There are two way to use a COM object.
1. Import the type library (.tlb file), just as you would include a header file, e.g. #import "component.tlb" at the top of your .h or .cpp file.
2. Add the _i.c file generated by the components .idl file to your product and include the generated .h file into your .h or .cpp file. This is probably not the way for you as you wil probably not have these files and do not have the source files (read .idl file) to generate them.
|
|
|
|
|
This effect could be caused by a number of different problems.
1. Is the component header file included in a precompiled header? If so, rebuild all should fix it.
2. Do your usage and the defined constants match EXACTLY. I once spent a day of a case discrepency.
3. To find out whats going on. Sprinkle #pragma message statements around and in the include file. They will show you when the include is being recompiled.
e.g.
In the yyy.cpp file
#pragma message("include xxx.h")
#include "xxx.h"
in the xxx.h file
#pragma message("compiling xxx.h")
If your header file contains any ifdefs or pragma once statements (or any other ambiguities, add another message right after the actual definition lines.
#define IID_...
#pragma message("defined IID...")
in
Hope this helps,
Bill
|
|
|
|
|
I feel kind of stupid for asking this, because I haven't had an unresolved external link problem since I began programming three years ago...but here it goes.
I am trying to access the DOM of Internet Explorer. When I call QueryInterface() on other interfaces such as IID_IHTMLDocument, it compiles and works just fine. However, when I do this:
IMarkupServices* pMarkup;
pInterface->QueryInterface(IID_IMarkupServices, (LPVOID*)&pMarkup);
I get the following compiler error:
error LNK2001: unresolved external symbol _IID_IMarkupServices
I've never had an error like this in relation to COM, so I am kind of baffled as to what I need to link to, or do, in order to resolve this link.
Thank-you very much...
|
|
|
|
|
Do a find-in-files in the LIB directory for that symbol, and you'll find that it's in uuid.lib.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork ID - 100.10414 AcidHelm
|
|
|
|
|
Hello everyone,
I am new at COM. I want to implement a COM object that throws _com_error objects as error. How can I implement such a functionality in my COM object.
Busy Bee
|
|
|
|
|
Hi Busy,
Sorry, but the COM standard only allow COM-errors, if you want it to throw a generic error, you can write a wrapper for your COM-module, that catch a com error and then throw an error.
/_henrik
Henrik Sternberg,
Cambridge Technolgy Partners Central Europe
www.ctp.com/ce
|
|
|
|
|
Are you working with ATL?
Cheers
Carlos Antollini.
|
|
|
|
|
Look at IErrorInfo in combination with HRESULT. There is plenty of info in MSDN.
Michael
|
|
|
|
|
if you are using ATL then you can use
the method Error to throw the exception, this will be caught in a _com_error catch
e.g.
instead of returning S_OK;
do the following
return Error(_bstr_t(ErrorDescription).copy(), IID_IObj);
|
|
|
|
|
Thank you every one. I have figured all that out.
The actual class should have an implementation of ISupportErrorInfo.
Thanks everyone again.
|
|
|
|
|
I need implement com add-ins in my application, just as Visual C++ 6.0 do. so my client can add something more in my application with add-ins. can you give me some advices, thanks!
|
|
|
|
|
|
I developed an ATL server from which I throw _com_error exceptions with
return Error(szMyDesc, IID_IMyObj);
On the server side I use
try
{
//...
}
catch(_com_error& err)
{
//...
}
Everything is fine and I get my error messages when the server is created in debug mode. When I create the server in release mode and an error should be expected I get on the client a crash with the message:
the instruction at "0xhhhhhhhh" referenced memory at "0x00000000". The memory could not be "read".
If you have any idea what is the reason please help me as soon as possible.
Thanks!
|
|
|
|
|
Sounds like an uninitialized variable somewhere. That is almost always the cause for the symptom you describe. You can also try turning off optimizations, changing thread libraries and stuff like that. But I reiterate, uninitialized variables are nearly always the cause of bugs that only show up in release builds.
|
|
|
|
|
The error seems to happen in function _com_issue_errorex():
if (FAILED(_hr))
_com_issue_errorex(_hr, this, __uuidof(this));
but I still don't know why? In debug mode everything is fine!
If you have any idea please help me!
|
|
|
|
|
I have written two applications one of which is wizard style dialog based app and the other is an SDI. It turns out that what was needed was the wizard to be started from within the SDI as well as a stand alone app. I thought that Automation was the way to go and so far I have solved half the problem. The Wizard can now be started from within the SDI app and I can set some initial values. What I now need is for the wizzard to tell the SDI that it has completed, and that either the Wizzard tells the SDI the file name of the newly created file or that the SDI shiould now query the Wizard for said file name.
Any help would be great
Cheers
AndyC
|
|
|
|
|
You need to have your Automation server fire an event back to the client. This is done through a connection point. Lookup IConnectionPoint on MSDN for specifics. There are some good articles there. The wizards can help set it up.
Its not really very hard to set up, if you know have the COM object when you are writing the code. I trid to use them in my own project, but I never made it work. I had to set mine up dynamically since the client accesses an unknown number of COM servers.
Hope this is helpful,
Bill
|
|
|
|
|
I have tried to Impliment connection points within my automated server exe. I did this by using the wizard to create an ATL "Simple Object" with the "Support Connection Points" options enabled. I added the fuctions that I required to fire and Implimented Connection Points with the revalent class. When I try to make a instance of this object it failes because the object is not registered. How do I get to register this new object, seeing my app is not a com dll or com exe the regsvr32 function also fails.
Best Regards
AndyC
|
|
|
|