I'm working on C# and now VB.NET ports of an old VBA program. It has lots of MSForms/OleObjects embedded in it like CommandButton or even images. My first thought was to declare all the buttons as Microsoft.Vbe.Interop.Forms.CommandButtonbut that leads to a COM exception that the System._COM type can't be cast [...] read more
I'm trying to write a managed library in C# that will act as an event source for an existing C++ event sink. The problem I'm having is that when the unmanaged app calls AtlAdvise to get the connection point map for my library it is getting the error "0x80040200" (CONNECT_E_NOCONNECTION) [...] read more
I upgraded an OCX library from VS2010/Win7 to VS2019/Win10. The project builds, however when I try and use RegSvr32.exe from an elevated command prompt, I receive error 0x0040200. I did a bit of debugging and the offending call is the call to AfxOleRegisterTypeLib. RegSvr32.exe OCX error 0x80040200 [https://i.stack.imgur.com/gRxhm.png] Yes, I [...] read more
I've been working on a Skype bot program. The idea is the when the user sends messages to the bot with certain keywords it will provide the results of a SQL script that is run in the background. I've been able to get it to work as a Windows console [...] read more
I'm trying to handle click events of a checkbox control from a BHO. Here is my code: void STDMETHODCALLTYPE CMyBHO::OnDocumentComplete(IDispatch *pDisp, VARIANT *pvarURL) { // ... InitPage(pDocument); } void CMyBHO::InitPage(IHTMLDocument2 *pDocument) { CComQIPtr<IHTMLDocument3> document3 = pDocument; CComPtr<IHTMLElement> elementCheckbox; document3->getElementById(CComBSTR(L"checkbox_id_here"), &elementCheckbox); if(!elementCheckbox) return; if(!m_fCheckboxAdvised) { // Register to sink events from [...] read more
I try to create a video from a picture and a MP3 with splicer. With some audio files, I do not have any problems, but for some reasons, I get "This Mediatype is not valid.". Here is my code, maybe you can help me CreateVideo(@"C:\save_in_here\test.wmv", @"C:\pic\1.jpg", @"C:\mus\1.mp3"); . . . [...] read more
Ruby version 1.9.1p430 running on W7 with Office 2010. I am trying to catch the DocumentBeforeClose event but I cannot even get close to get it to work! I have followed some examples using Excel where the SheetSelectionChange is handled. It works without any problem. Using the same process, I [...] read more
What I need to do is - get decoded sample frames (like vector<frames>) from DirectShow in order to do it I follow this implementation https://docs.microsoft.com/en-us/windows/win32/directshow/using-the-sample-grabber There is my implementation bool coAudioPlayerSampleGrabber::LoadImp(SoundDataType dataType, unsigned char const * pData, int64_t dataLen) { Cleanup(); m_bReady = false; HRESULT hr = S_OK; assert(pData); assert(dataLen); [...] read more
Screenshot of error message [https://i.stack.imgur.com/pxOZn.png] This Project was based on Windows10 IoTCore "Hello World"Damo.I Want to show Image by pure rgb bytes array.So I added my code in this. public async void Func() { int ret; uint mode, x, y, width, height; mode = x = y = width = [...] read more
When i try to register my .ocx file I get error code 0x80040200. I know that this error usually occurs when I got no administrator privileges, but for me that's not the case. I found some code snippet with which I could test my .ocx wether regsvr32 can find the [...] read more
I'm writing a BHO using ATL and I'm using DispEventUnadvise as part of my SetSite function to disconnect from Internet Explorer. This is my code: STDMETHODIMP FooBho::SetSite(IUnknown* site) { if (site != nullptr) { if( this->webBrowser != nullptr ) { this->webBrowser.Release(); } // Cache the pointer to IWebBrowser2. HRESULT hr [...] read more
I am trying to implement an ATL COM module with a connection point. The source code for this is all pretty much boilerplate that I copied by example from chapter 12 of Developer's Workshop to COM and ATL 3.0 by Andrew W. Troelsen. That's a lot of code, with three [...] read more
I'm using Visual Studio 2010 with the various required plugins installed to communicate with SAP Crystal Server 2011. Everything is working fine and I can query data (e.g. return a list of folders within a folder) with no problems. I'm trying to integrate this with the CrystalReportViewer component which appears [...] read more
I'm calling a COM library from .NET through a interop assembly and getting the following error: System.Runtime.InteropServices.COMException(0x80040200): Internal error (ADODB.Connection, -2147467259, Property value is invalid. Make sure the value is typed correctly.) I have a test and a production version of the same external system. When calling the test system [...] read more