problem about ole-Collection of common programming errors


  • Mike Dimmick
    c++ windows winapi ole
    Under what circumstances will the Win32 API function OleGetClipboard() fail and return CLIPBRD_E_CANT_OPEN?More background: I am assisting with a Firefox bug fix. Details here:bug 444800 – cannot retrieve image data from clipboard in lossless formatIn the automated test that I helped write, we see that OleGetClipboard() sometimes fails and returns CLIPBRD_E_CANT_OPEN. That is unexpected, and the Firefox code to pull image data off the Windows clipboard depends on that call succeeding.

  • Deanna
    c++ windows winapi clipboard ole
    I’m trying to do the following trick:I have IDataObject* to be set into the clipboard, so I’m using OleSetClipboard() to set it into the clipboard. I have another CLIPFORMAT I want to add to the clipboard, but I can’t do it with OleSetClipboard() because the IDataObject* I receive does not implement SetData() method. So, to overcome this limitation I OpenClipboard() with GetClipboardOwner(), this way, I can SetClipboardData() to the clipboard without EmptyClipboard() first.Now, it all works well

  • tmighty
    vb.net colors ole
    I try to migrate a code from VB6 to VB.NET.I wanted to get the integer value of vbGreen in VB.NET.In VB6 “vbGreen” relates to 65280. Now when I do ColorTranslator.ToOle(Color.Green)… it returns 32768.Does anybody see where I go wrong?Thank you!

  • Bill the Lizard
    com ole
    What is the difference between COM and OLE, if any ?

  • JohnCC
    c# .net multithreading com ole
    I haven’t used OLE/COM for quite some time as a developer, but I currently have a need to use some 3rd party OCX code libraries from a C# program.The C# program uses threading (it’s a TCP socket server). The OCXs are marked as Apartment threading model. From my reading, I concluded that if I was careful to create one instance of each OCX per thread, and only to use that instance from the thread that created it, I should be OK.I did also do:-myThread.SetApartmentState(ApartmentState.STA);before

  • HalloDu
    delphi outlook ole outlook-addin
    I have written an Outlook plugin in Delphi 2009 that opens a database connection and does some tasks to accompany my main application. When Outlook is now closed it raises an 800A01A8 ole error, but only if you had about 10 outlook-explorer windows open. Another important point is that that only happens occasionally when you use File\Exit to close all windows at once, but much more often, even so not always, when you close them all at once using the windows taskbar close all feature. When attach

  • Jon H
    c# .net com ole
    I am trying to figure out the best way to interact with an OLE Server using C# .NETi have found some code that enables interaction with COM+ that appears to work for the OLE server but I wonder if there is a more elegant or simpler way? I require that it be late bound.Code (as pilfered from elsewhere on the net)// Code start Type excel; object[] parameter = new object[1]; object excelObject; try {//Get the excel object excel = Type.GetTypeFromProgID(“Excel.Application”);//Create instance of exce

  • Gorgi Rankovski
    pdf pdf-generation ole visual-foxpro
    I need a low level OLE control for reading, creating and modifying pdf files. I will use it with Visual FoxPro. By low level I mean that I won’t need any extra software to install on the client machine.Long story short, I need something like iText.Preferably free or cheap. Thanks.

  • picciopiccio
    eclipse 64bit swt ole rcp
    I have recompiled a 32bit ole control for 64-bit windows platform (this is necessary due to the large amound of memory that ole is allocating in this appliance). I need to load this inside my eclipse rcp application that is running on JDK32bit and eclipse 32bit (windows 32bit emualtion on 64 bit). I whish to not recompile the rcp application beccause it is huge and I’m afraid of many thigs could go wrong.So far (on 32 bit platform), I used the method described at this site ActiveX Support In SWT

  • HX_unbanned
    delphi file storage ole ntfs
    I have given up tryng to figure out the reason of this issue, but here is the story and hope you could give a tip…As I develop unique app ( http://code.google.com/p/sedev ) and therefore I need to polish it. I have to add File Summary ( very useful info in my opinion ) to any created files by the app, so I decided to go with NTFS compatible structure edit: code snippet in which problem occurs:if (FileExists(BaseLocation + LeftStr(GetSSWData, Length(GetSSWData)- 1) + ‘.vkp’) = True) then // add

  • Sunny Sampath
    events vba event-handling ole commandbutton
    I have struggled with this problem for while now…I want to do something very simple. I want to create multiple commandbuttons at runtime, and then handle events for these commandbuttons with one procedure. So I have built a “withevents” class to handle the automation, but my code is not working. When I run Test(), the CommandButton is created, but when I click on it…there is no messagebox response…I cannot find the error..Please any help would be great!!Class cTestPublic WithEvents Button

  • Tony Toews
    c# database ole
    I have a problem with this code, maybe you can give me a hand. Im inserting file information as rows with name, size, … they are all varchars The problem is that the “name” has this ‘ tildes in the namefile so when it tryies to parse the data it crashes.the filename is : Creedence Clearwater Revival – Lookin’ Out My Back Door – 09.mp3after “lookin” there is a ‘my command is: oleDbInsertCommand1.CommandText = “INSERT INTO Dirs-Arcs (nombre, formato, tamaño, path, tags) VALUES (‘”+name+”‘, ‘”+f

  • SparkyNZ
    windows com ole
    I have a Service application that crashes only on one PC (Windows XP) when shutting down via Services.I get the following error on WinDbg:(1038.728): Access violation – code c0000005 (!!! second chance !!!) eax=00000000 ebx=00000000 ecx=0018b7a4 edx=77606e00 esi=0016b7f8 edi=0018b7a4 eip=7750cdbd esp=0012fe78 ebp=0012fe84 iopl=0 nv up ei pl nz na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 … ole32!StringFromCLSID+0x325 ole32!StringFromCLSID+0x2e7

  • Akku
    c# winapi .net-4.0 drag-and-drop ole
    Question:I need a DragAndDrop solution to download a file on drop in a folder of Windows Explorer for C# & .NET 4.0. It should not be necessary to have the file on the computer. The file will be big enough that the drag-time won’t be enough to get the download done. I have found various questions, even accepted answers, but nothing that works. The very closest thing to something working is this demo project:http://blogs.msdn.com/b/delay/archive/2009/11/16/creating-something-from-nothing-and-

  • user483679
    c# com .net-4.0 ole task-parallel-library
    This is an “is this possible, and if so can you give me a quick example because I can’t find one online?” kind of question.I have a number of completely separate (i.e. “embarrassingly parallel”) processes that I want to run in parallel using the Task Parallel library in .NET Framework 4 using C#. Some of these processes require the use of software that can be accessed via COM/OLE automation.Specifically, there is a Parallel.Foreach() loop that divides up the tasks from a list of items, basically

  • WQad
    wpf dll com mfc ole
    I have a WPF application compiled to ANYCPU target Platform. This application needs to launch a 32 bit MFC application. I am doing this through a COM Callable wrapper. The COM Callable wrapper launches the exe using OLE DISPATCH. If I compile COM Wrapper in win32 and launch WPF Application in x86 target platform, 32 bit legacy application launches successfully.If I compile COM Wrapper x64 bit, and compile WPF x86, my WPF application crashes on creating object of COM Wrapper.If I compile COM Wrap

  • Stefano L
    java eclipse-plugin swt eclipse-rcp ole
    I have some serious problem. We have in our application plugged in an external ole plugin in our eclipse rcp client. This plugin causes some error while running, which then kills the entire client.Since we cannot fix the problem, we want to catch that error, so that the client at least won’t crash. To be more precise, the client crashes because the JVM caused a fatal error. Is there any possibility to suppress those errors, to avoid the JVM from crashing?This is the code where we include the plu

  • Groo
    .net com pinvoke richtextbox ole
    I have a question related to managing OLE objects in a RichTextBox.What I’ve found so far is lots of info, but not exactly what I need, so I will make a quick introduction first (I also hope someone might find this helpful).1. What I know so farFirst of all, I am using OLE to insert images (or any ActiveX) into the RichTextBox. This is supposed to be “the right way” to do it, since there is no clipboard involved, and you can insert any ActiveX control you want. There is an article on CodeProject

  • Borodin
    perl matlab parallel-processing ole
    When Parallel::Loops is combined with Win32::OLE to create multiple instance of Matlab, if we usemy $ML = Win32::OLE->new(‘Matlab.Application’) or die “Cannot start MATLAB”in each loop, the program crashes showing an unhandled exception.If drop the my before $ML then it works, but at any time only one instance is running.

  • user1439691
    c++ mfc ole
    I have a COleControl object in my project. Inside this COleControl, I have a CRectTracker object.I want to handle the windows message (event) of WM_LButtonUp. (when the user stops to press the left mouse button).In my .h file I wrote:afx_msg void OnLButtonUp(UINT nFlags, CPoint point);In my .cpp file, inBEGIN_MESSAGE_MAP(CMyControl, COleControl)I addedON_WM_LBUTTONUP()Then I developed a method ofvoid CMyControl::OnLButtonUp(UINT nFlags, CPoint point) I did the same thing for the windows message

  • Alois Mahdal
    perl excel automation spreadsheet ole
    Friends, I wrote a Perl script to convert a set of CSV files into spreadsheet format using Spreadsheet::WriteExcel. After some research I came to conclusion that there is no option to fix column width as Auto-fit option.So what I’m doing is in the same script I’ve opened that XLS file using Win32::OLE module, while doing this I got an error messageCan’t use an undefined value as a HASH referenceCorresponding code is:# spread sheet creation my $workbook = Spreadsheet::WriteExcel->new($file_n

  • shahkalpesh
    perl winapi ms-access ole
    Currently I am trying to execute a macro in Microsoft Access through Perl OLEI am wondering how to properly make the call to run a macro. I have tried1) $oDatabase -> DoCmd.RunMacro(“Macro1”); 2) $oDatabase -> DoCmd -> RunMacro(“Macro1”);But they throw me “Can’t call method “DoCmd” on an undefined value” or “useless use of concatentation”Is this even possible to execute a DoCmd through Win::32 OLE? Any help would be greatly appreciated.Here is a complete code. It tries to look for the c

  • sharptooth
    windows com com-interop ole progid
    This MSDN article states that any ProgID must meet several formal requirements, length restriction included. However nothing is said about what happens if those are violated.I found several places in our codebase where ProgIDs are longer than 39 characters, still everything seems to work allright for them, ProgIDFromCLSID() and CLSIDFromProgID() included.Since violating those requirements is quite easy it would be very interesting to know what are the real possible consequences of such violation

  • Bo Frederiksen
    ruby vbscript ole
    I have a script, VBS or Ruby, that saves a Word document as ‘Filtered HTML’, but the encoding parameter is ignored. The HTML file is always encoded in Windows-1252. I’m using Word 2007 SP3 on Windows 7 SP1.Ruby Example:require ‘win32ole’ word = WIN32OLE.new(‘Word.Application’) word.visible = false word_document = word.documents.open(‘C:\whatever.doc’) word_document.saveas({‘FileName’ => ‘C:\whatever.html’, ‘FileFormat’ => 10, ‘Encoding’ => 65001}) word_document.close() word.quitVBS Exam

  • Clifford
    c++ winapi com ole
    I have already OLE Embedded object Excel Chart. And, when I create this object, i have some problem in project, when I’m resizing window. Using Spy++ I see two process: Excel 7 and Excel 9. Excel 9 contain “trash” in right part, and when I resizing window I can see undefined behaviour. On the following picture you can see a border, which I want to hide.How I can hide this border, if I known handle of window?

  • sharptooth
    visual-c++ com ole variant native-com-support
    I’m fairly certain that I can safely do:void funcA(VARIANT &V,_variant_t &vt) {vt = V; }But what about the other way around:void funcB(VARIANT &V,_variant_t &vt) {V = vt; }I’ve been seeing some REALLY weird behaviour in my app which I put down to COM-related threading issues. But then I got wondering if I was screwing up memory using variants wrongly. In funcB, the VARIANT V is part of a safe-array being prepared for a COM call. With my V=vt line, am I doing a shallow copy which

  • David Brown
    c++ c mingw ole undefined-reference
    Using MINGW, I’m trying to link my C code with a static C++ library that performs some OLE operations:mingw32-gcc main.o resources.o -o mbcom.exe -L../../Lib/Iup -liup -liupole -lole32 -lcomctl32 -lstdc++ -mwindowsUnfortunately, I get this:../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0x341): undefined reference to `IID_IOleControl’ ../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0x9b0): undefined reference to `IID_IViewObject2′ ../../Lib/Iup/libiupole.a(tOleHan

  • Zeljko Filipin
    ruby excel hudson ole watir
    I have a watir test that downloads some information from a web app to an Excel file, and I then open the file to confirm the contents. On my dev box everything works fine, but the scheduled automation runs (via Hudson) always fail attempting to open the Excel file. I have checked that the correct version of AutoITX3.dll is registered on both machines (Ruby 1.8, Watir 1.6.5). No other versions of AutoITx3 are registered on either machine. The error on the Hudson box is the one expected if the

  • none
    delphi delphi-2009 ole
    After calling to a com component procedure , an error raised OLE error C0000094.What does it mean, as searching yields this from this related question.which contain :0x80000001 -2147483647 Not implemented0x80000002 -2147483646 Ran out of memory0x80000003 -2147483645 One or more arguments are invalid0x80000004 -2147483644 No such interface supported0x80000005 -2147483643 Invalid pointer0x80000006 -2147483642 Invalid handle0x80000007 -2147483641 Operation aborted0x80000008 -21474836

Web site is in building