Click here to Skip to main content
15,887,361 members
Home / Discussions / COM
   

COM

 
QuestionAsserting in afxwin1.inl Line: 29 Pin
vibindia24-Mar-09 20:57
vibindia24-Mar-09 20:57 
AnswerAlmost impossible to tell Pin
Baltoro29-Mar-09 10:55
Baltoro29-Mar-09 10:55 
QuestionCustomize context menu of Outlook Express Pin
Crazy Kiya re24-Mar-09 18:05
Crazy Kiya re24-Mar-09 18:05 
QuestionProblem calling C++ DLL from Excel Pin
gvanto24-Mar-09 16:10
gvanto24-Mar-09 16:10 
QuestionError Pin
boy_16097824-Mar-09 7:54
boy_16097824-Mar-09 7:54 
AnswerWrong Forum Pin
Baltoro29-Mar-09 10:36
Baltoro29-Mar-09 10:36 
QuestionAccess method of COM components through ASP gives error Pin
Member 259548824-Mar-09 2:04
Member 259548824-Mar-09 2:04 
QuestionHow should I declare jagged arrays to expose them to VB6/VBScript?? Pin
Martha Jamer23-Mar-09 13:02
Martha Jamer23-Mar-09 13:02 
I have a C# class which contains a jagged array as one of its properties exposed to COM:

string[][] Measurements

The property vcan easily be read/set by .Net applications but I was asked to expose it to COM applications (namely VB6 and VBScript). I was able to expose all the properties to COM except this jagged array because there's no marshalling support for jagged arrays. So, I've tried to change it from string[][] to string[,] Measurements, but now I can see this property in VB6 and when I call it I can't get the data populated in a VB array. LBound and UBound give the correct array size but this code give wrong type error:

For r = LBound(objClass.Measurements, 1) To UBound(objClass.Measurements, 1)

For f = LBound(objClass.Measurements, 2) To UBound(objClass.Measurements, 2)

sMeasurements = sMeasurements & objClass.Measurements[r, f])
Next
Next

And this code returns the data scrambled: the values in objClass.Measurements(0,0) then objCard.Measurements(1,0) then (0,1) then (1,1) etc. instead of (0,0) then (0,1) then (0,2) then (0,3) etc.:

For Each sReading In objClass.Measurements
Debug.Print sReading
Next

Any idea how I should declare the jagged array in the C# module and how I should call it from VB6 or VBScript?

Thanks,

Martha

AnswerRe: How should I declare jagged arrays to expose them to VB6/VBScript?? [modified] Pin
Vi224-Mar-09 23:16
Vi224-Mar-09 23:16 
QuestionOffice12 COM addin question Pin
MumbleB20-Mar-09 6:55
MumbleB20-Mar-09 6:55 
AnswerRe: Office12 COM addin question Pin
Baltoro21-Mar-09 8:19
Baltoro21-Mar-09 8:19 
GeneralRe: Office12 COM addin question Pin
MumbleB24-Mar-09 2:32
MumbleB24-Mar-09 2:32 
GeneralRe: Office12 COM addin question Pin
Baltoro27-Mar-09 6:03
Baltoro27-Mar-09 6:03 
Questionproblem in implementing security on contact smartcard in VC++6 Pin
aditi kauts20-Mar-09 0:23
aditi kauts20-Mar-09 0:23 
AnswerRe: problem in implementing security on contact smartcard in VC++6 Pin
ray_rash2-Jul-09 23:37
ray_rash2-Jul-09 23:37 
Questionbutton image in activex Pin
aysl18-Mar-09 9:41
aysl18-Mar-09 9:41 
AnswerRe: button image in activex Pin
Jonathan Davies19-Mar-09 1:23
Jonathan Davies19-Mar-09 1:23 
GeneralRe: button image in activex Pin
aysl19-Mar-09 2:46
aysl19-Mar-09 2:46 
GeneralRe: button image in activex Pin
Jonathan Davies19-Mar-09 3:08
Jonathan Davies19-Mar-09 3:08 
GeneralRe: button image in activex Pin
aysl19-Mar-09 3:27
aysl19-Mar-09 3:27 
GeneralRe: button image in activex Pin
Jonathan Davies19-Mar-09 4:13
Jonathan Davies19-Mar-09 4:13 
GeneralRe: button image in activex Pin
aysl19-Mar-09 4:50
aysl19-Mar-09 4:50 
QuestionCOM and deriveing Pin
orafal17-Mar-09 22:23
orafal17-Mar-09 22:23 
AnswerRe: COM and deriveing Pin
kcynic17-Mar-09 23:55
kcynic17-Mar-09 23:55 
AnswerRe: COM and deriveing Pin
«_Superman_»18-Mar-09 22:56
professional«_Superman_»18-Mar-09 22:56 

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.