Click here to Skip to main content
15,922,419 members
Home / Discussions / COM
   

COM

 
GeneralRe: midl problems Pin
Jörgen Sigvardsson29-Dec-03 11:49
Jörgen Sigvardsson29-Dec-03 11:49 
GeneralCOM returns an ADO Connection Pin
Hesham Amin27-Dec-03 10:48
Hesham Amin27-Dec-03 10:48 
GeneralSolved Pin
Hesham Amin28-Dec-03 23:46
Hesham Amin28-Dec-03 23:46 
GeneralPassing HWND from a MDI app to a activeX control Pin
Sunil122127-Dec-03 1:39
Sunil122127-Dec-03 1:39 
GeneralRe: Passing HWND from a MDI app to a activeX control Pin
Abhishek Srivastava28-Dec-03 21:34
Abhishek Srivastava28-Dec-03 21:34 
GeneralCOM interface: EnumFormatEtc Pin
Tristan Rhodes23-Dec-03 8:46
Tristan Rhodes23-Dec-03 8:46 
GeneralRe: COM interface: EnumFormatEtc Pin
Stefan Pedersen27-Dec-03 10:59
Stefan Pedersen27-Dec-03 10:59 
GeneralRe: COM interface: EnumFormatEtc Pin
Jörgen Sigvardsson6-Jan-04 6:25
Jörgen Sigvardsson6-Jan-04 6:25 
As Stefan points out, HRESULTS are translated as exceptions in .NET. More specifically, they're translated into System.Runtime.InteropServices.COMException's.

If you look up the IDL definition for EnumFormatEtc it'll look something like this:
HRESULT EnumFormatEtc([in] DWORD dwDirection, [out, retval] IEnumFORMATETC)
All [in] parameters are treated as normal copy by value parameters. [in, out] are treated as ref parameters, and [out] are treated as out parameters in C# lingo. [out, retval] is a special kind of parameter (which must always be the last parameter by the way), which is mapped as the return type in languages which are not "C like".

The .NET framework will call the method something like this (pseudo code):
IEnumFORMATETC* EnumFormatEtc(DWORD dwDirection) {
   IEnumFORMATETC* res = 0;
   HRESULT hr = itf_ptr->EnumFormatEtc(dwDirection, &res);
   if(FAILED(hr)) throw COMException(hr);
   return res;
}


--
You're entertaining at least.
GeneralRegister an exe COM server Pin
User 78226222-Dec-03 22:58
professionalUser 78226222-Dec-03 22:58 
GeneralRe: Register an exe COM server Pin
valikac26-Dec-03 5:39
valikac26-Dec-03 5:39 
Generalextern "C" DllExport Function crashing Pin
Kishor Morkhandikar22-Dec-03 19:56
Kishor Morkhandikar22-Dec-03 19:56 
GeneralRe: extern "C" DllExport Function crashing Pin
Sebastián Benítez23-Dec-03 0:24
Sebastián Benítez23-Dec-03 0:24 
GeneralRe: extern "C" DllExport Function crashing Pin
Lim Bio Liong26-Dec-03 20:17
Lim Bio Liong26-Dec-03 20:17 
GeneralProblems passing a DISPPARAMS structure to IDispatch::Invoke Pin
Dark Magus22-Dec-03 17:39
Dark Magus22-Dec-03 17:39 
GeneralRe: Problems passing a DISPPARAMS structure to IDispatch::Invoke Pin
Vi223-Dec-03 23:36
Vi223-Dec-03 23:36 
GeneralRe: Problems passing a DISPPARAMS structure to IDispatch::Invoke Pin
Dark Magus25-Dec-03 11:34
Dark Magus25-Dec-03 11:34 
GeneralRe: Problems passing a DISPPARAMS structure to IDispatch::Invoke Pin
Vi225-Dec-03 19:21
Vi225-Dec-03 19:21 
GeneralRe: Problems passing a DISPPARAMS structure to IDispatch::Invoke Pin
Dark Magus26-Dec-03 10:03
Dark Magus26-Dec-03 10:03 
Generalabout LocalServer COM Register Pin
yingkou22-Dec-03 15:05
yingkou22-Dec-03 15:05 
GeneralRe: about LocalServer COM Register Pin
User 78226222-Dec-03 23:16
professionalUser 78226222-Dec-03 23:16 
GeneralRe: about LocalServer COM Register Pin
Vi223-Dec-03 23:29
Vi223-Dec-03 23:29 
GeneralCOM Apartments and Marshalling Pin
Jörgen Sigvardsson22-Dec-03 14:03
Jörgen Sigvardsson22-Dec-03 14:03 
GeneralNo, that sucked Pin
Jörgen Sigvardsson23-Dec-03 7:07
Jörgen Sigvardsson23-Dec-03 7:07 
GeneralRe: No, that sucked Pin
geo_m30-Dec-03 0:32
geo_m30-Dec-03 0:32 
GeneralAll COM that expose a specific interface Pin
IreneVassileva22-Dec-03 0:00
IreneVassileva22-Dec-03 0:00 

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.