comobject

Accessing JavaScript Objects from vb.net

五迷三道 提交于 2021-01-29 07:02:11
问题 I'm working on a vb.net application that interacts with a (third party provided) web app to provide additional functionality (e.g. removing menu items, pulling information from the pages, etc.). The web app is completely driven by javascript but is hosted in asp.net and is only used with Internet Explorer. I'm trying to read properties from a javascript object and execute some of it's functions. I've managed to get hold of the javascript object by getting the mshtml.HTMLDocument of the iframe

Accessing JavaScript Objects from vb.net

三世轮回 提交于 2021-01-29 06:56:20
问题 I'm working on a vb.net application that interacts with a (third party provided) web app to provide additional functionality (e.g. removing menu items, pulling information from the pages, etc.). The web app is completely driven by javascript but is hosted in asp.net and is only used with Internet Explorer. I'm trying to read properties from a javascript object and execute some of it's functions. I've managed to get hold of the javascript object by getting the mshtml.HTMLDocument of the iframe

Why PrincipalSearcher gives System.__ComObject for attribut msExchRecipientDisplayType?

99封情书 提交于 2020-06-17 15:56:19
问题 Why PrincipalSearcher gives System.__ComObject for attribut msExchRecipientDisplayType ?? I want to retrieve attribute msExchRecipientDisplayType and PrincipalSearcher gives System.__ComObject . Also I tried to retrieve it by DirectorySearcher and it gives correct value i.e. ''. 0 UserMailbox (shared) 1 MailUniversalDistributionGroup 6 MailContact 7 UserMailbox (room) 8 UserMailbox (equipment) 1073741824 UserMailbox 1073741833 MailUniversalSecurityGroup as mentioned here https://answers

Dump Object for ComObject using dynamic?

喜夏-厌秋 提交于 2020-01-11 07:11:31
问题 I'm trying (without luck) to implement an "Object Dumper" for objects I'm accessing in the Office Type Library. It must be possibly, because VS's debug window has a "dynamic view" for the System.__ComObject objects that effectively does what I want. Any ideas? 回答1: I have also created a method for getting an interface that can be used for accessing the object. Use: using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; You have to have an IDispatch interface in

Powershell com object with parameters

给你一囗甜甜゛ 提交于 2019-12-24 13:24:44
问题 I want to write a powershell script that will open an Internet Explorer instance as a com object so i can manipulate it. The problem is I need to run it with a parameter to make sure IE is run as a new session. The parameter I need to pass is -noframemerging I need to pass this so each instance is a new session. Here is the code I've been using to get the instance started. $ie = new-object -com "InternetExplorer.Application" If someone could give me a hand figuring out how to be able to

Error using ListObject.Add to create a Table Style

百般思念 提交于 2019-12-22 08:47:10
问题 I'm Trying to create a Custom Table(Just like click the 'Format as Table' in the excel bar) with PowerShell and Excel ComObject from a CSV Here's my code... $Excel = New-Object -ComObject excel.application $Excel.visible = $true $Excel.sheetsInNewWorkbook = $csvFiles.Count $workbooks = $excel.Workbooks.Add() $worksheets = $workbooks.worksheets $CSVFullPath = C:\temp.csv $worksheet = $worksheets.Item(1) $worksheet.Name = "Temp" $TxtConnector = ("TEXT;" + $CSVFullPath) $CellRef = $worksheet

Leak in RuntimeBinder when using “dynamic” keyword with __ComObject

人走茶凉 提交于 2019-12-19 03:41:32
问题 Does anybody know if there is a way of preventing a memory leak in RuntimeBinder when using "dynamic" keyword with __ComObject instances in C#? I got the following code: var t = Type.GetTypeFromCLSID(new Guid("BB06C0E4-D293-4f75-8A90-CB05B6477EEE")); while (true) { dynamic o = System.Activator.CreateInstance(t); Marshal.ReleaseComObject(o); } This leaks LocalVariableSymbol class instances (and other from the Microsoft.CSharp.RuntimeBinder.Semantics namespace). Replacing "dynamic" with "object

How to convert 8209 array object variant to VT_VARIANT

╄→гoц情女王★ 提交于 2019-12-18 07:22:48
问题 I am calling a COM object method that returns an array variant object of type 8209 in my PHP code. $com_VArray = $com_Object->objectMethod; //Is a 8209 variant object I want in the end to pass the converted VT_VARIANT object as a value for another COM object method which requires its input to be VT_VARIANT[12]. I am converting $com_VArray to a VT_VARIANT object variant type by issuing the following $obj_VT_VARIANT = variant_cast($com_VArray, VT_VARIANT); But then I get this following error

How to pass a variant object type 16396 in a COM method that requires an input value of a VT_VARIANT [12]

这一生的挚爱 提交于 2019-12-13 12:23:11
问题 I have in my PHP code, a COM object '$com_myObject' with a method 'myObjectMethod' which after I run com_print_type info($com_myObject); on it, it shows that it has the method 'myObjectMethod' declared as shown below myObjectMethod(/* VT_VARIANT [12] [in] */ $RawData) { /* Processes entered object data */ } In my code I am having another function return a variant object '$myInputObject' of type value 16396. I plan to use '$myInputObject' as the input value for 'myObjectMethod' method. print

How to loop thru and output values of a variant array object in Php

☆樱花仙子☆ 提交于 2019-12-12 06:38:13
问题 In my Php code I have an array object $myArrayIbject that I want to get its values. I know it is not a one dimensional array. That's what I know for sure. When I run echo gettype($myArrayIbject); It returns Object. When I run echo count($myArrayIbject); It returns 1632. When I run var_dump( $myArrayIbject); It returns object(variant)#3(0){ } When I run variant_get_type($myArrayIbject) It returns 8209. The other thing I have observed is that from $myArrayIbject[0] all the way to $myArrayIbject