com

Custom COM class factory for managed in-proc server

假装没事ソ 提交于 2019-12-07 17:22:20
问题 I'm looking at implementing custom COM activation logic for a managed class library, in MkParseDisplayName/BindToObject manner. This way, creating an object from VB might look like this: obj = GetObject("clsid:12341234-1234-1234-1234-123412341234:!UniqueObjectId") That would not be a problem for an out-of-proc server (using CoRegisterClassObject ). However, for an in-proc server, I'd need to alter the implementation of DllGetClassObject , which is normally provided by mscoree.dll . Is this

Cast object as OleVariant in Delphi

旧巷老猫 提交于 2019-12-07 17:20:24
问题 Is there a way to pass a wrap and unwrap a TObject descendent in an OleVariant? I am trying to pass a TObject across automation objects. I know it's not a good idea but I don't have a good alternative. The object is to be passed between objects from the same automation dll, if that makes any difference. Something like this: function GetMyObjAsVariant; var MyObj: TMyObj; begin MyObj := TMyObj.Create; result := OleVariant(MyObj); end; Which would be used by a client as var MyObj: TMyObj; begin

Convert c++ (DLL) project to COM DLL project [closed]

蹲街弑〆低调 提交于 2019-12-07 16:47:33
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . Hi I have a pure C++ project (DLL) which I would like to convert to COM project, e.g. all public interfaces defined in headers, will now be exposed as COM interfaces (IDL etc...). And the final product should be

How do I handle a string array returned from a C# Method in VBA

末鹿安然 提交于 2019-12-07 16:42:43
问题 I have written an assembly in C# which returns a string array, the C# code is below: [ComVisible(true)] public class PostcodeFinder { public string[] SearchPostcodes(string postCode) { var searchService = new QuickAddress("http://x.x.x.x:xxxx/") {Engine = QuickAddress.EngineTypes.Singleline, Flatten = true}; var mPicklist = searchService.Search("GBR", postCode, PromptSet.Types.OneLine); var x = mPicklist.Picklist.Items.Count(); var resultsToReturn = new string[x]; for (var i = 0; i < x; i++)

Correct name for non-COM, non-.NET DLL?

走远了吗. 提交于 2019-12-07 16:37:53
问题 In the Windows world, what is the correct name for a good. old-fashioned C++ DLL with exported functions? Not a COM DLL, not a .NET DLL. The kind of DLL that we used to invoke by calling LoadLibrary() and GetProcAddress()? I've always called them "flat DLLs" because the caller cannot instantiate objects from the DLL, but what is the correct name? EDIT Thanks for the answers. Just "DLL" may be technically correct, but where I work everyone assumes that "DLL" means COM, or maybe at a push .NET,

How to implement a simple add-in for MS Excel on C++

社会主义新天地 提交于 2019-12-07 16:23:32
问题 I need a help for implementing add-in for Excel 2010 or higher on C++, the only functionality of this add-in is renaming of current Excel sheet. The add-in should create new custom tab on the Ribbon with name: “Test Add-in”, this tab contains group with name “My Functionality”, this group contains large button with some picture with name “Rename Current Sheet”. After clicking on the button, I should show the following dialog: User can enter new name, click ok and after this, the name of

Can we use COM objects in C# project?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 16:11:56
问题 I have made a C# COM object by following the tutorial. http://www.codeproject.com/Articles/18939/C-Com Now I want to use this in C#. When I go to add reference \ com \ myComObject it gives me error. It says that the library was imported from a .NET assembly and cannot be added. Add a reference to the .NET assembly instead. 回答1: I think it is saying it is a com visible .net assembly and you should add the .net assembly directly as a .net assenbly. The technique you link to is how to write a

Seemingly random crashes with VB.NET and COM Interop

我只是一个虾纸丫 提交于 2019-12-07 15:53:42
问题 I'm thinking of rewriting a brand new VB.NET application in VB 6. The application runs under terminal services and makes heavy use of COM. For some reason, there is random weirdness with the application - Random Access Violation errors (WinDbg exception analysis points into dll's like comdlg32.dll, mscorwks) Random Buffer Overflow errors (same) Random errors in general - for example this line in Form.Load sometimes throws - Me.Icon = Resources.MyIcon I have followed all possible advice

How to debug a COM C++ Out of Process Server ? (client: Excel vba)

蓝咒 提交于 2019-12-07 15:41:32
问题 I don't know how to debug a COM ATL C++ out of process exe server with Visual Studio 2015. For a COM ATL DLL there is no problem, the breakpoints are automatically triggered when I call the COM dll. However when I try to debug an EXE server, the debugger didn't break. Indeed the exe server is only loaded at demand and the debug symbols of the exe server are not loaded when the client starts. My client, that call the COM server, is Excel VBA (I have added the reference to the com exe, in the

Cannot instantiate delphi written application.exe using IIS, MVC4, C# and COM

China☆狼群 提交于 2019-12-07 15:37:47
问题 My web application is a web interface for a desktop application called MyApplication.exe. My web application is written in C# (MVC4) that communicates with the MyApplication.exe (written in delphi) via COM-Objects. When 16 clients invoke the web app via the browser, 16 MyApplication.exe instances will be created on the server: My Problem: if client number 17 invokes the web application, I get the following exception in my eventlog: "System Error. Code: 8. Not enough storage is available to