com

Explorer doesn't release IDataObject when doing a drag/drop

你说的曾经没有我的故事 提交于 2019-12-12 12:29:39
问题 I'm implementing drag-and-drop in my application. I'm having a problem with Windows Explorer not releasing my IDataObject after a drag-and-drop operation. To isolate the problem, I've implemented a very simple drag-and-drop source that should compile in most any Win32 compiler. The data object contains no data; as you can see everything is very simple. The data object contains tracing that can be viewed with DebugView to indicate when it is created and when it is destroyed. To reproduce:

64 bit COM(ActiveX) server

萝らか妹 提交于 2019-12-12 12:22:13
问题 I have activex server exe that was building and registering fine on 32bit OS. I wanted to make 64 bit version of that exe by upgrading project to Visual Studio 2010 and changing platform to X64 which apparently doesn't work. Application itself works but I don't see it registered after running That.exe /RegServer I would appreciate any usable advice on migrating activex from 32 to x64. Code that is processing /RegServer param is below: if(lstrcmpi(lpszToken, _T("RegServer")) == 0) { _Module

ErrorMessage in Excel

怎甘沉沦 提交于 2019-12-12 12:03:48
问题 i got a urgent problem with the following error, while setting the DisplayAlerts-property of the Excel ApplicationClass to false. var excel = new Excel.Application(); excel.DisplayAlerts = false; I get the following error message in the logs: System.Runtime.InteropServices.COMException (0x800AC472): Exception from HRESULT: 0x800AC472 at Microsoft.Office.Interop.Excel.ApplicationClass.set_DisplayAlerts(Boolean RHS) at Service.Dispose() The following MessageBox is shown (source: xlam.ch) Any

Which HRESULT to return when a buffer provided is too small?

点点圈 提交于 2019-12-12 12:02:58
问题 I have a function in an IUnknown -derived COM interface: HRESULT GetPassword( [in] long bufferLength, [out] WCHAR* buffer ); and the contract is that the implementation should check whether the buffer is large enough to store the string being retrieved. If the buffer is large enough the string is copied and S_OK is returned, otherwise the function will return an error indication. However I can't find a suitable HRESULT value for that. E_UNEXPECTED seems quite dumb and unhelpful. The closest I

reasons for choosing com

梦想的初衷 提交于 2019-12-12 11:43:16
问题 i was wondering why one would choose Com as his software development "technology" my first though is machine/programming _language independence what's yours ? 回答1: COM is the de facto standard for automation and IPC on windows (though .Net has begun to shift the focus), thus there are areas you simply don't have (or had) a choice: Shell extensions ActiveX builds on COM Internet Explorer extensions extending MS Office applications Scriptability for JScript, VBScript, ... with one binary Before

Converting VBS code to C#

試著忘記壹切 提交于 2019-12-12 11:31:38
问题 I just have the below code that was provides as hMailServer's DCOM API at http://www.hmailserver.com/documentation/latest/?page=com_example_account_create The below script works fine. It has no reference nothing. Just after installing hMailServer, running the below code can create an account. Now, I need the same thing in C#. They didn't provide me with any library for C# I googled for it but no relevant results all I have is the below code but in according to hMailServer API they said you

Is using implicit conversion for an upcast instead of QueryInterface() legal with multiple inheritance?

不打扰是莪最后的温柔 提交于 2019-12-12 10:49:47
问题 Assume I have a class implementing two or more COM interfaces (exactly as here): class CMyClass : public IInterface1, public IInterface2 { }; QueryInterface() must return the same pointer for each request of the same interface (it needs an explicit upcast for proper pointer adjustment): if( iid == __uuidof( IUnknown ) ) { *ppv = static_cast<IInterface1*>( this ); //call Addref(), return S_OK } else if( iid == __uuidof( IInterface1 ) ) { *ppv = static_cast<IInterface1*>( this ); //call Addref(

What requirements are necessary and sufficient for an ActiveX control to be used directly on an Excel worksheet?

浪尽此生 提交于 2019-12-12 10:49:32
问题 The Microsoft Office support article "Add or register an ActiveX control" says: IMPORTANT: Not all ActiveX controls can be used directly on worksheets; some can be used only on Microsoft Visual Basic for Applications (VBA) UserForms. When you work with these controls, Excel displays the message Cannot insert object if you try to add them to a worksheet. However, I cannot find documented anywhere the requirements that are necessary and sufficient for a control to be used directly on a

Python ctypes and DLL that uses a COM object

大憨熊 提交于 2019-12-12 10:45:09
问题 Under Windows, I'm trying to use a 3rd party DLL ( SomeLib.dll ) programmed in C++ from Python 2.7 using ctypes . For some of its features, this library uses another COM DLL ( SomeCOMlib.dll ), which itself uses other DLL ( LibA.dll ). Please note that this isn't about using a COM DLL directly from Python, but it's about using a DLL that uses it from Python. To make the integration with Python easier, I've grouped the calls I want to use into my own functions in a new DLL ( MyLib.dll ), also

Com object in Java , possible?

瘦欲@ 提交于 2019-12-12 10:44:19
问题 sorry for stupid question but I don't have any experience with java , nothing about jvm , and it's internals, googling the subj doesn't gave results. The question is if it's possible to write a com object with Java ? then run it from C# ? Thanks. 回答1: Yes , you can use COM Object from Java, Try to read this Link : Using a COM Object from Java but i don't know the second part 来源: https://stackoverflow.com/questions/16124699/com-object-in-java-possible