Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: increment Pin
Henry Minute29-Sep-09 1:25
Henry Minute29-Sep-09 1:25 
AnswerRe: increment Pin
Luc Pattyn29-Sep-09 1:42
sitebuilderLuc Pattyn29-Sep-09 1:42 
QuestionLinking 3 tables to 1 form [modified] Pin
Daniel.J.A28-Sep-09 10:53
Daniel.J.A28-Sep-09 10:53 
AnswerRe: Linking 3 tables to 1 form Pin
Henry Minute28-Sep-09 12:03
Henry Minute28-Sep-09 12:03 
GeneralRe: Linking 3 tables to 1 form Pin
Daniel.J.A28-Sep-09 12:14
Daniel.J.A28-Sep-09 12:14 
GeneralRe: Linking 3 tables to 1 form Pin
Henry Minute28-Sep-09 12:25
Henry Minute28-Sep-09 12:25 
Questionhow to mark some rows in datagrid ? Pin
E_Gold28-Sep-09 9:37
E_Gold28-Sep-09 9:37 
AnswerRe: how to mark some rows in datagrid ? Pin
Henry Minute28-Sep-09 10:17
Henry Minute28-Sep-09 10:17 
QuestionDoes anyone know of an recommending tool... Pin
Paw Jershauge28-Sep-09 8:31
Paw Jershauge28-Sep-09 8:31 
AnswerRe: Does anyone know of an recommending tool... Pin
Henry Minute28-Sep-09 9:20
Henry Minute28-Sep-09 9:20 
GeneralRe: Does anyone know of an recommending tool... Pin
Paw Jershauge28-Sep-09 22:01
Paw Jershauge28-Sep-09 22:01 
QuestionMarshaling between managed and unmanaged [modified] Pin
akhanal28-Sep-09 6:47
akhanal28-Sep-09 6:47 
AnswerRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 7:45
sitebuilderLuc Pattyn28-Sep-09 7:45 
GeneralRe: Marshaling between managed and unmanaged Pin
akhanal28-Sep-09 8:28
akhanal28-Sep-09 8:28 
GeneralRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 8:48
sitebuilderLuc Pattyn28-Sep-09 8:48 
GeneralRe: Marshaling between managed and unmanaged Pin
Richard MacCutchan28-Sep-09 9:16
mveRichard MacCutchan28-Sep-09 9:16 
GeneralRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 9:32
sitebuilderLuc Pattyn28-Sep-09 9:32 
GeneralRe: Marshaling between managed and unmanaged [modified] Pin
akhanal28-Sep-09 9:28
akhanal28-Sep-09 9:28 
GeneralRe: Marshaling between managed and unmanaged [modified] Pin
Luc Pattyn28-Sep-09 9:43
sitebuilderLuc Pattyn28-Sep-09 9:43 
GeneralRe: Marshaling between managed and unmanaged [modified] Pin
akhanal28-Sep-09 10:06
akhanal28-Sep-09 10:06 
GeneralRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 10:45
sitebuilderLuc Pattyn28-Sep-09 10:45 
Hi,

1.
myInt.ToString("X8") turns an int into an 8-digit hex string;
and File.AppendAllText(filename,text) appends some text to a new or existing file
(there are faster ways with File.AppendText if lots of texts need appended).

2.
There are two explicit ways to get a pointer (to array or some other object); one is with the fixed keyword, the other with GCHandle, like so:

int dim=1000;
int[] numbers=makeIntArray(dim);
GCHandle handle=GCHandle.Alloc(numbers, GCHandleType.Pinned);
int sum=SumArray(handle.AddrOfPinnedObject(), dim);
handle.Free();

	[DllImport("NativeC.dll")]
	public static extern int SumArray(IntPtr pNumbers, int count);


3.
You do have native code that successfully calls the native lib, you said?
so you can read the calling code and understand exactly how it needs to be called, e.g. who is allocating the array.
If unclear, you could post some of that too.

Smile | :)

Luc Pattyn

Local announcement (Antwerp region): Lange Wapper? Neen!


GeneralRe: Marshaling between managed and unmanaged Pin
akhanal28-Sep-09 11:03
akhanal28-Sep-09 11:03 
GeneralRe: Marshaling between managed and unmanaged Pin
akhanal28-Sep-09 12:01
akhanal28-Sep-09 12:01 
GeneralRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 12:18
sitebuilderLuc Pattyn28-Sep-09 12:18 
GeneralRe: Marshaling between managed and unmanaged Pin
akhanal29-Sep-09 4:04
akhanal29-Sep-09 4:04 

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.