Click here to Skip to main content
15,914,642 members
Home / Discussions / COM
   

COM

 
GeneralRe: LPSTR and LPBYTE passing to a dll Pin
JonEngle6-Dec-05 9:12
JonEngle6-Dec-05 9:12 
GeneralRe: LPSTR and LPBYTE passing to a dll Pin
Paul_5916-Dec-05 9:50
Paul_5916-Dec-05 9:50 
GeneralRe: LPSTR and LPBYTE passing to a dll Pin
JonEngle6-Dec-05 10:27
JonEngle6-Dec-05 10:27 
QuestionDLLHost.exe Terminates on Windows Server 2003 Pin
Gupta Suraj5-Dec-05 19:15
Gupta Suraj5-Dec-05 19:15 
QuestionHow "DCOM server process launcher" works? Pin
Chintoo7235-Dec-05 17:30
Chintoo7235-Dec-05 17:30 
AnswerRe: How "DCOM server process launcher" works? Pin
Chintoo7235-Dec-05 17:44
Chintoo7235-Dec-05 17:44 
QuestionOut-of-process COM in C# Pin
london_ste2-Dec-05 4:57
london_ste2-Dec-05 4:57 
AnswerRe: Out-of-process COM in C# Pin
Lim Bio Liong5-Dec-05 13:13
Lim Bio Liong5-Dec-05 13:13 
Hello london_ste,

I've been researching into this a few months back. Basically, you would need to create a .NET factory class (contained inside a DLL Assembly) that exposes methods that internally instantiate .NET classes from .NET Exe Assemblies. Let's call this the "factory" assembly.

This factory assembly will be wrapped up in a COM-callable wrapper via tlbimp.exe and Regasm.exe. It is your gateway to the creation of .NET classes housed inside .NET Exe Assemblies.

.NET Activation/Refletion or Remoting are techniques that can be used to create an instance of a .NET class housed inside a .NET EXE assembly.

The special thing about Remoting is that is can be used to instantiate a class from a running EXE application whereas Activation/Refletion loads an Assembly (DLL or Exe) and instantiates a class from the loaded Assembly module.

An example of a creation method can be fashioned as follows :

public object CreateInstance_ByActivation(string strAssemblyName, string strTypeName);

An unmanaged client (written in C++, say) can call this method as follows :

VARIANT varRet;
...
...
...
IFactory -> CreateInstance_ByActivation
(
bstrAssemblyName,
bstrTypeName,
&varRet
);

the object will be returned via the VARIANT "varRet". "varRet" will contain either an IUnknown pointer or an IDispatch pointer.

I'm planning to write an article on this in the future, watch out for it Smile | :)

Best Regards,
Bio.





GeneralRe: Out-of-process COM in C# Pin
london_ste8-Dec-05 6:17
london_ste8-Dec-05 6:17 
GeneralRe: Out-of-process COM in C# Pin
Lim Bio Liong8-Dec-05 16:03
Lim Bio Liong8-Dec-05 16:03 
Questionwhy to put extern C before const IID? Pin
Lane Yu1-Dec-05 23:32
Lane Yu1-Dec-05 23:32 
AnswerRe: why to put extern C before const IID? Pin
Marco M.6-Dec-05 8:33
Marco M.6-Dec-05 8:33 
Questionis it possible to Call web-service from COM component? Pin
Amol Ravatale29-Nov-05 18:34
Amol Ravatale29-Nov-05 18:34 
AnswerRe: is it possible to Call web-service from COM component? Pin
Lim Bio Liong29-Nov-05 19:06
Lim Bio Liong29-Nov-05 19:06 
GeneralServiced Component, Excel and OleDbConnection.Open Pin
Turtle Hand28-Nov-05 9:45
Turtle Hand28-Nov-05 9:45 
GeneralRe: Serviced Component, Excel and OleDbConnection.Open Pin
Turtle Hand1-Dec-05 4:14
Turtle Hand1-Dec-05 4:14 
QuestionEvent sink in MFC-program - Thread problem? Pin
-Tom-26-Nov-05 4:25
-Tom-26-Nov-05 4:25 
AnswerRe: Event sink in MFC-program - Thread problem? Pin
Roger Stoltz5-Dec-05 5:27
Roger Stoltz5-Dec-05 5:27 
QuestionPorting Win32/COM to Linux Pin
Jnewg526-Nov-05 1:24
Jnewg526-Nov-05 1:24 
AnswerRe: Porting Win32/COM to Linux Pin
Jörgen Sigvardsson26-Nov-05 12:55
Jörgen Sigvardsson26-Nov-05 12:55 
QuestionGetUIObjectOf for objects on different drives Pin
yarp25-Nov-05 2:35
yarp25-Nov-05 2:35 
QuestionWord automation problem with C++ Pin
panzerdivisionmarkus24-Nov-05 1:47
panzerdivisionmarkus24-Nov-05 1:47 
AnswerRe: Word automation problem with C++ Pin
JonEngle6-Dec-05 18:55
JonEngle6-Dec-05 18:55 
QuestionHow to pass a object of a .NET user defined type to a COM in VC++? Pin
Diana Fernandez23-Nov-05 18:09
Diana Fernandez23-Nov-05 18:09 
AnswerRe: How to pass a object of a .NET user defined type to a COM in VC++? Pin
Gizzo24-Nov-05 6:11
Gizzo24-Nov-05 6:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.