I have a rather strange problem.
I am exporting an interface from a C# library to COM.
I have enabled the 'register with COM' project setting, so it calls tlbexp.exe to make the type libs.
We use camel case on our method names and I noticed that the exported type library changes these any method that happens to coincide with a class nam...
When you have a console based client and a COM Server, can you call ::MessageBox(...) from the COM Server and expect it to work?
...
WI have a windows shell extension which adds menu items to the printer menu when the printer is right-clicked. The code works fine in Windows 2000, XP, Vista, but in Windows 7 the call to GetData() fails with DV_E_FORMATETC. I've found various threads regarding this but they all appear to be VB/asp related. The FORMATETC and STGMEDIUM st...
Is this code not going to produce an error:
_bstr_t text=n.GetText();
atof((char*)text)
Where text is a double value.
I know that the _bstr_t produces a const char* in the conversion; so I'm not sure if the atof() is going to work?
...
How does COM ensure that on a multi-core machine, it stays in Sync if you have a COM out-of-proc server and a COM client, relying on each other, that things don't get mangled if you're running it on a multi-core architecture?
...
why does this ATL/COM code check for successful alloc? I would have expected a custom allocation to be visible through CoGetALloc or some such api. A standards-conforming C++ runtime should be throwing std::bad_alloc, but then again maybe the allocator has indeed been traded out for a non-throwing impl.
DDClientData* pNewData = new DDCl...
I am working on an embedded Linux platform and I have need to transfer data between the platform and a PC. The embedded Linux has a usb device port (like a printer), so this is the means by which transfers would take place. I envision the easiest way to integrate Linux with the software already on the PC is to have the Linux device appea...
Let us say that I am accessing a third-party library, for which the documentation states that I can use pInvoke or create an interop library and use COM. What is the difference between these two techniques, and why might I choose one over the other?
...
Hi All,
I was thinking about inserting some object (button, panel or static text) into textctrl, like Outlook Express does this.
You can see from a pic "group1" is an object, you can double click on it, when you delete it, it gets deleted the whole text not just a part of it.
I made some research and this text field is just a sim...
I am using Qt 4.6.3 with MinGW on Windows to build Qt apps and now need to add a COM interface to my application. I enabled ActiveQt but was getting post-link errors because I was missing a copy of the MIDL compiler. I downloaded a copy of the latest MS Windows SDK, which includes MIDL, but now MIDL complains it cannot find cl.exe. Th...
In my COM component I need to translate all errors into the most suitable HRESULT values possible. Currently if I call some RPC interface method (I call a MIDL-generated stub that in turn calls NdrClientCall2()) and the call fails I return E_FAIL which is not very convenient.
There's so-called facility in HRESULT. Can I use this?
I tri...
Consider an excerpt from code that can be found here:
namespace WinSearchFile
{
public class Parser
{
[DllImport("query.dll", CharSet = CharSet.Unicode)]
private extern static int LoadIFilter (string pwcsPath, ref IUnknown pUnkOuter, ref IFilter ppIUnk);
[ComImport, Guid("00000000-0000-0000-C000-000000...
I have a project that is referencing the AxMSCommLib in VS2010 C#.. My Windows 7 Dev machine doesn't have or can't find this reference. Does anyone have any info on where to get this reference to make it work?
...
I have a project that is referencing the AxMSMAPI in VS2010 C#.. My Windows 7 Dev machine doesn't have or can't find this reference. Does anyone have any info on where to get this reference to make it work?
...
Hello,
I am trying to pass data from SQL, to C#, then to an R server for data analysis then back to my web application; however, the COM interface that I am using does not allow complex data types to be passed between C# and R (no data tables). I have gotten it to work in the past by using the following code:
int count = dataTable....
Our application hosts the Windows Scripting Host JScript engine and exposes several domain objects that can be called from script code.
One of the domain objects is a COM component that implements IDispatch (actually, IDispatchEx) and which has a method that takes a script-function as a call-back parameter (an IDispatch* as a parameter)...
What could be the possible causes of exception in calling CoUninitialize().
Our product is using COM and some of WER crash reports are pointing to CoUnInitialize().
WER systems name it as Special Exception.
Any pointers?
...
On a 64-bit machine:
Can a 64-bit application call a COM server (out proc) which is running in 32-bit process?
What about vice versa? (32 bit app calling 64-bit COM out proc server)
Thanks!
...
I've created a connection point interface _IPlayerEvents.
I've added a couple of methods
OnConnect()
OnDisconnect()
I've built the project, and VS2008 has generated code in the CProxy_IPlayerEvents class:
HRESULT Fire_OnConnect(){...}
HRESULT Fire_OnDisconnect() {...}
Now I've added a further method to the _IPlayerEvents interface...
I am using C# and Visual Studio 2008.
I have a class that will turn on the scanner of my Windows Mobile Device and then will capture the read of the scanner when pressed. It will also shut down appropriately and cleanly. I am using a vendor provided SDK to do a lot of the heavy lifting.
I have this working correctly in a Mobile App, b...