ole

ArgumentException on reading an OLE image from an MS Access database in .NET

…衆ロ難τιáo~ 提交于 2019-12-06 09:47:46
问题 I am trying to read an image from an Access database. It reads the bytes but it gives an unhandled System.ArgumentException when I try to use Image.FromStream . Here is my code : private Image ReadImageFromDB() { Image fetchedImg; if (rownumber >= 0) { byte[] fetchedimgbytes = (byte[])localDataTable.Rows[5]["Object"]; MemoryStream stream = new MemoryStream(fetchedimgbytes); fetchedImg= Image.FromStream(stream); return fetchedImg; } else { MessageBox.Show("no image"); return null; } } 回答1: I

Parse MathType MTEF data from OLE binary string

可紊 提交于 2019-12-06 07:02:05
问题 There is a need to convert the MathType equations in the MS-WORD 2003 or below to MathML in order to render nicely on the the web. The MathType's built in function "Publish to MathPage" can do the job very nicely, but I want to integrate the equation conversion process in my C# application. Because I couldn't find any API references that the MathPage export interface is provided by the MathType SDK, I need to figure out a way to do the individual equation conversion by myself. The current

Display Microsoft Access “OLE Object” in my application

大憨熊 提交于 2019-12-06 05:32:52
I have an an Access database that contains an OLE Object field. I need to extract the contents of this field as an image. It does not matter what type was originally placed in the OLE Field. I just need an image that represents what that object looks like. The main goal of this is to move away from the OLE Object field to a more standard image stored in a blob field. I have found some example code that parses the blob and tries to extract the underlying file. I am really looking for something that uses the OLE objects as they were intended instead of trying to work around them. There are two

Strange Case of the missing method: SXS and Controls.Add results in “object doesn't support this property or method”?

六眼飞鱼酱① 提交于 2019-12-06 04:12:02
问题 I have a project written in VB6 that uses a UserControl, The project runs fine when the OCX is registered, but if I run the same project with a side by side manifest it results in an error. I can use the Control with no problem as long as it's loaded statically (added before on the form) but if I add a dynamic control to form on any use of the new control (property or method) I get this error: Object doesn't support this property or method This error can be reproduced this way: Create an OCX

Strip OLE header information (MS Access / SQL Server)

百般思念 提交于 2019-12-06 01:52:21
I have a C++ application that needs to support binary database content (images, etc). When using MS Access or MS SQL Server this data is wrapped inside an OLE object. How do I strip this OLE header information? Note that I can't just look for the beginning of a specific tag as the content can be png, jpg and a whole heap of other formats. Should I use something like COleDataObject? Using MS Access 2007 (I need to test other MS databases) the format seems to be: 84 bytes file name + \0 full path + \0 5 bytes + [2] bytes (the third byte of those five bytes) temp path + \0 4 bytes actual data (if

How to use PowerShell to access methods and properties of a Third-Party OLE DLL?

Deadly 提交于 2019-12-05 21:34:06
I am trying to write a PowerShell script which could access methods and properties of a third-party OLE DLL. The software vendor provided a working example in vbscript to achieve the same result. Below is an excerpt of the codes: Set objOLE = CreateObject("NETIQOLE.APPMANAGER") objOLE.Logon strInstance, strRepository, strUserID, strPwd ... However, when I tried to code in PowerShell as below: $objOLE = New-Object -ComObject "NETIQOLE.APPMANAGER" $objOLE | Get-Member I got output below and didn't see any relevant method or property. TypeName: System.__ComObject Name MemberType Definition ---- -

Retrieving Outlook 'Inbox' and 'Sent' folders in Delphi using OLE

和自甴很熟 提交于 2019-12-05 19:31:16
What's the best way to go about extracting Outlook folders from within Delphi? Ideally I'd like to retrieve the Inbox folder and any other folders within it. I don't require the email headers/message just purely the folder names. Delphi BDS 2006 See here for Outlook's Object Model. Below displays the names of folders in the Inbox: procedure TForm1.Button1Click(Sender: TObject); var Outlook, oNameSpace, Inbox: OleVariant; i: Integer; begin try Outlook := GetActiveOleObject('Outlook.Application'); except Outlook := CreateOleObject('Outlook.Application'); end; oNameSpace := Outlook.GetNamespace(

how to connect to an open window of internet explorer using c#?

こ雲淡風輕ζ 提交于 2019-12-05 19:01:57
Can you use COM/OLE in a C# program to connect to a running instances of internet explorer? Ideally I'd like to find the URLs of all webpages open in IE. Evan I found the answer here and the code excerpt is: public class Form1 : System.Windows.Forms.Form { static private SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass(); public Form1() { InitializeComponent(); foreach(SHDocVw.InternetExplorer ie in shellWindows) { MessageBox.Show("ie.Location:" + ie.LocationURL); ie.BeforeNavigate2 += new SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler(this.ie_BeforeNavigate2); } }

动态内表并OLE保存EXCEL

北城以北 提交于 2019-12-05 17:11:54
/*--> */ /*--> */ *&---------------------------------------------------------------------* *& Report Z_GAOJIAN10293 *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT Z_SALAH_DYNAMICTAB_OLE_SL1 . TABLES T001 . TYPE-POOLS : ABAP ,SLIS ,OLE2 . DATA D_REF TYPE REF TO DATA . DATA GT_FIELDCAT TYPE LVC_T_FCAT . DATA GV_FIELDCAT TYPE LVC_S_FCAT . DATA GT_EVENTS TYPE SLIS_T_EVENT . DATA GV_EVENTS TYPE SLIS_ALV_EVENT . DATA GT_01 LIKE TABLE OF DNTAB . DATA WA_01 TYPE DNTAB . DATA WA_02 LIKE LINE OF

msxml3.dll in context sp_OAMethod 'send'

匆匆过客 提交于 2019-12-05 11:14:16
Working code from Win2003 + SQL Server 2005 is not working under Win2012 + SQL Server 2012 sp1. The only ~real solution I found is: I copied C:\Windows\System32\msxml3.dll from a Server 2008 to the same dir on a server 2012. Problem on 2012 server solved, sending with POST and GET working fine. But as I cannot modify server and both msxml3.dll and msxml6.dll are locked - I need to understand what is wrong and apply other way. Code is simple as usual for grabbing soap web service: Declare @Object as Int; Declare @ResponseText as Varchar(8000); Declare @ErrCode Int; Exec sp_OACreate 'MSXML2