Click here to Skip to main content
15,886,724 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds13-Sep-10 15:33
whiteclouds13-Sep-10 15:33 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6914-Sep-10 8:25
professionalDaveyM6914-Sep-10 8:25 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds14-Sep-10 17:00
whiteclouds14-Sep-10 17:00 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6914-Sep-10 21:41
professionalDaveyM6914-Sep-10 21:41 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds16-Sep-10 23:53
whiteclouds16-Sep-10 23:53 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6918-Sep-10 2:33
professionalDaveyM6918-Sep-10 2:33 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds18-Sep-10 3:33
whiteclouds18-Sep-10 3:33 
QuestionPassing array of c# objects to vbscript [modified] Pin
scootyohansen9-Sep-10 22:03
scootyohansen9-Sep-10 22:03 
Dear all

I've got an issue with a COM interface I'm writing. I have to pass an array of c# objects back to VBScript and when I do I'm getting object required errors.

The com interface works like this

[ComVisible(true)]
public void findPatients(ref object MatchedPatients) {
     // Function here to return a list of patientObjects  
     List<object> mpList = retrievePatientList();

     // Now I assign the list of objects to the value 
     // I'm returning
     int arraySize = mpList.Count;
     MatchedPatients = new object[arraySize];
     MatchedPatients = mpList.ToArray();
}


The patient object is just a list of strings, i.e.
public class patientObject {
        public string Key;
        public string Surname;
        public string Forename;
        ....
}


The COM interface is called by the following VBScript
dim j
o.findPatients j

Dim sOutput
sOutput = ""
For Each oPatient in j
    ' Code fails on the next line
    sOutput = sOutput & oPatient.Surname
    ....
Next


If I step through the VBScript, variable j is getting assigned as an array of variants, the variable oPatient is assigned as an Object, but when I try and access any of the values within oPatient I'm getting an Object required error.

If anyone can offer any guidance it would be most appreciated, I'm tearing my hair out over this one.

UPDATE

I've fixed this issue now, it was surprisingly simple. All I had to do was make my object (PatientObject above) ComVisible and then VBScript could see the properties.
TO make a prairie it takes a clover and one bee,—
One clover, and a bee,
And revery.
The revery alone will do
If bees are few.

Emily Dickinson
modified on Tuesday, September 14, 2010 7:15 AM

QuestionValidating string values Pin
Ramkithepower9-Sep-10 21:54
Ramkithepower9-Sep-10 21:54 
AnswerRe: Validating string values Pin
Kubajzz9-Sep-10 22:07
Kubajzz9-Sep-10 22:07 
GeneralRe: Validating string values Pin
Ramkithepower9-Sep-10 22:26
Ramkithepower9-Sep-10 22:26 
GeneralRe: Validating string values Pin
OriginalGriff10-Sep-10 0:28
mveOriginalGriff10-Sep-10 0:28 
AnswerRe: Validating string values Pin
PIEBALDconsult10-Sep-10 3:46
mvePIEBALDconsult10-Sep-10 3:46 
QuestionNot getting the reason for 'Application.OnThreadException' raised. Pin
srng.net9-Sep-10 21:31
srng.net9-Sep-10 21:31 
AnswerRe: Not getting the reason for 'Application.OnThreadException' raised. Pin
Richard MacCutchan9-Sep-10 22:11
mveRichard MacCutchan9-Sep-10 22:11 
GeneralRe: Not getting the reason for 'Application.OnThreadException' raised. Pin
srng.net10-Sep-10 1:09
srng.net10-Sep-10 1:09 
GeneralRe: Not getting the reason for 'Application.OnThreadException' raised. Pin
Richard MacCutchan10-Sep-10 2:12
mveRichard MacCutchan10-Sep-10 2:12 
GeneralRe: Not getting the reason for 'Application.OnThreadException' raised. Pin
Dave Kreskowiak10-Sep-10 2:13
mveDave Kreskowiak10-Sep-10 2:13 
QuestionCan not create file using FileStream in release mode Pin
ndkit9-Sep-10 17:23
ndkit9-Sep-10 17:23 
AnswerRe: Can not create file using FileStream in release mode Pin
Luc Pattyn9-Sep-10 17:50
sitebuilderLuc Pattyn9-Sep-10 17:50 
GeneralRe: Can not create file using FileStream in release mode Pin
ndkit9-Sep-10 22:04
ndkit9-Sep-10 22:04 
GeneralRe: Can not create file using FileStream in release mode Pin
DaveyM699-Sep-10 22:21
professionalDaveyM699-Sep-10 22:21 
AnswerRe: Can not create file using FileStream in release mode Pin
Luc Pattyn10-Sep-10 1:42
sitebuilderLuc Pattyn10-Sep-10 1:42 
QuestionThrottling web service calls on different threads Pin
Gareth H9-Sep-10 7:33
Gareth H9-Sep-10 7:33 
AnswerRe: Throttling web service calls on different threads Pin
Ian Shlasko9-Sep-10 8:10
Ian Shlasko9-Sep-10 8:10 

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.