Click here to Skip to main content
16,006,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: Poor Points Pin
TyronX7-Jan-05 4:45
TyronX7-Jan-05 4:45 
QuestionUrgent? Row Count Set Lock on Excel Column? Pin
macupryk6-Jan-05 9:53
macupryk6-Jan-05 9:53 
GeneralEXCEL question saving a file saving the the first column as read only Pin
macupryk6-Jan-05 9:51
macupryk6-Jan-05 9:51 
GeneralRe: EXCEL question saving a file saving the the first column as read only Pin
perlmunger6-Jan-05 11:24
perlmunger6-Jan-05 11:24 
GeneralC to C# Array address offsetting Pin
Anonymous6-Jan-05 9:17
Anonymous6-Jan-05 9:17 
GeneralRe: C to C# Array address offsetting Pin
Christian Graus6-Jan-05 12:26
protectorChristian Graus6-Jan-05 12:26 
GeneralRe: C to C# Array address offsetting Pin
Heath Stewart6-Jan-05 14:44
protectorHeath Stewart6-Jan-05 14:44 
GeneralRe: C to C# Array address offsetting Pin
Heath Stewart6-Jan-05 14:36
protectorHeath Stewart6-Jan-05 14:36 
Actually, neither example is copying data. You're pointing result at the element at offset 0x20 (32) from data in the native code.

As Christian said, you can use Array.Copy if you actually want to copy data:
byte[] data = new byte[256]; // Fill this.
byte[] result = new byte[256 - 32];
Array.Copy(data, 0x20 /* 32 */, result, 0, 256 - 32);
In your native code, if you want to copy - no reference - the data, you need to do something like so:
malloc(&result, 256 - 30);
memcpy(result, data + 0x20 /* 32 */, 256 - 32);
See my reply to Christian for how you can do pointer arithmetic (which is, remember, just referencing - not copying) if you're interested.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
QuestionIs it possible to put a watermark on a form? Pin
Member 966-Jan-05 8:08
Member 966-Jan-05 8:08 
AnswerRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 9:14
perlmunger6-Jan-05 9:14 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 966-Jan-05 10:30
Member 966-Jan-05 10:30 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 14:29
protectorHeath Stewart6-Jan-05 14:29 
GeneralRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 15:12
perlmunger6-Jan-05 15:12 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 15:47
protectorHeath Stewart6-Jan-05 15:47 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 14:31
protectorHeath Stewart6-Jan-05 14:31 
GeneralRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 14:59
perlmunger6-Jan-05 14:59 
AnswerRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 15:44
protectorHeath Stewart6-Jan-05 15:44 
GeneralRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 16:04
perlmunger6-Jan-05 16:04 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 5:40
protectorHeath Stewart7-Jan-05 5:40 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 5:22
Member 967-Jan-05 5:22 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 5:31
protectorHeath Stewart7-Jan-05 5:31 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 8:39
Member 967-Jan-05 8:39 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 9:09
protectorHeath Stewart7-Jan-05 9:09 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 9:29
Member 967-Jan-05 9:29 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 11:38
protectorHeath Stewart7-Jan-05 11:38 

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.