com

Error ASP 0177: 8007007e Server.CreateObject fails for COM DLL

别来无恙 提交于 2019-12-11 17:25:34
问题 We have been trying to install a COM DLL on a new server. The interface is Classic ASP. The Map Connector DLL seems to be the problem but that is as far as I am able to get. We are unable to get the pages served by IIS to give anything other than a 500 error. When tracing the ASP: 127. -ASP_SCRIPT_TRACE_COM_CALL_END FilePath C:\INETPUB\WWWROOT\MILER\GLOBAL.ASA LineNumber 6 CurrentStatement set g_pcmsrv=Server.CreateObject("PCMServer.PCMServer") SizeOfStatement 55 0 ms 128. -ASP_LOG_ERROR

.net registered dll does not show function in vb6

China☆狼群 提交于 2019-12-11 16:58:15
问题 net dll (PasswordHashLibrary) to be used in vb6 application. after creating the project, i went to project properties -> build -> Register for COM interop. Then registered this dll on my machine using regasm command. Started a fresh vb6 project -> added reference to PasswordHashLibrary Now the vb6 project allows me to write the following Dim objHash As New PasswordHashLibrary.Hash PasswordHashLibrary = namespace Hash = Class But it doesn't let me call any functions inside (class and functions

can any interface inheriting IUnknown be made into a COM interface?

可紊 提交于 2019-12-11 15:54:12
问题 I need to call methods of the IWeatherStation interface which inherits IUnknown from C#. How do I go about it, if it is possible? Thank you 回答1: Sure. There is an example here: Example COM Class (C# Programming Guide). The first thing you should do is locate the real (idl or c/c++) definition of the interface. For this SDK it's located for example in the < setup path>\Lockheed Martin\Prepar3D v4 SDK 4.3.29.25520\inc\PDK\IWeatherSystem.h header file. This is where you will get the methods and

Accessing COM add-in code from VBA

天大地大妈咪最大 提交于 2019-12-11 15:48:27
问题 I have created a COM add-in for Excel 2003 using Visual Studio 2005 Tools for Office. The add-in code looks like this: [Guid("EAC0992E-AC39-4126-B851-A57BA3FA80B8")] [ComVisible(true)] [ProgId("NLog4VBA.Logger")] [ClassInterface(ClassInterfaceType.AutoDual)] public class Logger { public double Debug(string context, string message) { Trace.WriteLine(message); return message.Length; } [ComRegisterFunctionAttribute] public static void RegisterFunction(Type type) { Registry.ClassesRoot

write a com control in c# and use it in MFC

懵懂的女人 提交于 2019-12-11 15:35:32
问题 if this possible to write a com control or activex in C# and use it in MFC ? 回答1: Yes. First, you need to create COM object. Below is a very simple example. [Guid("123565C4-C5FA-4512-A560-1D47F9FDFA20")] public interface IDoSomething { [DispId(1)] string Name { get; } [DispId(2)] int DoSomething(); } [ComVisible(true)] [Guid("12AC8095-BD27-4de8-A30B-991940666927")] [ClassInterface(ClassInterfaceType.None)] public sealed class DoSomething: IDoSomething { public DoSomething() { } public string

How do I make COM Surrogate Multiple Instance?

十年热恋 提交于 2019-12-11 15:28:34
问题 I have a C# 32-bit COM DLL that talks to a C# 64-bit exe using the 'DllSurrogate' method described in Hosting a .NET DLL as an Out-Of-Process COM Server (EXE). I need this setup because the 32 bit C# talks to a legacy 32-bit C++ dll. I thought everything was working fine, but I have just realised that when you create a second instance of the 64-bit exe you do not get a second "DLL Host" (COM Surrogate) process. This is no good for my application. This is a Windows Desktop application and I

What's the purpose of IUnknown member functions in END_COM_MAP?

左心房为你撑大大i 提交于 2019-12-11 15:18:35
问题 ATL END_COM_MAP macro is defined as follows: #define END_COM_MAP() \ __if_exists(_GetAttrEntries) {{NULL, (DWORD_PTR)_GetAttrEntries, _ChainAttr }, }\ {NULL, 0, 0}}; return _entries;} \ virtual ULONG STDMETHODCALLTYPE AddRef( void) throw() = 0; \ virtual ULONG STDMETHODCALLTYPE Release( void) throw() = 0; \ STDMETHOD(QueryInterface)(REFIID, void**) throw() = 0; It is intended to be used within definition of classes inherited from COM interfaces, for example: class ATL_NO_VTABLE CMyClass :

Can't get simple COM project to work: where and how to put implementation?

情到浓时终转凉″ 提交于 2019-12-11 15:13:57
问题 I am trying to follow the steps of a Simple COM Tutorial which looks nice and logical to me. I would normally shy away from using a wizard but consensus seems to be this is the best way to do COM. To summarize Create an ATL project with the wizard Use the Add Class dialog to create an ATL simple object ( SimpleChatServer in the example) Navigate into ClassView, right click the interface for the object, Add Method ( CallMe in the example) The tutorial gives a method body to use Compile My

Retrieve an iTunes Track object from its high/low persistent ID

◇◆丶佛笑我妖孽 提交于 2019-12-11 15:13:38
问题 I'm trying to retrieve a track object from its persistent ID using AutoHotkey (v1.1) and iTunes Windows 11. The script works well until I try to use the ItemByPersistentID method. objITunesunesApp := ComObjCreate("iTunes.Application") objITunesLibrary := objITunesunesApp.Sources.Item(1) objITunesPlaylist := objITunesLibrary.Playlists.Item(1) objITunesTrack := objITunesPlaylist.Tracks.Item(1) ; Test if objects are OK MsgBox, % objITunesTrack.Name ; Display the song name - OK ; Get high and low

Modify data in matlab instance using MLApp and COM, C#

拈花ヽ惹草 提交于 2019-12-11 14:37:50
问题 C# application trying to reshape data in Matlab. In Matlab I need the data to appear 3-dimensional in the matlab instance . (The code assumes an instance of matlab is running.) public void PassAndResizeInMatlab() { MLApp.MLApp matlab = (MLApp.MLApp)Marshal.GetActiveObject("Matlab.Desktop.Application"); matlab.Execute("enableservice('AutomationServer',true);"); var dat = new double[]{1,2,3,4}; var name = "myexample"; //matlab does not support passing double[,,] with this function. matlab