Click here to Skip to main content
15,908,901 members
Home / Discussions / C#
   

C#

 
AnswerRe: Interfaces & Objects Pin
Colin Angus Mackay12-Dec-05 11:15
Colin Angus Mackay12-Dec-05 11:15 
QuestionImplementing cut, copy, paste, undo, select all Pin
monrobot1312-Dec-05 9:01
monrobot1312-Dec-05 9:01 
AnswerRe: Implementing cut, copy, paste, undo, select all Pin
Polis Pilavas12-Dec-05 11:26
Polis Pilavas12-Dec-05 11:26 
Questionpassing parameters to a DLL function receiving pointer Pin
devinzhang12-Dec-05 8:27
devinzhang12-Dec-05 8:27 
AnswerRe: passing parameters to a DLL function receiving pointer Pin
Colin Angus Mackay12-Dec-05 9:33
Colin Angus Mackay12-Dec-05 9:33 
AnswerRe: passing parameters to a DLL function receiving pointer Pin
Colin Angus Mackay12-Dec-05 9:35
Colin Angus Mackay12-Dec-05 9:35 
GeneralRe: passing parameters to a DLL function receiving pointer Pin
devinzhang12-Dec-05 9:58
devinzhang12-Dec-05 9:58 
AnswerRe: passing parameters to a DLL function receiving pointer Pin
Jared Parsons12-Dec-05 11:40
Jared Parsons12-Dec-05 11:40 
Assuming for an example that your dll is called Foo.Dll. You would need C# code like the following

<br />
public class SomeClass<br />
{<br />
[DllImport("Foo.Dll")]<br />
public static extern int OtherFunction(ref int j);<br />
<br />
public int SomeFunction(ref int i)<br />
{<br />
  int iother = OtherFunction(ref i);<br />
}<br />


Adding the "ref" keyword is like having int& in C++. When you're calling into native code though it's like it was a *.

Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/

-- modified at 17:40 Monday 12th December, 2005
GeneralRe: passing parameters to a DLL function receiving pointer Pin
devinzhang12-Dec-05 12:08
devinzhang12-Dec-05 12:08 
QuestionSigning CodeDom assemblies Pin
cbadal12-Dec-05 8:00
cbadal12-Dec-05 8:00 
AnswerRe: Signing CodeDom assemblies Pin
cbadal14-Dec-05 7:08
cbadal14-Dec-05 7:08 
QuestionDatagrid ghost selection Pin
Glenn E. Lanier II12-Dec-05 6:29
Glenn E. Lanier II12-Dec-05 6:29 
QuestionUDP port not receiving any data Pin
MullahOmer12-Dec-05 6:14
MullahOmer12-Dec-05 6:14 
AnswerRe: UDP port not receiving any data Pin
mcljava12-Dec-05 7:44
mcljava12-Dec-05 7:44 
QuestionThoughtpost P2P Pin
ShimiG12-Dec-05 6:07
ShimiG12-Dec-05 6:07 
AnswerRe: Thoughtpost P2P Pin
Dave Kreskowiak12-Dec-05 6:29
mveDave Kreskowiak12-Dec-05 6:29 
GeneralRe: Thoughtpost P2P Pin
ShimiG12-Dec-05 6:40
ShimiG12-Dec-05 6:40 
GeneralRe: Thoughtpost P2P Pin
Dave Kreskowiak12-Dec-05 10:07
mveDave Kreskowiak12-Dec-05 10:07 
QuestionAn existing connection was forcibly closed by the remote host Pin
Ricardo Mendes12-Dec-05 6:03
Ricardo Mendes12-Dec-05 6:03 
AnswerRe: An existing connection was forcibly closed by the remote host Pin
Jared Parsons12-Dec-05 6:13
Jared Parsons12-Dec-05 6:13 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Ricardo Mendes12-Dec-05 6:16
Ricardo Mendes12-Dec-05 6:16 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Jared Parsons12-Dec-05 8:45
Jared Parsons12-Dec-05 8:45 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Ricardo Mendes13-Dec-05 0:57
Ricardo Mendes13-Dec-05 0:57 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Jared Parsons13-Dec-05 7:48
Jared Parsons13-Dec-05 7:48 
QuestionDelegates Pin
DELETEUSER12-Dec-05 5:57
DELETEUSER12-Dec-05 5:57 

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.