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

COM

 
QuestionActivex Messages don´t work at runtime Pin
fpmatta7721-Jan-09 3:49
fpmatta7721-Jan-09 3:49 
AnswerRe: Activex Messages don´t work at runtime Pin
guestcat29-Jan-09 5:45
guestcat29-Jan-09 5:45 
GeneralRe: Activex Messages don´t work at runtime Pin
fpmatta7730-Jan-09 1:46
fpmatta7730-Jan-09 1:46 
QuestionIStream::Write() returns success code S_OK but still doesn't write anything... Pin
ShyamR21-Jan-09 2:25
ShyamR21-Jan-09 2:25 
AnswerRe: IStream::Write() returns success code S_OK but still doesn't write anything... Pin
Jonathan Davies21-Jan-09 3:24
Jonathan Davies21-Jan-09 3:24 
QuestionCOM event handlers stub in C++ Pin
Panduranga Chary20-Jan-09 0:39
Panduranga Chary20-Jan-09 0:39 
AnswerRe: COM event handlers stub in C++ Pin
KarstenK20-Jan-09 0:51
mveKarstenK20-Jan-09 0:51 
QuestionHow To pass structure or complex data in IDispatch using invoke() method [modified] Pin
Thomas_Mathews19-Jan-09 19:32
Thomas_Mathews19-Jan-09 19:32 
How To pass structure or complex data in IDispatch using invoke() method.
The COM server component is third party's so I donot have control on what defined in IDL or whatever technology they used. for example I want to pass complex data or structure like below to invoke() method.

struct tag{
int i[10];
char str[40];
}sample;

Below is sample code to access method passing argument.


// Code omitted for brevity.

szMember = “On”;
dispparams.rgvarg[0].vt = VT_BOOL;
dispparams.rgvarg[0].bool = FALSE;
dispparams.rgdispidNamedArgs = &mydispid;
dispparams.cArgs = 1;
dispparams.cNamedArgs = 1;
hresult = GetIDsOfNames(IID_NULL, &szMember, 1,
LOCALE_USER_DEFAULT, &dispid);

hresult = pdisp->Invoke(
dispid,
IID_NULL,
LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYPUT,
&dispparams, NULL, NULL, NULL);




I need to pass one argument in IDispatch's Invoke method as below . This is sample code from c# client. I already have client C# code working. I want to pass structure which has byte array and string etc in c++ using IDispatch. How usually people pass structure as single argument in IDispatch's Invoke method()

public class BLOB {

/// <remarks/>
public string contentType;

public System.Byte[] binaryData;

public string ID;

public string URL;
}

OR
If above is complex is anyone know how to pass structure like below in IDispatch's Invoke() method. The COM Server is third party.

struct tag{
char str[100];
void *p;
char str1[300];
}

modified on Tuesday, January 20, 2009 2:23 AM

AnswerRe: How To pass structure or complex data in IDispatch using invoke() method Pin
Jonathan Davies29-Jan-09 0:07
Jonathan Davies29-Jan-09 0:07 
AnswerRe: How To pass structure or complex data in IDispatch using invoke() method Pin
guestcat29-Jan-09 5:31
guestcat29-Jan-09 5:31 
QuestionAccess a .Net COM object hosted in a COM+ Server in .Net? Pin
huckfinn18-Jan-09 22:50
huckfinn18-Jan-09 22:50 
QuestionCustom Tool Setup Projects? Pin
GibbleCH15-Jan-09 9:06
GibbleCH15-Jan-09 9:06 
QuestionMFC ActiveX Control derived from Static Control Pin
Member 319657814-Jan-09 23:00
Member 319657814-Jan-09 23:00 
AnswerRe: MFC ActiveX Control derived from Static Control Pin
KarstenK14-Jan-09 23:10
mveKarstenK14-Jan-09 23:10 
GeneralRe: MFC ActiveX Control derived from Static Control Pin
Member 319657814-Jan-09 23:29
Member 319657814-Jan-09 23:29 
AnswerRe: MFC ActiveX Control derived from Static Control Pin
«_Superman_»15-Jan-09 18:38
professional«_Superman_»15-Jan-09 18:38 
QuestionPowerPoint Event system is behaving strangely. Pin
TClarke12-Jan-09 1:24
TClarke12-Jan-09 1:24 
QuestionHow to share the SSL conncetion made by myself in IE Pin
maoxintt9-Jan-09 15:30
maoxintt9-Jan-09 15:30 
AnswerRe: How to share the SSL conncetion made by myself in IE Pin
Garth J Lancaster9-Jan-09 16:59
professionalGarth J Lancaster9-Jan-09 16:59 
GeneralRe: How to share the SSL conncetion made by myself in IE Pin
maoxintt9-Jan-09 18:38
maoxintt9-Jan-09 18:38 
GeneralRe: How to share the SSL conncetion made by myself in IE Pin
Garth J Lancaster9-Jan-09 20:50
professionalGarth J Lancaster9-Jan-09 20:50 
GeneralRe: How to share the SSL conncetion made by myself in IE Pin
maoxintt9-Jan-09 22:27
maoxintt9-Jan-09 22:27 
QuestionExcel automation highlight issue Pin
TClarke8-Jan-09 23:55
TClarke8-Jan-09 23:55 
AnswerRe: Excel automation highlight issue Pin
Garth J Lancaster9-Jan-09 0:34
professionalGarth J Lancaster9-Jan-09 0:34 
GeneralRe: Excel automation highlight issue Pin
TClarke9-Jan-09 1:31
TClarke9-Jan-09 1:31 

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.