Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: Removing a " from a string Pin
sharpiesharpie16-Feb-07 15:46
sharpiesharpie16-Feb-07 15:46 
AnswerRe: Removing a " from a string Pin
Guffa17-Feb-07 14:58
Guffa17-Feb-07 14:58 
AnswerRe: Removing a " from a string Pin
Thomas Stockwell16-Feb-07 16:16
professionalThomas Stockwell16-Feb-07 16:16 
GeneralRe: Removing a " from a string Pin
sharpiesharpie17-Feb-07 1:34
sharpiesharpie17-Feb-07 1:34 
Questionhow to implement payflopro_recurringbilling through pfpro_dotnet_sdk_RC2_v1.1(verisign sdk) in c# Pin
shankhan bhandari16-Feb-07 11:33
shankhan bhandari16-Feb-07 11:33 
AnswerRe: how to implement payflopro_recurringbilling through pfpro_dotnet_sdk_RC2_v1.1(verisign sdk) in c# Pin
Wayne Phipps17-Feb-07 3:23
Wayne Phipps17-Feb-07 3:23 
QuestionProblem: vista will not sent a WM_ message [modified] Pin
michele_cv16-Feb-07 10:37
michele_cv16-Feb-07 10:37 
Questiongetting each byte of the pixel Pin
samreengr816-Feb-07 9:47
samreengr816-Feb-07 9:47 
Im trying to take every pixel in a Bitmap and save it in bye array.... Buit Im getting a n error
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt"
Can any1 tell me wht wrong with this code


<br />
public static byte[] check(Bitmap b)<br />
 {<br />
 BitmapData bmData<br />
          = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadOnly,PixelFormat.Format24bppRgb);<br />
            int stride = bmData.Stride;<br />
            byte[] bytes = new byte[stride * b.Height];<br />
            System.IntPtr Scan0 = bmData.Scan0;<br />
            unsafe<br />
            {<br />
                int a = 0;<br />
                byte* p = (byte*)(void*)Scan0;<br />
                int nOffset = stride - b.Width * 3;<br />
                int nWidth = b.Width * 3;<br />
                for (int y = 0; y < b.Height; ++y)<br />
                {<br />
                    for (int x = 0; x < nWidth; ++x)<br />
                    {<br />
<br />
                        bytes[a] = p[0];<br />
                        a++;<br />
  Here I got the error-> bytes[a] = p[1];<br />
                        a++;<br />
                        bytes[a] = p[2];<br />
                        a++;<br />
                        p += 3;<br />
<br />
                    }<br />
                   p += nOffset;<br />
                }<br />
            }<br />
            b.UnlockBits(bmData);<br />
            return bytes;<br />
           }<br />
 <br />

AnswerRe: getting each byte of the pixel Pin
Christian Graus16-Feb-07 10:00
protectorChristian Graus16-Feb-07 10:00 
AnswerRe: getting each byte of the pixel Pin
Wayne Phipps17-Feb-07 4:29
Wayne Phipps17-Feb-07 4:29 
QuestionDraging a line Pin
CodeItWell16-Feb-07 9:39
CodeItWell16-Feb-07 9:39 
AnswerRe: Draging a line Pin
Christian Graus16-Feb-07 10:00
protectorChristian Graus16-Feb-07 10:00 
AnswerRe: Draging a line Pin
MoustafaS16-Feb-07 10:23
MoustafaS16-Feb-07 10:23 
QuestionDevice Volume Monitor :: Issue On Insertion of CD? Pin
Matt U.16-Feb-07 9:32
Matt U.16-Feb-07 9:32 
QuestionSaving text? Pin
alostdruid16-Feb-07 9:16
alostdruid16-Feb-07 9:16 
AnswerRe: Saving text? Pin
MoustafaS16-Feb-07 10:27
MoustafaS16-Feb-07 10:27 
GeneralRe: Saving text? Pin
alostdruid16-Feb-07 11:51
alostdruid16-Feb-07 11:51 
GeneralRe: Saving text? Pin
MoustafaS16-Feb-07 12:09
MoustafaS16-Feb-07 12:09 
QuestionDataGridView - Adding new row Pin
Aleksandar Smudja16-Feb-07 9:11
Aleksandar Smudja16-Feb-07 9:11 
AnswerRe: DataGridView - Adding new row Pin
MoustafaS16-Feb-07 10:33
MoustafaS16-Feb-07 10:33 
GeneralRe: DataGridView - Adding new row Pin
Aleksandar Smudja16-Feb-07 11:17
Aleksandar Smudja16-Feb-07 11:17 
QuestionChild MDI problem with Events [modified] Pin
ross.anderson16-Feb-07 9:07
ross.anderson16-Feb-07 9:07 
QuestionStringBuilder vs. String Pin
yesufollower16-Feb-07 6:12
yesufollower16-Feb-07 6:12 
AnswerRe: StringBuilder vs. String Pin
Thomas Stockwell16-Feb-07 6:16
professionalThomas Stockwell16-Feb-07 6:16 
AnswerRe: StringBuilder vs. String Pin
tgrt16-Feb-07 7:05
tgrt16-Feb-07 7:05 

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.