com

How to get access to WriteableBitmap.PixelBuffer pixels with C++?

安稳与你 提交于 2019-12-04 09:41:22
There are a lot of samples for C#, but only some code snippets for C++ on MSDN. I have put it together and I think it will work, but I am not sure if I am releasing all the COM references I have to. Your code is correct--the reference count on the IBufferByteAccess interface of *buffer is incremented by the call to QueryInterface , and you must call Release once to release that reference. However, if you use ComPtr<T> , this becomes much simpler--with ComPtr<T> , you cannot call any of the three members of IUnknown ( AddRef , Release , and QueryInterface ); it prevents you from calling them.

difference between server.createObject and createobject in asp classic

别来无恙 提交于 2019-12-04 09:37:56
according to http://msdn.microsoft.com/en-us/library/ms524620.aspx you should use server.createObject If you are already familiar with VBScript or JScript, note that you do not use the scripting language's function for creating a new object instance (CreateObject in VBScript or New in JScript). You must use the ASP Server.CreateObject method; otherwise, ASP cannot track your use of the object in your scripts. but some other folks think that server.createObject implies an overhead that most times could be avoided http://classicasp.aspfaq.com/components/should-i-use-createobject-or-server

Any method for accessing Windows COM methods using Java?

半腔热情 提交于 2019-12-04 09:16:21
I have an application which makes use of JNA to call functions from a hardware abstraction library in C++. One of the supported hardware devices requires Windows COM subsystem to be initialized (via CoInitialize or CoInitializeEx). Does anybody know any Java library which can do the trick? I know I could wrap some Windows functions, but if I had something ready and tested, that would be better. I found one called JACOB but it is said that the documentation is not good and it's been a long time since they last updated it. Thanks! We use Com4J (for external processes like Excel) and the SWT COM

Add ATL Simple Object in Visual Studio 2017

余生颓废 提交于 2019-12-04 09:06:01
I am working with an old ATL/COM project in Visual Studio 2017. In previous versions of Visual Studio you could select "Add Class" and then select the option "Add simple ATL object" to add a COM class to the project. This option appears to be completely missing in Visual Studio 2017. Has the option been moved? Have I missed an installation option? Does Visual Studio fail to recognize my project as an ATL project? (It was created with a much older version.) Or is this the end of the road for ATL? I'm not sure whether this an answer, but it is too much for a comment and more than just an edit to

COM cannot start out-of-process .Net server compiled as AnyCPU

こ雲淡風輕ζ 提交于 2019-12-04 08:37:21
问题 I am trying to get COM to start my out-of-process .NET COM server. It works if the server process is compiled with x64, but if I use AnyCPU (which is what I want) then it hangs for a while and eventually fails with 0x80080005 (CO_E_SERVER_EXEC_FAILURE). How can I get this to work? I am running on a 64-bit machine: Windows 7 with Visual Studio 2008 SP1. I can see in Task Manager that it does start my server. So I guess the problem is in the communications between COM and the server (class

Reg free COM interop with C#, possible?

我的梦境 提交于 2019-12-04 08:28:43
问题 Is it possible to use registration free COM with Dotnet interop and C#? If so how does one add a reference to the COM object in the C# project? I have a reg free ATL COM server dll with an embedded manifest and two test clients, one cpp the other c#. The cpp client correctly references the COM object using an import statement and either #pragma comment(linker, "\"/manifestdependency:type='win32' name='TestComSvr2' version='1.0.0.0'\"") or setting 'Additional Manifest Dependencies' to "type=

C# COM Office Automation - RPC_E_SYS_CALL_FAILED

自闭症网瘾萝莉.ら 提交于 2019-12-04 08:26:09
I'm writing a C# program that acts as a PowerPoint 2007 plugin. On some machines, some calls to the PowerPoint object model throw a COMException with the message RPC_E_SYS_CALL_FAILED . I couldn't find any specific advice on what to do regarding this error, or how to avoid it. From Googling it looks like something to do with the message queue or Single-Threaded Apartments. Or am I way off? Example of the error message is: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)) at Microsoft.Office.Interop.PowerPoint._Presentation.get_FullName() Unfortunately, the

What is the preferred method of marshalling COM interfaces across threads?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 08:23:28
What are the pros/cons of using the GIT as opposed to CoMarshalInterThreadInterfaceInStream and CoGetInterfaceAndReleaseStream for marshalling COM interfaces across threads? Are there strong reasons for preferring one method over the other, or is it more a matter of personal preference? From MSDN : If you are unmarshaling an interface pointer multiple times between apartments in a process, you might use the IGlobalInterfaceTable interface. With other techniques, you would have to remarshal each time. Besides that, I would say it's mostly a matter of preference. You need a copy of Essential COM

Can I run RegAsm without being Administrator?

主宰稳场 提交于 2019-12-04 08:10:26
问题 My coworker is trying to register some COM components (which I wrote) via RegAsm.exe and it says he needs Administrator privileges. His account has admin privileges but he is not logged in as Administrator. Is there a way to use his regular user account and succeed at this task? 回答1: Admin privileges are required to allow Regasm.exe to update the registry. If this is a UAC restriction then create a shortcut on the desktop for cmd.exe and check the "Run this program as an administrator"

What determines how long does an out of process COM server takes to notice that a client has died?

放肆的年华 提交于 2019-12-04 08:08:36
In a simple windows setup we have a COM singleton that runs as an out of process server. Clients connect by calling cocreate and each receives an interface to the same instance of the server. If clients shutdown normally they release their references. The server has a bit of logic that keeps it alive for a short time after the last release to allow for new connections. I'm interested in one special case - the server is running with only one client which crashes (consider this to be any random unknown crash) and the client exits without having released its references. I observe that after a