Click here to Skip to main content
15,893,337 members
Home / Discussions / C#
   

C#

 
GeneralRe: ZeroMemory Pin
Paul Riley3-Sep-02 3:32
Paul Riley3-Sep-02 3:32 
GeneralRe: ZeroMemory Pin
Nick Parker4-Sep-02 9:12
protectorNick Parker4-Sep-02 9:12 
Generalaccess memory within unmanaged dll Pin
Rüpel2-Sep-02 23:45
Rüpel2-Sep-02 23:45 
GeneralRe: access memory within unmanaged dll Pin
Rüpel2-Sep-02 23:55
Rüpel2-Sep-02 23:55 
GeneralRe: access memory within unmanaged dll Pin
Stephane Rodriguez.3-Sep-02 0:06
Stephane Rodriguez.3-Sep-02 0:06 
GeneralRe: access memory within unmanaged dll Pin
Rüpel3-Sep-02 0:38
Rüpel3-Sep-02 0:38 
GeneralRe: access memory within unmanaged dll Pin
leppie3-Sep-02 1:42
leppie3-Sep-02 1:42 
GeneralRe: access memory within unmanaged dll Pin
Rüpel3-Sep-02 2:39
Rüpel3-Sep-02 2:39 
1. yep. out works indeed. good idea. but in the foo-call is to be inserted uswell.
2. no, the copy-call was ok, since the size-field is included (i.e. the value is at least 2 for the 2 size-bytes)

finally:
[DllImport("theold.dll")]
public static extern Int32 foo(out IntPtr messagePtr);
...
IntPtr messagePtr;
Int32 ret = foo(out messagePtr);
Int16 size = Marshal.ReadInt16(messagePtr);
byte [] message = new byte[size];
Marshal.Copy(messagePtr,message,0,size);


thx again for your help an ideas Rose | [Rose]

:wq
GeneralRe: access memory within unmanaged dll Pin
leppie3-Sep-02 3:27
leppie3-Sep-02 3:27 
GeneralDoing programs Pin
suresh_sathya2-Sep-02 23:39
suresh_sathya2-Sep-02 23:39 
GeneralRe: Doing programs Pin
Stephane Rodriguez.2-Sep-02 23:54
Stephane Rodriguez.2-Sep-02 23:54 
QuestionHow can be only one ? Pin
candan2-Sep-02 16:42
professionalcandan2-Sep-02 16:42 
AnswerRe: How can be only one ? Pin
Stephane Rodriguez.3-Sep-02 0:11
Stephane Rodriguez.3-Sep-02 0:11 
AnswerRe: How can be only one ? Pin
Christian Graus3-Sep-02 0:46
protectorChristian Graus3-Sep-02 0:46 
AnswerRe: How can be only one ? Pin
Richard Deeming3-Sep-02 1:00
mveRichard Deeming3-Sep-02 1:00 
GeneralPassing null Pin
Nnamdi Onyeyiri2-Sep-02 8:09
Nnamdi Onyeyiri2-Sep-02 8:09 
GeneralRe: Passing null Pin
Paul Riley2-Sep-02 8:17
Paul Riley2-Sep-02 8:17 
GeneralRe: Passing null Pin
Nnamdi Onyeyiri2-Sep-02 8:25
Nnamdi Onyeyiri2-Sep-02 8:25 
GeneralRe: Passing null Pin
leppie2-Sep-02 9:17
leppie2-Sep-02 9:17 
GeneralRe: Passing null Pin
Nnamdi Onyeyiri2-Sep-02 9:23
Nnamdi Onyeyiri2-Sep-02 9:23 
GeneralRe: Passing null Pin
leppie2-Sep-02 12:11
leppie2-Sep-02 12:11 
GeneralRe: Passing null Pin
Rickard Andersson202-Sep-02 10:45
Rickard Andersson202-Sep-02 10:45 
GeneralDisplay Mode Pin
Nnamdi Onyeyiri2-Sep-02 2:22
Nnamdi Onyeyiri2-Sep-02 2:22 
GeneralRe: Display Mode Pin
leppie2-Sep-02 3:00
leppie2-Sep-02 3:00 
GeneralRe: Display Mode Pin
Nnamdi Onyeyiri2-Sep-02 3:16
Nnamdi Onyeyiri2-Sep-02 3: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.