com

Changing run time of already scheduled tasks in windows task scheduler

巧了我就是萌 提交于 2019-12-01 07:45:47
问题 I have problem with modifying tasks which already exists on machine. I'm trying to do this with generated interop interfaces from C# (Interop.TaskScheduler.dll generated from system32/taskschd.dll). To start with, I can't use other libraries like http://taskscheduler.codeplex.com/ . Already tested and it works with library mentioned before. Now when I try do same with generated interfaces nothing changes. Basically what I'm doing: string STR_DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; string

Why does iterating a Hashtable with `For Each` not work in VBScript?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 07:41:48
Why can one iterate an ArrayList using For Each but not a Hashtable ? Dim i For Each i In CreateObject("System.Collections.ArrayList") ' no error Next For Each i In CreateObject("System.Collections.Hashtable") ' error Next Iterating the HashTable gives Object doesn't support this property or method. Scripting languages have a technical limitation, they can only use the default interface of a coclass. They have no notion of interfaces at all and no back-door to obtain another interface through IUnknown::QueryInterface(). Like you can in C# by casting to the desired interface type. The iterator

Connect 64bit Java with 32bit COM dll using Com4j or Jacob

我的梦境 提交于 2019-12-01 07:38:03
问题 I have the following configuration: 1) Windows 10 64-bit 2) An application that has only a 32-bit version and is available through COM. I access the .dll file of the 32-bit application using the tlbimb.jar to generate the interfaces needed and I succeed. Scenario 1: I try to access the 32-bit application using the Java 8 32-bit installation. I can invoke the methods through COM succesfully without any problem. Scenario 2: I try to access the 32-bit application using a Java 8 64-bit

C++ Interop: embedding an array in a UDT

青春壹個敷衍的年華 提交于 2019-12-01 07:26:45
问题 I have an application that involves a lot of communication between managed (C#) and unmanaged (C++) code. We are using Visual Studio 2005 (!), and we use the interop assembly generated automatically by tlbimp. We have fairly good luck passing simple structs back and forth as function arguments. And because our objects are fairly simple, we can pack them into SAFEARRAYs using the IRecordInfo interface. Passing these arrays as arguments to COM methods seems to work properly. We would like to be

How do I invoke the MIDL compiler to generate a .TLB file (type library) from an .IDL file?

别说谁变了你拦得住时间么 提交于 2019-12-01 07:14:12
I am struggling with something seemingly super-simple: I'd like to use the MIDL compiler to generate a type library ( .tlb file) from a .idl file. However, I just can't get MIDL to generate a .tlb file. This is my Foo.idl : import "unknwn.idl"; [object, uuid(400075B9-4BD6-45A5-B8B7-9DA0CF7B9B13)] interface IFoo : IUnknown { HRESULT DoFoo([in] int arg, [out, retval] int *result); } This is how I invoke the MIDL compiler: midl Foo.idl /tlb Foo.tlb Which writes the following output to the console: Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555 Copyright (c) Microsoft Corporation. All

Using SqlServer CE without installation

≡放荡痞女 提交于 2019-12-01 07:06:01
问题 Given: A clean machine, no SQL Server CE present. A set of *.sdf files (Sql Server CE databases), never mind how they got there The DLLs of the relevant Sql Server CE (sqlceca35.dll, sqlcecompact35.dll, sqlceer35EN.dll, sqlceme35.dll, sqlceoledb35.dll, sqlceqp35.dll, sqlcese35.dll) Question: How to make available the Sql Server CE OLEDB provider implemented by the aforementioned DLLs. I am looking for a programmatic way to do so when running as a limited account. In other words, assuming we

Why does Regasm put ProgId into HKEY_CURRENT_USER?

元气小坏坏 提交于 2019-12-01 06:47:57
I have two Virtual Machines that I wish to (Wix) install my software onto. One is Windows XP SP2 and another is Windows XP SP1. Neither of them use domains, and both of them have the local user Administrator with admin privileges. Running RegAsm.exe to register MyApp.dll on the machine with SP3 puts my ProgId in the folders: HKEY_CLASSES_ROOT\MyAppProgId HKEY_LOCAL_MACHINE\Software\Classes\MyAppProgId whereas running it on the SP2 machine puts it in the folders: HKEY_CLASSES_ROOT\MyAppProgId HKEY_CURRENT_USER\Software\Classes\MyAppProgId I found this while trying to load MyApp.dll from a

Is there a way for registration free activation of EXE COM components

两盒软妹~` 提交于 2019-12-01 06:47:04
Is there a way to activate a COM component which is an EXE COM application and also it's dependent COM dlls? I want to activate this COM component from .NET application(VS 2005/VS 2008). The path of call is C# application --> invoking out-of-proc exe(this is through COM) and then this out-of-proc invokes few COM dlls Reg-free COM does not work for out of process components. ActiveX EXE and ActiveX Document project types cannot be used with Reg-Free COM, as discussed in the sidebar. Simplify App Deployment with ClickOnce and Registration-Free COM Look at Microsoft Forum Registration-Free EXE

Where can I find documentation on the C# MSTSCLib, specifically the MsRdpClient classes?

天大地大妈咪最大 提交于 2019-12-01 06:39:08
问题 I would like to figure out how to create a C# Remote Desktop client and the documentation on the internet varies from sparse to non-existent. Or if you have this information, please let me know. I will compile as much info as possible and post it up somewhere I'd like to learn the following information: How do I connect programatically to a remote desktop server? What client class should I use? There are like 20 of them. I sort of know that you can set Server and Username directly. How do I

Creating IStream object in C#

你离开我真会死。 提交于 2019-12-01 06:33:28
问题 I'm writing a project and working with another party DLL. Function from their DLL wants an IStream object to save result, but I can't understand how to create an IStream object. Can anyone help me with my problem? 回答1: You don't create IStream object, because obviously it's an interface. You should rather implement this interface and pass your object. Or simply use an object that already implements it, if such object exists. Already given answer for a similar question gives a nice example how