Click here to Skip to main content
15,894,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: Panel's MouseUp event firing on Form resize Pin
leppie29-May-08 23:57
leppie29-May-08 23:57 
GeneralRe: Panel's MouseUp event firing on Form resize Pin
dan!sh 29-May-08 23:16
professional dan!sh 29-May-08 23:16 
QuestionC# how to tell if a file is text Pin
w.hooper29-May-08 21:00
w.hooper29-May-08 21:00 
GeneralRe: C# how to tell if a file is text Pin
Krazy Programmer29-May-08 21:08
Krazy Programmer29-May-08 21:08 
AnswerRe: C# how to tell if a file is text Pin
leppie29-May-08 22:03
leppie29-May-08 22:03 
AnswerRe: C# how to tell if a file is text Pin
buchstaben29-May-08 22:32
buchstaben29-May-08 22:32 
GeneralRe: C# how to tell if a file is text Pin
darkelv30-May-08 2:10
darkelv30-May-08 2:10 
QuestionThe address of pointer that pass to COM object is not right (only in x64) Pin
RYU^^29-May-08 16:49
RYU^^29-May-08 16:49 
Hi,

I have a COM object that accept an array of integer.
HRESULT __stdcall CTestCOM::setValues(int* arr, int arrSize)
{
    for(int i=0; i<arrSize; i++)
    {
        MyDebugTextOut("C:\\Temp\\TestCOM.txt", "arr[%d] = %d\n", i, arr[i]);
    }
}


In my C# code:
int[] arrTest = new int[5];
for(int i=0; i<5; i++)
{
    arrTest[i] = i;
}
TestCOM testCom = new TestCOM();
testCOM.setValues(ref arrTest[0]);


The result of my text out in x86 is correct:
arr[0] = 0
arr[1] = 1
arr[2] = 2
arr[3] = 3
arr[4] = 4
arr[5] = 5


But in my x64, it is wrong:
arr[0] = 0
arr[1] = -321451
arr[2] = -14537642
arr[3] = 0
arr[4] = 0
arr[5] = 0


I've checked the address of the array, in x86, it pass a same address from C# to COM object. But in x64, address of the array in the COM object is different from C# array.

Any idea why? If yes, is it possible to fix it?

Thanks Smile | :)
AnswerRe: The address of pointer that pass to COM object is not right (only in x64) Pin
leppie29-May-08 22:17
leppie29-May-08 22:17 
GeneralRe: The address of pointer that pass to COM object is not right (only in x64) Pin
RYU^^6-Jun-08 0:13
RYU^^6-Jun-08 0:13 
QuestionImplementing Word's spell check in C# app Pin
Alex MacDonald29-May-08 11:59
Alex MacDonald29-May-08 11:59 
AnswerRe: Implementing Word's spell check in C# app Pin
Judah Gabriel Himango29-May-08 13:05
sponsorJudah Gabriel Himango29-May-08 13:05 
AnswerRe: Implementing Word's spell check in C# app Pin
Vasudevan Deepak Kumar29-May-08 18:20
Vasudevan Deepak Kumar29-May-08 18:20 
AnswerRe: Implementing Word's spell check in C# app Pin
buchstaben29-May-08 22:37
buchstaben29-May-08 22:37 
QuestionHow to rename my Solution Name (Vs2005) ? Pin
hdv21229-May-08 11:19
hdv21229-May-08 11:19 
AnswerRe: How to rename my Solution Name (Vs2005) ? Pin
Judah Gabriel Himango29-May-08 12:38
sponsorJudah Gabriel Himango29-May-08 12:38 
QuestionAdding data to a new worksheet in an existing workbook c# Pin
compninja2529-May-08 10:47
compninja2529-May-08 10:47 
AnswerRe: Adding data to a new worksheet in an existing workbook c# Pin
Judah Gabriel Himango29-May-08 12:37
sponsorJudah Gabriel Himango29-May-08 12:37 
GeneralRe: Adding data to a new worksheet in an existing workbook c# Pin
compninja2530-May-08 1:59
compninja2530-May-08 1:59 
GeneralRe: Adding data to a new worksheet in an existing workbook c# Pin
Robert Ernst28-Aug-08 11:34
Robert Ernst28-Aug-08 11:34 
QuestionWPF and C# Help Pin
Tyler Lovejoy29-May-08 10:20
Tyler Lovejoy29-May-08 10:20 
AnswerRe: WPF and C# Help Pin
Judah Gabriel Himango29-May-08 12:34
sponsorJudah Gabriel Himango29-May-08 12:34 
GeneralRe: WPF and C# Help Pin
Tyler Lovejoy30-May-08 2:53
Tyler Lovejoy30-May-08 2:53 
AnswerRe: WPF and C# Help Pin
Bert delaVega30-May-08 5:50
Bert delaVega30-May-08 5:50 
AnswerRe: WPF and C# Help Pin
Tyler Lovejoy2-Jun-08 6:25
Tyler Lovejoy2-Jun-08 6:25 

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.