com

PowerPoint Launched via C# does not Quit

假如想象 提交于 2019-12-30 06:09:29
问题 Hey I'm automating PowerPoint and Excel from a C# WinForms application; what I do is read slides from PowerPoint and save them in Excel and then quit both apps. Excel quits successfully but PowerPoints doesn't quits. The problem is when I convert first time it doesnt quits, but when I convert again it does. Here is my code try { PowerPoint.Application ppApp; PowerPoint.Presentation ppPres; List<Company> companies = new List<Company>(); ppApp = new PowerPoint.Application(); ppApp.Visible =

Azure COM Objects

会有一股神秘感。 提交于 2019-12-30 04:40:10
问题 I am trying to move a website I am hosting on a server with IIS over to an Azure web site. I'm using a COM object but I'm not sure if I can register this? I found some posts talking about uploading the dll and registering it on start up but the article seems to be missing. Is this possible? 回答1: I had this exact problem registering legacy COM Components on Azure. I documented my methodology here: AspPDF and AspJPEG on Windows Azure Igorek is correct, you will need to use a Web Role to achieve

IE COM automation: How to get the return value of `window.execScript` in PowerShell

╄→尐↘猪︶ㄣ 提交于 2019-12-29 10:07:35
问题 From this other post it looks like it is possible to get the return value of IHTMLWindow2::execScript from Internet Explorer API, however the linked example is in C++ and I don't really understand it. I'm trying to do the same thing in PowerShell , so here's my code that shows the problem: $ie = New-Object -COM InternetExplorer.Application $ie.visible = $true $ie.navigate("http://google.com") while ( $ie.busy ) { start-sleep -m 100 } $document = $ie.document $window = $document.parentWindow

java-COM interop: Implement COM interface in Java

[亡魂溺海] 提交于 2019-12-29 09:39:07
问题 How can I implement a vtable COM interface in java? In the old days, I'd use the Microsft JVM, which had built in java-COM interop. What's the equivalent for a modern JRE? Answers to a similar SO question proposed JACOB. I've looked at JACOB, but that is based on IDispatch, and is aimed at controlling Automation serers. The COM interfaces I need are custom vtable (extend IUnknown), e.g. IPersistStream, IOleWindow, IContextMenu etc. For my use case, I could implement all the COM specifics in

Need shared property accross instances of my COM server

回眸只為那壹抹淺笑 提交于 2019-12-29 09:04:57
问题 I have a VB.NET COM class with a Shared property, like ABC. The problem is the component is used by several C++ COM exe, so its my understanding that they each will get their own assembly load, and the Shared property will be unique to each EXE. Is there a way to get for this assembly a cross EXE shared property ? Tx. 回答1: What you are describing would be "easily" accomplished in native COM by creating an out-of-process COM server (also commonly referred to as an ActiveX EXE). As the name

IAudioSessionNotification, anyone have working code?

谁说我不能喝 提交于 2019-12-29 08:40:10
问题 I'm picking up some experimental code I was messing with in the Windows 7 Beta now that I've installed the RC. Basically, I'm trying to get IAudioSessionManager2 & IAudioSessionNotification working together to inform my little app of every new audio session created. Punchline code in AudioListener (public IAudioSessionNotification): //This is mostly lifted from MSDN HRESULT STDMETHODCALLTYPE AudioListener::QueryInterface(REFIID riid, void** ppvObject) { if(riid == __uuidof(IUnknown)) {

Registering a 32 bit DLL with 64 bit regsvr32

坚强是说给别人听的谎言 提交于 2019-12-29 05:59:42
问题 Considering the following Understanding A 32 bit Process cannot load a 64 bit dll or vice versa. For registering/unregistering a DLL regsvr32 calls the entry point DllRegisterServer / DllUnregisterServer after loading the target DLL into its address space through LoadLIbrary . On a 64 bit System, 32 bit version of regsvr32 is present in C:\Windows\SysWOW64 But then on my 2008 R2 Box, I was able to register a 32 bit dll by the 64 bit regsvr32. How was that possible? Am I missing something? 回答1

Registering a 32 bit DLL with 64 bit regsvr32

对着背影说爱祢 提交于 2019-12-29 05:59:10
问题 Considering the following Understanding A 32 bit Process cannot load a 64 bit dll or vice versa. For registering/unregistering a DLL regsvr32 calls the entry point DllRegisterServer / DllUnregisterServer after loading the target DLL into its address space through LoadLIbrary . On a 64 bit System, 32 bit version of regsvr32 is present in C:\Windows\SysWOW64 But then on my 2008 R2 Box, I was able to register a 32 bit dll by the 64 bit regsvr32. How was that possible? Am I missing something? 回答1

How to use a 32 bit COM object on Windows Server 2008 (works on 2008 R2 but non 2008)

别等时光非礼了梦想. 提交于 2019-12-29 05:37:13
问题 I am using the default DllSurrogate to enable automation of a 32bit COM object in 64bit. This works perfectly in Windows7 64 bit and Windows Server 2008 R2. However; regular flavor Windows Server 2008 (pre R2) completely ignores the DllSurrogate entry in the registry. I've researched this for days and found documentation that classic Windows Server 2008 had registry reflection which ignores the DllSurrogate value if its blank. (I leave the value of the registry string blank to use the default

In-Proc COM object sharing across another Process

假如想象 提交于 2019-12-29 04:54:19
问题 Before I ask this question I would like to make it clear that I know there are libraries and techniques for Inter process communcation. This though, is a learning question about COM. I also do know about out-of-proc servers but that's not what I am looking for. The question: What I want to know, because I don't know this, is it possible, and if yes how, to share an in-proc COM object (object defined in a DLL) living in one process (has been instantiated in the process) across another process?