Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
AnswerRe: dynamic dropdown select list Pin
Deepanshu Goel7-May-14 19:56
professionalDeepanshu Goel7-May-14 19:56 
Questionbuilding a program to download images from the web Pin
thewiz914-May-14 7:32
thewiz914-May-14 7:32 
AnswerRe: building a program to download images from the web Pin
Wes Aday4-May-14 8:50
professionalWes Aday4-May-14 8:50 
QuestionProgress bar start with button click and stop at text box color change event. Pin
Member 105796734-May-14 0:59
Member 105796734-May-14 0:59 
AnswerRe: Progress bar start with button click and stop at text box color change event. Pin
Dave Kreskowiak5-May-14 3:32
mveDave Kreskowiak5-May-14 3:32 
AnswerRe: Progress bar start with button click and stop at text box color change event. Pin
Eddy Vluggen6-May-14 8:07
professionalEddy Vluggen6-May-14 8:07 
QuestionHow to display a search and select form in place of a text box in c# or VB.net. The search form should look like a dropdown box to the user Pin
prasanthgpks23-May-14 15:24
prasanthgpks23-May-14 15:24 
SuggestionRe: How to display a search and select form in place of a text box in c# or VB.net. The search form should look like a dropdown box to the user Pin
Richard MacCutchan3-May-14 22:06
mveRichard MacCutchan3-May-14 22:06 
QuestionUpdate SQL Database in C# Pin
Lubomír Baloga2-May-14 23:12
Lubomír Baloga2-May-14 23:12 
AnswerRe: Update SQL Database in C# Pin
Richard MacCutchan3-May-14 0:30
mveRichard MacCutchan3-May-14 0:30 
GeneralRe: Update SQL Database in C# Pin
Lubomír Baloga3-May-14 4:26
Lubomír Baloga3-May-14 4:26 
QuestionRe: Update SQL Database in C# Pin
Richard MacCutchan3-May-14 4:46
mveRichard MacCutchan3-May-14 4:46 
AnswerRe: Update SQL Database in C# Pin
Lubomír Baloga3-May-14 6:00
Lubomír Baloga3-May-14 6:00 
GeneralRe: Update SQL Database in C# Pin
Richard MacCutchan3-May-14 6:34
mveRichard MacCutchan3-May-14 6:34 
GeneralRe: Update SQL Database in C# Pin
V.5-May-14 2:24
professionalV.5-May-14 2:24 
AnswerRe: Update SQL Database in C# Pin
Eddy Vluggen3-May-14 7:39
professionalEddy Vluggen3-May-14 7:39 
AnswerRe: Update SQL Database in C# Pin
Praneet Nadkar8-May-14 18:24
Praneet Nadkar8-May-14 18:24 
QuestionHow to add panel and its control to PDF by using iTextSharp.? Pin
Member 98521082-May-14 21:50
Member 98521082-May-14 21:50 
SuggestionRe: How to add panel and its control to PDF by using iTextSharp.? Pin
Richard MacCutchan2-May-14 22:39
mveRichard MacCutchan2-May-14 22:39 
QuestionAudio Steganography C# (Code not working) Invalid file format exception [NEED HELP] Pin
Member 105917362-May-14 8:09
Member 105917362-May-14 8:09 
NEED HELP!!
My project is 'digital steganography' in which we are doing image, audio and video steganography. We taken help from CodeProject, image is working properly but in audio steganography im stucking somewhere...

here is the code snippet:
WaveStream.cs
private void CopyHeader(Stream destinationStream)
{
BinaryReader reader = new BinaryReader(m_Stream);
BinaryWriter writer = new BinaryWriter(destinationStream);

if (CopyChunk(reader, writer) != "RIFF")
throw new Exception("Invalid file format");

writer.Write( reader.ReadInt32() ); // File length minus first 8 bytes of RIFF description

if (CopyChunk(reader, writer) != "WAVE")
throw new Exception("Invalid file format");

if (CopyChunk(reader, writer) != "fmt ")
throw new Exception("Invalid file format");

int len = reader.ReadInt32();
if (len < 16){ // bad format chunk length
throw new Exception("Invalid file format");
}else{
writer.Write(len);
}

m_Format = new WaveFormat(22050, 16, 2); // initialize to any format
m_Format.wFormatTag = reader.ReadInt16();
m_Format.nChannels = reader.ReadInt16();
m_Format.nSamplesPerSec = reader.ReadInt32();
m_Format.nAvgBytesPerSec = reader.ReadInt32();
m_Format.nBlockAlign = reader.ReadInt16();
m_Format.wBitsPerSample = reader.ReadInt16();

//copy format information
writer.Write( m_Format.wFormatTag );
writer.Write( m_Format.nChannels );
writer.Write( m_Format.nSamplesPerSec );
writer.Write( m_Format.nAvgBytesPerSec );
writer.Write( m_Format.nBlockAlign );
writer.Write( m_Format.wBitsPerSample );


// advance in the stream to skip the wave format block
len -= 16; // minimum format size
writer.Write( reader.ReadBytes(len) );
len = 0;
/*while (len > 0)
{
reader.ReadByte();
len--;
}*/

// assume the data chunk is aligned
while(m_Stream.Position < m_Stream.Length && CopyChunk(reader, writer) != "data")
;

if (m_Stream.Position >= m_Stream.Length)
throw new Exception("Invalid file format");


m_Length = reader.ReadInt32();
writer.Write( m_Length );

m_DataPos = m_Stream.Position;
Position = 0;
}


_______________________________________________________

in above snippet im getting exception thrown from here:

if (m_Stream.Position >= m_Stream.Length)
throw new Exception("Invalid file format");

im doing it for .wav file, please help.
Krrish8891

AnswerRe: Audio Steganography C# (Code not working) Invalid file format exception [NEED HELP] Pin
CHill602-May-14 8:46
mveCHill602-May-14 8:46 
QuestionItextsharp , count each page rows OnStartpage Pin
mohammadkaab2-May-14 1:46
mohammadkaab2-May-14 1:46 
QuestionRe: Itextsharp , count each page rows OnStartpage Pin
GuyThiebaut2-May-14 2:01
professionalGuyThiebaut2-May-14 2:01 
AnswerRe: Itextsharp , count each page rows OnStartpage Pin
mohammadkaab2-May-14 2:33
mohammadkaab2-May-14 2:33 
GeneralRe: Itextsharp , count each page rows OnStartpage Pin
GuyThiebaut2-May-14 2:37
professionalGuyThiebaut2-May-14 2:37 

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.