Click here to Skip to main content
15,912,400 members
Home / Discussions / C#
   

C#

 
AnswerRe: Populating a Datalist only when if Statement is True Pin
CWIZO16-Mar-06 2:11
CWIZO16-Mar-06 2:11 
GeneralRe: Populating a Datalist only when if Statement is True Pin
Brendan Vogt16-Mar-06 2:36
Brendan Vogt16-Mar-06 2:36 
GeneralRe: Populating a Datalist only when if Statement is True Pin
CWIZO16-Mar-06 2:42
CWIZO16-Mar-06 2:42 
Questionusb drivers Pin
JacquesDP16-Mar-06 0:49
JacquesDP16-Mar-06 0:49 
AnswerRe: usb drivers Pin
roboter@begemotik.ee16-Mar-06 3:12
roboter@begemotik.ee16-Mar-06 3:12 
QuestionWeb Method order Pin
si_6916-Mar-06 0:42
si_6916-Mar-06 0:42 
AnswerRe: Web Method order Pin
CWIZO16-Mar-06 2:12
CWIZO16-Mar-06 2:12 
QuestionPassing an array of ints to an unmanaged function (as an int pointer) Pin
paul_ainsworth16-Mar-06 0:34
paul_ainsworth16-Mar-06 0:34 
I'm using a proprietary DLL written in C, which has a function that takes an array of ints (int pointer) as a parameter and writes data to the array. I've been trying to call the function in C# using Interop/DllImport, but no matter what I try, I can't get it to work.

My DllImport is (currently) as follows:

[DllImport("chli.dll")]
internal static unsafe extern void cfmsrng(ref int status, int object_frequency, ref int object_startyear, ref int object_startperiod, ref int object_endyear, ref int object_endperiod, int *date_range, ref int observations);


"date_range" is the parameter that I'm having trouble passing. All of the others work fine using "ref" (I have other similar extern functions that do work).

I've tried various combinations of using int[], int* (with unsafe declarations), IntPtr and [In, Out], but to no avail. I just recently discovered the "fixed" keyword and after reading on that, I tried using it, but still had no luck.

Could anyone please tell me what I need to do to make this work? Any guidance would be much appreciated.

Thanks.

-- modified at 6:41 Thursday 16th March, 2006
AnswerRe: Passing an array of ints to an unmanaged function (as an int pointer) Pin
Divyang Mithaiwala16-Mar-06 3:27
Divyang Mithaiwala16-Mar-06 3:27 
QuestionSerializing object problem Pin
hpetriffer16-Mar-06 0:24
hpetriffer16-Mar-06 0:24 
AnswerRe: Serializing object problem Pin
Nicholas Butler16-Mar-06 5:26
sitebuilderNicholas Butler16-Mar-06 5:26 
GeneralRe: Serializing object problem Pin
hpetriffer16-Mar-06 18:58
hpetriffer16-Mar-06 18:58 
Questionplease help me... Pin
Ruzimi15-Mar-06 23:49
Ruzimi15-Mar-06 23:49 
AnswerRe: please help me... Pin
J4amieC15-Mar-06 23:52
J4amieC15-Mar-06 23:52 
AnswerRe: please help me... Pin
akyriako7816-Mar-06 0:15
akyriako7816-Mar-06 0:15 
AnswerRe: please help me... Pin
hpetriffer16-Mar-06 0:27
hpetriffer16-Mar-06 0:27 
AnswerRe: please help me... Pin
fregolo5216-Mar-06 0:29
fregolo5216-Mar-06 0:29 
GeneralRe: please help me... Pin
akyriako7816-Mar-06 1:27
akyriako7816-Mar-06 1:27 
GeneralRe: please help me... Pin
albCode16-Mar-06 1:34
albCode16-Mar-06 1:34 
GeneralRe: please help me... Pin
J4amieC16-Mar-06 2:59
J4amieC16-Mar-06 2:59 
GeneralRe: please help me... Pin
akyriako7816-Mar-06 5:59
akyriako7816-Mar-06 5:59 
QuestionVS2005 - vshost threads Pin
V.15-Mar-06 23:48
professionalV.15-Mar-06 23:48 
Questionwindows service c# Pin
fady_sayegh15-Mar-06 23:46
fady_sayegh15-Mar-06 23:46 
QuestionListview and SetScrollPos function Pin
fregolo5215-Mar-06 23:33
fregolo5215-Mar-06 23:33 
QuestionmbabuCustom Controls Pin
mattiram15-Mar-06 23:29
mattiram15-Mar-06 23:29 

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.