typelib

Indirect Typelib not imported well from Debug dll

Using VC2005, I have 3 projects to build: libA (contains a typelib, results in libA.dll): IDL has a line library libA { ... libB (contains a typelib importing libA, results in libB.dll): IDL has a line importlib( "libA " ); libC (imports libB): one of the source files contains #import <libB.dll> the #import <libB.dll> is handled by...

Testing Delphi DLL crashes VB6 IDE

I've had my first go at writing a DLL in Delphi. So far so good. By using a typelib I've been able to pass Widestrings to and from the DLL without difficulty. What's curious at the moment is that I'm using VB6 as the testbed, and every time I run a test within the IDE, the program runs and then the IDE process suddenly disappears from m...

Which is "better": COM DLL or Standard DLL with a Typelib?

I put "better" in quotes because it's a qualitative question. I've been writing COM DLLs for a couple of years now and have only recently come upon, and successfully used, the standard DLL with Typelib concept. Are there any compelling reasons to use COM DLLs instead of DLL+Typelib? Granted, you can't do DCOM with a DLL+Typelib, but is...

How do I create a variant array of BSTR in Euphoria using EuCOM?

So far I've figured out how to pass Unicode strings, bSTRs, to and from a Euphoria DLL using a Typelib. What I can't figure out, thus far, is how to create and pass back an array of BSTRs. The code I have thus far (along with includes for EuCOM itself and parts of Win32lib): global function REALARR() sequence seq atom psa atom va...

When To Change a GUID on a Type Library

I know that when you add/change/remove methods in a COM interface you're supposed to change the interface/coclass GUID but what about type libraries. When should you change the type library's GUID? Do you change it if a GUID inside the type library has changed? Or should you only change it when something that doesn't have its own GUID w...

Replicating Visual Studio COM registration with a WiX Installer

Once upon a time, a young, naive engineer thought it would be a good idea to separate out some of the functionality for his app into a COM component, written in C#. Visual studio had all the tools to do that, right? .NET was practically made for this, right? HA! He said, this will be easy. I'll have decent separation of components, ...

Typelib Generation and Installation with WiX

After asking about what Visual Studio does to register a COM Library, it became clear that VS did two things for COM registration: Registered the COM Library Creates and registers a Type Library Visual Studio seems to do this registration using regasm.exe. For the first part (the direct COM registration) using tallow or heat (WiX 2...

COM typelib doubt

A type library declares the classes, interfaces, constants, and procedures that are exposed by an application or dynamic-link library (DLL). A type library is usually a resource in a program file; it can also be a stand-alone binary file with the extension .tlb or .olb. So is it possible that some DLL still expose interfaces without bei...

Names in the interop assembly have wrong capitalization

I have a VC++ COM component with a type library. The type library of this component declares an interface and a co-class: [ object, uuid( ActualUuidHere), dual, nonextensible, oleautomation, hidden, helpstring( ActualHelpStringHere ) ] interface IWorkflow : IDispatch { //irrelevant properties here } ...

Overloads in COM interop (CCW) - IDispatch names include suffix (_2, _3, etc)

I have a managed assembly containing a few classes, and those classes have overloaded methods. I expose the assembly to COM/IDispatch callers via [ComVisible(true)] ..and also setting the proper Guid, on the assembly itself. I do not define an explicit interface for the COM interop. It's all done dynamically. I run regasm.exe /codeb...

Is it possible to add additional GUIDs to a typelib?

I have a typelib that describes some interfaces. As some of these interfaces are used as a category, I want to add the category IDs to the typelib. So the question is: a) how can this be done in Delphi (2007 and up)? or as an alternative b) is it possible and advisable to use the interface GUID for the CATID? ...

invoke IMUCTalkAPI and IMUCTalkPlugin of Google Talk 1.0.0.104 TypeLib

I see GoogleTalk.exe (1.0.0.104) has some undocumented TypeLib interface Dispatch IMUCTalkPlugin; // IMUCTalkPlugin Interface GUID={4C9DC108-C73F-11DA-95AB-00E08161165F}; function QueryInterface(riid:^GUID; out ppvObj:^^void); function AddRef: UI4; function Release: UI4; function OnNewContact(chatroom_contact:^IChatRoomContact);...

Why is my code slower using #import "progid:typelib" than using "MFC Class From TypeLib"?

I am writing an automation client in Visual C++ with MFC. If I right-click on my solution » Add » Class, I have the option to select MFC Class From TypeLib. Selecting this option generates source/header files for all interfaces. This allows me to write code such as: #include "CApplication.h" #include "CDocument.h" // ... connect to ...

Unmanaged C++ tlh file not updating?

I have an IDL file with some interfaces in it. [ object, uuid(newguid), dual, helpstring("NewInterface Interface"), pointer_default(unique) ] interface INewInterface: IOldInterface { [id(newid), helpstring("method NewMethod")] HRESULT NewMethod([in] BSTR bstrParam ); } But when I compile my code it does not see my ne...

Converting a stand-alone Delphi-made .tlb file to .ridl

How does one convert a stand-alone .tlb file created in a pre-2009 version of Delphi to a .ridl file using Delphi 2010? .tlb files that are part of projects get automatically converted, but this particular file is not part of any project. ...

How do you find a COM's interfaces without typelib?

Is it possible to find all interfaces (classes, parameters, ect..) normally registered with Component Object Model's (COM) TypeLib even though the TypeLib is completely empty? If so how would you go about doing this? I believe another term for this is an "Anonymous COM". I am sure that accessible interfaces exist for this COM because i ...

Register applications via Registry table rather than TLBs

We register the capabilities of Delphi applications using TLB files. However, from reading MSDN documentation, "Installation package authors are strongly advised against using the TypeLib table. Instead, they should register type libraries by using the Registry table". Does anyone have any advice on how to do this in a 'Delphi' way for W...

RegisterTypeLibForUser call doesn't seem to work - any ideas ?

This is really a follow on question to a previous one, where I need to register applications, TLBs and OCXs per user, rather than into HKLM. I have written the following code - based on answers here and elsewhere, BUT the TLB is not registered - no error is thrown, just nothing happens (this code snippet comes from the Embarcadero websit...

Creating compound applications in Windows 7

I need to port a suite of Windows applications (running under XP with little security turned on) to Windows 7 with various levels of security, depending on how our clients may configure it. Each functional area is a seperate executable or DLL that is downloaded and registered by a central 'compound' application. This means that the diffe...

How to get calling convension of a function from type library?

Hello, how can I get calling convention at run time using type library ? whether stdcall,cdecl or winapi or any other? Regards Usman ...