Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: ARRAY LIST Pin
Christian Graus12-Jan-05 10:53
protectorChristian Graus12-Jan-05 10:53 
Generalnot post back Pin
Ahmed Galal12-Jan-05 7:40
Ahmed Galal12-Jan-05 7:40 
GeneralRe: not post back Pin
Christian Graus12-Jan-05 8:56
protectorChristian Graus12-Jan-05 8:56 
GeneralRe: not post back Pin
Ahmed Galal12-Jan-05 10:12
Ahmed Galal12-Jan-05 10:12 
GeneralRe: not post back Pin
Esmo200012-Jan-05 9:54
Esmo200012-Jan-05 9:54 
GeneralList Tables Pin
Dirso12-Jan-05 7:38
Dirso12-Jan-05 7:38 
GeneralNeed assistance with System.Diagnostics.process.startinfo.createnowindow ... Pin
new_phoenix12-Jan-05 7:08
new_phoenix12-Jan-05 7:08 
GeneralByte array to struct Pin
Arjan Schouten12-Jan-05 6:39
Arjan Schouten12-Jan-05 6:39 
Hello,

I have a structure that I want to fill with bytes from a byte array.

public struct DUMMY<br />
    {<br />
        public ushort dummy1;<br />
        public ushort dummy2;<br />
        public ushort dummy3;<br />
        public ushort[] dummy4;<br />
    }<br />
    <br />
    private byte [] filedata = new byte[512];<br />
<br />
    public void MemCopy(ref byte [] source, ref object dest)<br />
    {<br />
       IntPtr Ptr = Marshal.AllocHGlobal(Marshal.SizeOf(dest));<br />
       Marshal.StructureToPtr(dest, Ptr, true);<br />
       int size = Marshal.SizeOf(dest);<br />
       Marshal.Copy(source, 0, Ptr, size);<br />
    }<br />
<br />
<br />


I tried to do it with the MemCopy function but after the Copy dest is still empty. All I'm looking for is a c++ memcpy replacement. If possible in a Managed way.

Thanks,


Arjan
GeneralRe: difference between .NET remoting and shared/private assembly? Pin
liyang yu12-Jan-05 5:58
liyang yu12-Jan-05 5:58 
Generalproblem with SQL Pin
ronin177012-Jan-05 5:40
ronin177012-Jan-05 5:40 
GeneralRe: problem with SQL Pin
Steve Maier12-Jan-05 5:45
professionalSteve Maier12-Jan-05 5:45 
GeneralRe: problem with SQL Pin
Jesse Squire12-Jan-05 6:28
Jesse Squire12-Jan-05 6:28 
GeneralRe: problem with SQL Pin
Dave Kreskowiak12-Jan-05 9:02
mveDave Kreskowiak12-Jan-05 9:02 
GeneralConfiguring web service Pin
Esmo200012-Jan-05 4:38
Esmo200012-Jan-05 4:38 
GeneralRe: Configuring web service Pin
Esmo200012-Jan-05 9:57
Esmo200012-Jan-05 9:57 
Questiondifference between .NET remoting and shared/private assembly? Pin
liyang yu12-Jan-05 4:01
liyang yu12-Jan-05 4:01 
AnswerRe: difference between .NET remoting and shared/private assembly? Pin
Steve Maier12-Jan-05 4:28
professionalSteve Maier12-Jan-05 4:28 
GeneralRe: difference between .NET remoting and shared/private assembly? Pin
liyang yu12-Jan-05 4:49
liyang yu12-Jan-05 4:49 
GeneralRe: difference between .NET remoting and shared/private assembly? Pin
Steve Maier12-Jan-05 5:42
professionalSteve Maier12-Jan-05 5:42 
GeneralLinking HxS Help file to a C# application Pin
mikey_g12-Jan-05 3:49
mikey_g12-Jan-05 3:49 
GeneralDataSet Visual Desinger Persistance Pin
Lyhr12-Jan-05 2:54
Lyhr12-Jan-05 2:54 
GeneralAddNew() and default values Pin
Jonckheere12-Jan-05 2:31
Jonckheere12-Jan-05 2:31 
GeneralRe: AddNew() and default values Pin
turbochimp12-Jan-05 5:38
turbochimp12-Jan-05 5:38 
GeneralRe: AddNew() and default values Pin
Jonckheere12-Jan-05 19:29
Jonckheere12-Jan-05 19:29 
GeneralRe: AddNew() and default values Pin
turbochimp13-Jan-05 3:25
turbochimp13-Jan-05 3: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.