Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds10-Sep-10 0:09
whiteclouds10-Sep-10 0:09 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 0:20
professionalDaveyM6910-Sep-10 0:20 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 1:26
sitebuilderLuc Pattyn10-Sep-10 1:26 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 1:41
professionalDaveyM6910-Sep-10 1:41 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 1:59
sitebuilderLuc Pattyn10-Sep-10 1:59 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 2:09
professionalDaveyM6910-Sep-10 2:09 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 2:17
sitebuilderLuc Pattyn10-Sep-10 2:17 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 2:19
professionalDaveyM6910-Sep-10 2:19 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 0:28
professionalDaveyM6910-Sep-10 0:28 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds10-Sep-10 0:33
whiteclouds10-Sep-10 0:33 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6911-Sep-10 22:25
professionalDaveyM6911-Sep-10 22:25 
GeneralRe: How to call the function in cellcore.dll? [modified] Pin
whiteclouds12-Sep-10 17:45
whiteclouds12-Sep-10 17:45 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6913-Sep-10 12:52
professionalDaveyM6913-Sep-10 12:52 
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 

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.