Click here to Skip to main content
15,896,348 members
Home / Discussions / C#
   

C#

 
QuestionThird party frameworks Pin
Tim Holgerson5-Jun-08 10:40
Tim Holgerson5-Jun-08 10:40 
AnswerCross Post - please ignore Pin
Pete O'Hanlon5-Jun-08 11:20
mvePete O'Hanlon5-Jun-08 11:20 
GeneralRe: Cross Post - please ignore Pin
Tim Holgerson5-Jun-08 11:56
Tim Holgerson5-Jun-08 11:56 
AnswerPersonally Pin
Ennis Ray Lynch, Jr.5-Jun-08 11:21
Ennis Ray Lynch, Jr.5-Jun-08 11:21 
AnswerRe: Third party frameworks Pin
DaveyM695-Jun-08 11:28
professionalDaveyM695-Jun-08 11:28 
GeneralNeed a simple code Pin
bolaboy5-Jun-08 9:59
bolaboy5-Jun-08 9:59 
GeneralRe: Need a simple code Pin
Christian Graus5-Jun-08 10:30
protectorChristian Graus5-Jun-08 10:30 
Questionobject manipulation in callback function Pin
your_daddytoo5-Jun-08 9:13
your_daddytoo5-Jun-08 9:13 
I have a program that gets callback from an external program. It sends back a type object[] that is of variable length. I want to take the parts of the object[] and put them into native data types (int). In the callback, I get an object called 'ObjectOfIntegers'. It has a built in method (from the third party application) called 'get'. 'get' returns an object[] that has all the things i ask for. The third party program's 'get' function obviously is the barrier. so it looks something like this:

ObjectOfIntegers.get("Integer1,Integer2")

or it could be

ObjectOfIntegers.get("Integer1,String1")

If I know I am getting integers, I want to be able to put them in native data types and then use them (ie put them in myInteger1, myIntegery2, myString1, etc). so i declare the integers and strings globally and then want their assignment to be done in the callback. i've tried these two ways:

1)
private int[] intArraySize2 = new int[2];
private int myInteger1, myInteger2;

private void someCallbackFunction(ThirdPartyDataType ObjectOfIntegers)
{
Array.Copy(((Array)ObjectOfIntegers.get_Get("Integer1,Integer2")), intArraySize2, 2);

myInteger1= intArraySize2[0];
myInteger2= intArraySize2[1];
}

2)
private Object[] dataObject = null;
private int myInteger1, myInteger2;

private void someCallbackFunction(ThirdPartyDataType ObjectOfIntegers)
{
dataObject = (Object[])ObjectOfIntegers.get_Get("Integer1,Integer2");

myInteger1= (int)dataObject.GetValue(0);
myInteger2= (int)dataObject.GetValue(1);
}


Does anyone know which would be faster? Is there a better way to handle this? Speed is the most important issue to me. If anyone has any ideas of what to do, how to do it faster, or where to go for more information I would REALLY appreciate it. Thanks so much.
QuestionFrom maximized form, create a minimized form. Pin
oscarderooij5-Jun-08 8:30
oscarderooij5-Jun-08 8:30 
AnswerRe: From maximized form, create a minimized form. Pin
Gareth H5-Jun-08 9:21
Gareth H5-Jun-08 9:21 
GeneralRe: From maximized form, create a minimized form. Pin
oscarderooij5-Jun-08 10:01
oscarderooij5-Jun-08 10:01 
GeneralRe: From maximized form, create a minimized form. Pin
DaveyM695-Jun-08 11:17
professionalDaveyM695-Jun-08 11:17 
GeneralRe: From maximized form, create a minimized form. Pin
oscarderooij9-Jun-08 5:01
oscarderooij9-Jun-08 5:01 
GeneralRe: From maximized form, create a minimized form. Pin
DaveyM6911-Jun-08 6:18
professionalDaveyM6911-Jun-08 6:18 
QuestionMasked column in DataGridView Pin
AndrusM5-Jun-08 8:26
AndrusM5-Jun-08 8:26 
QuestionPlayin MMS Streams Pin
User 43030175-Jun-08 8:21
User 43030175-Jun-08 8:21 
AnswerRe: Playin MMS Streams Pin
DaveyM695-Jun-08 11:34
professionalDaveyM695-Jun-08 11:34 
GeneralRe: Playin MMS Streams Pin
User 43030176-Jun-08 3:42
User 43030176-Jun-08 3:42 
QuestionVS 2008 performance Pin
netJP12L5-Jun-08 7:53
netJP12L5-Jun-08 7:53 
AnswerRe: VS 2008 performance Pin
Joe Woodbury5-Jun-08 8:23
professionalJoe Woodbury5-Jun-08 8:23 
AnswerRe: VS 2008 performance Pin
Alan Balkany6-Jun-08 3:53
Alan Balkany6-Jun-08 3:53 
GeneralRe: VS 2008 performance Pin
netJP12L6-Jun-08 5:01
netJP12L6-Jun-08 5:01 
GeneralRe: VS 2008 performance Pin
Alan Balkany6-Jun-08 5:04
Alan Balkany6-Jun-08 5:04 
GeneralRe: VS 2008 performance Pin
Pete O'Hanlon6-Jun-08 8:22
mvePete O'Hanlon6-Jun-08 8:22 
QuestionTransparent form Pin
Saiyed Alam5-Jun-08 7:16
Saiyed Alam5-Jun-08 7:16 

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.