Click here to Skip to main content
15,913,941 members
Home / Discussions / COM
   

COM

 
GeneralRe: Ensuring an Excel app quits? Pin
Jörgen Sigvardsson7-Oct-04 22:07
Jörgen Sigvardsson7-Oct-04 22:07 
GeneralRe: Ensuring an Excel app quits? Pin
Michael P Butler8-Oct-04 5:47
Michael P Butler8-Oct-04 5:47 
GeneralRe: Ensuring an Excel app quits? Pin
Jeremy Ouellette8-Oct-04 14:25
Jeremy Ouellette8-Oct-04 14:25 
GeneralPassing structs/classes from any language client. Pin
sergeyv20026-Oct-04 9:46
sergeyv20026-Oct-04 9:46 
GeneralRe: Passing structs/classes from any language client. Pin
Jörgen Sigvardsson7-Oct-04 13:17
Jörgen Sigvardsson7-Oct-04 13:17 
GeneralRe: Passing structs/classes from any language client. Pin
sergeyv20028-Oct-04 8:36
sergeyv20028-Oct-04 8:36 
Generalpassing struct to COM objects Pin
merlinos4-Oct-04 10:21
merlinos4-Oct-04 10:21 
GeneralRe: passing struct to COM objects Pin
Jörgen Sigvardsson4-Oct-04 13:08
Jörgen Sigvardsson4-Oct-04 13:08 
You can define structs in MIDL which you can pass over DCOM. The good way to pass the structs to your API would be to repackage the struct in your COM methods. The ugly way would be to just cast and pass the structs to the API functions. Good method
HRESULT COMClass::Method(Struct* pPassedIn)
{
   APIStruct s;
   s.field = pPassedIn->field;
   APICall(&s);
   return S_OK;
}
The ugly way
HRESULT COMClass::Method(Struct* pPassedIn)
{
   APICall((APIStruct*)pPassedIn);
   return S_OK;
}
For the latter case, just make sure the MIDL-struct members are packed and aligned as the API struct.

--
Wir müssen leben bis wir sterben.
GeneralRe: passing struct to COM objects Pin
sergeyv20027-Oct-04 7:32
sergeyv20027-Oct-04 7:32 
GeneralRe: passing struct to COM objects Pin
Jörgen Sigvardsson7-Oct-04 13:07
Jörgen Sigvardsson7-Oct-04 13:07 
GeneralExcell automation - runtime library error Pin
koxin3-Oct-04 22:14
koxin3-Oct-04 22:14 
GeneralRe: Excell automation - runtime library error Pin
Nathan Holt at EMOM4-Oct-04 6:05
Nathan Holt at EMOM4-Oct-04 6:05 
GeneralMY very own language Pin
shiko2-Oct-04 7:26
shiko2-Oct-04 7:26 
GeneralRe: MY very own language Pin
MohammadAmiry3-Oct-04 3:37
MohammadAmiry3-Oct-04 3:37 
GeneralRe: MY very own language Pin
Jörgen Sigvardsson3-Oct-04 8:05
Jörgen Sigvardsson3-Oct-04 8:05 
GeneralRe: MY very own language Pin
MohammadAmiry8-Oct-04 5:30
MohammadAmiry8-Oct-04 5:30 
QuestionIRegExp problem ? Pin
necroleak1-Oct-04 23:22
sussnecroleak1-Oct-04 23:22 
AnswerRe: IRegExp problem ? Pin
Jörgen Sigvardsson3-Oct-04 8:09
Jörgen Sigvardsson3-Oct-04 8:09 
GeneralAfxOleInit and CoInitializeEx Pin
Shao Voon Wong1-Oct-04 5:51
mvaShao Voon Wong1-Oct-04 5:51 
GeneralRe: AfxOleInit and CoInitializeEx Pin
Jörgen Sigvardsson7-Oct-04 13:22
Jörgen Sigvardsson7-Oct-04 13:22 
GeneralIOleCommandTarget in a .net COM server! HELP! HELP!! Pin
SmallUmka1-Oct-04 1:00
SmallUmka1-Oct-04 1:00 
GeneralDCOM on Windows 2003: error in COM-client Pin
RadioShark30-Sep-04 2:05
RadioShark30-Sep-04 2:05 
GeneralRe: DCOM on Windows 2003: error in COM-client Pin
Milton Karimbekallil4-Oct-04 0:12
Milton Karimbekallil4-Oct-04 0:12 
Question.Net COM alternative?? Pin
Gammill29-Sep-04 11:33
Gammill29-Sep-04 11:33 
AnswerRe: .Net COM alternative?? Pin
ursus zeta29-Sep-04 14:18
ursus zeta29-Sep-04 14:18 

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.