|
Atul23 wrote: So is there any function in ATL class library which will execute EXE and check the status of EXE execution.
There is standard WIN32 API for such purposes (see, for instance [^]).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
You can use WinExec(....) in COM. Try it out...
regards,
Sivaganesh
|
|
|
|
|
|
Hi!
I'm using a COM DLL from a third party to access some hardware. The main application is written in C# and I can create the object and use it on XP without problems using an interop assembly created with tlbimp.
When I try the same on Vista SP1, I get an AccessViolationException on the first method call into the COM object.
The really weird thing is: The COM DLL only crashes when I call my application outside of VS, i.e. when I'm not trying to debug it. When stepping through the code in VS (2005 SP1), everything works as on Windows XP! Running the same executable from the debug directory crashes...
Can anyone explain this behaviour or tell me where to look next?
Thanks in advance!
Update:
The DLL also crashes in VS when I turn off the VS host process or when I first start the application and attach the debugger. So the big question is: What exactly does this VS host process do to keep the DLL from crashing?
Regards,
mav
--
Black holes are the places where God divided by 0...
modified on Tuesday, August 19, 2008 7:05 AM
|
|
|
|
|
Just a guess - Does the COM DLL depend on any external files? If yes, ensure these file are located in the correct directory.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi!
Thanks for your reply, but I think that doesn't explain the behaviour. The DLL in question doesn't have any "unusual" dependencies and it does work on XP and when run inside VS...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Well once we had this problem when a colleague was using a 3rd party DLL in a .NET project using Interop. Hence I said I am guessing.
To find the cause of your problem, more details would be required.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi Sohail!
Just wanted to inform you (and everybody else interested) that the problem indeed was inside the 3rd-party dll.
They used ATL from VS2003 for their component and this caused a problem with Vista's DEP (an explanation can be found here[^]
Turning off DEP made the problem go away.
Jeez - how do people find out these things?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I have marked your reply as helpful answer. Might help someone in future.
These problems are quite tricky. It's nice to hear that you are able to identify the cause.
Cheers,
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi,
has anyone a hint for me how to get the Folder recursiv to the drop target ? I implemented GetUIObjectOf in my IShellFolder derived class to handle riid == IID_IDataObject. Works fine for the first level (here my selected folder).
Where do i have to start when i want the Childs of that folder also be dragged ?
Happy for every hint
Kai-Uwe
|
|
|
|
|
I want to invoke a queued component which is in another system from the asp.
For the same system i am using get object.
this code is for the same server where the page and com + queued comp it is working
Set ObjQLoader = GetObject("queue:/new:Test.Class1")
ObjQLoader.Start trim(nextjob)
now i want to invoke the com+ queued comp which is in another location on ServerA.
is it possible through ASP to set the object of ServeA and invoke that queued component.
Set ObjQLoader = GetObject("queue:FormatName=DIRECT=OS:ServerA\private$\Test_0/new:Test.Class1")
ObjQLoader.Start trim(nextjob)
|
|
|
|
|
Is it possible to create a shell extension tool tip window that shows more than just text?
All the examples I've seen just return text, but I am trying to find a way to add controls, such as buttons and images to the window that appears when the mouse hovers over a file or folder.
Any ideas?
Thanks!
-JB
|
|
|
|
|
As start up, have a look at Dunn's series http://www.codeproject.com/KB/shell/shellextguideindex.aspx[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
Thanks, I didn't find what I wanted in that tutorial (he shows how to use text, but not anything else).
However, I think I have found what I was looking for here:
http://www.codeproject.com/KB/shell/ImcImageTip.aspx[^]
Having said that, I'd still appreciate any more info that anyone has on the subject!
Thanks again!
|
|
|
|
|
I need to issue post command in my code (ATL, VC2005).
TIA
--
md
|
|
|
|
|
|
Thanks a lot for your reply. The problem is that I don't know how to retrieve IWebBrowser2 from within Outlook.
--
md
|
|
|
|
|
|
Great help. Thanks a lot. Really.
Now it works. I have a few questions to understand it a little deeper.
In my add-in I have retrieved the browser interface in OnConnection method as main clas does not implement SetClientSite
I used Outlook::_Explorer as base. Something like this:
CComQIPtr<iserviceprovider> spServiceProvider(theSpExplorer);
ATLASSERT(spServiceProvider);
CComPtr<iserviceprovider> spTopServiceProvider;
hr = spServiceProvider->QueryService(SID_STopLevelBrowser, IID_IServiceProvider, reinterpret_cast<void>(&spTopServiceProvider));
ATLASSERT(spTopServiceProvider);
...
hr = spTopServiceProvider->QueryService(SID_SWebBrowserApp, IID_IWebBrowser2, reinterpret_cast<void>(&theSpWebBrowser2));
ATLASSERT(theSpWebBrowser2);
It works. Please tell me if it is correct attitude. I don understand fully this construction with
SID_STopLevelBrowser.
--
Best regards and thanks again
md
|
|
|
|
|
I believe so. Just make sure the interfaces are released at appropriate time. The MSDN Support page I mentioned earlier has the example.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Can i create add in for outlook 2002 in Vs2005 in C# if yes then how
wasim khan
|
|
|
|
|
I need to use a COM object which needs an IDispatch-based event sink. I've only found code for doing this using MFC or ATL. Can someone help me out on how to do this through only C++? I just need to know how to create the event sink class that I will implement in my application. Do I create a class based on IDispatch using DECLARE_INTERFACE and STDMETHOD ... PURE macros? If so, how do I instantiate this class since it has pure virtual members?
|
|
|
|
|
Hi,
I have a COM dll. IS there a way that i can access the interface methods only by importing the DLL.
I dont have the TLB ot _i.c file.
Only having the COM Dll. can i access it?
Regards,
Ramachandraraju KK
|
|
|
|
|
- You could #import the dll which will generate the relevant .h and .c files
- Use the interface declaration files shipped with the DLL and use raw interface pointers
- Use IDispatch if it's supported by the COM inproc server (DLL) coclass
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I have a com object, created on c++ (using VS2005)
And another c# library that referenced to that object.
When I try to create new object - I get the follows:
Retrieving the COM class factory for component with CLSID {B1901D41-……….} failed due to the following error: 80040111
I googled for that error, and only found it out when using external programs, like Excel, IExplorer, etc.
I’m afraid in one of my tries I destroyed something in the registry…
Can someone help me with my problem? This is driving me crazy…
Moreover, I am looking for a good site who explains clearly about the COM objects, interop, and the correct use of them.
Thanks,
Sara
|
|
|
|