Click here to Skip to main content
15,891,730 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with wmi and exchange Pin
turbosupramk330-May-12 9:28
turbosupramk330-May-12 9:28 
GeneralRe: Problem with wmi and exchange Pin
turbosupramk330-May-12 11:51
turbosupramk330-May-12 11:51 
GeneralRe: Problem with wmi and exchange Pin
Dave Kreskowiak30-May-12 15:28
mveDave Kreskowiak30-May-12 15:28 
Questionvalidation summary is showing before the submit button click Pin
Dhyanga29-May-12 9:47
Dhyanga29-May-12 9:47 
AnswerRe: validation summary is showing before the submit button click Pin
enhzflep30-May-12 6:53
enhzflep30-May-12 6:53 
QuestionHow do you add a second icon to a gui toolbar? Pin
turbosupramk329-May-12 4:43
turbosupramk329-May-12 4:43 
AnswerRe: How do you add a second icon to a gui toolbar? Pin
Ravi Bhavnani29-May-12 5:53
professionalRavi Bhavnani29-May-12 5:53 
GeneralRe: How do you add a second icon to a gui toolbar? Pin
turbosupramk329-May-12 9:34
turbosupramk329-May-12 9:34 
GeneralRe: How do you add a second icon to a gui toolbar? Pin
bishnoiparmod29-May-12 21:00
bishnoiparmod29-May-12 21:00 
AnswerRe: How do you add a second icon to a gui toolbar? Pin
Eddy Vluggen29-May-12 8:57
professionalEddy Vluggen29-May-12 8:57 
GeneralRe: How do you add a second icon to a gui toolbar? Pin
turbosupramk329-May-12 9:34
turbosupramk329-May-12 9:34 
GeneralRe: How do you add a second icon to a gui toolbar? Pin
Eddy Vluggen29-May-12 9:50
professionalEddy Vluggen29-May-12 9:50 
AnswerRe: How do you add a second icon to a gui toolbar? Pin
BobJanova29-May-12 23:09
BobJanova29-May-12 23:09 
QuestionChange password in System.Data.Sqlite Pin
amrok2amrokk29-May-12 2:49
amrok2amrokk29-May-12 2:49 
AnswerRe: Change password in System.Data.Sqlite Pin
Pete O'Hanlon29-May-12 3:14
mvePete O'Hanlon29-May-12 3:14 
GeneralRe: Change password in System.Data.Sqlite Pin
amrok2amrokk29-May-12 3:32
amrok2amrokk29-May-12 3:32 
GeneralRe: Change password in System.Data.Sqlite Pin
amrok2amrokk29-May-12 4:46
amrok2amrokk29-May-12 4:46 
GeneralRe: Change password in System.Data.Sqlite Pin
amrok2amrokk29-May-12 7:04
amrok2amrokk29-May-12 7:04 
QuestionNot all code paths return a value Pin
sheringkapoting29-May-12 0:40
sheringkapoting29-May-12 0:40 
AnswerRe: Not all code paths return a value Pin
Can SARIGÜL29-May-12 0:43
Can SARIGÜL29-May-12 0:43 
GeneralRe: Not all code paths return a value Pin
sheringkapoting29-May-12 0:51
sheringkapoting29-May-12 0:51 
AnswerRe: Not all code paths return a value Pin
Pete O'Hanlon29-May-12 0:51
mvePete O'Hanlon29-May-12 0:51 
AnswerRe: Not all code paths return a value Pin
Apocalypse Now30-May-12 14:12
Apocalypse Now30-May-12 14:12 
GeneralUsing lame_enc.dll in .NET - Signature mismatch Pin
ChrisHinde28-May-12 15:11
ChrisHinde28-May-12 15:11 
I'm working on a program that will convert a wav-file to mp3, tag it and then upload it via FTP.

I'm done with the FTP-part and am now working on the converting to MP3 part (the only thing left).
The plan is to use LAME (lame_enc.dll) to do the encoding/converting (unless you have any other suggestion). But I've hit a snag.

I couldn't find any good examples for Lame & .NET. I found this here on TCP: C# MP3 Compressor[^]
It wouldn't compile due to missing form components, but I copied the the classes that's relevant.

The project compiles but I get an exception on the call to beInitStream (in the constructor of Mp3Writer). The error states:
PInvokeStackImbalance was detected

and that "the managed PInvoke signature didn't match the unmanaged target signature" (translated from Swedish).

Is there anyone that has an idea what's wrong?! Is this code written for an older version of lame_enc.dll (I've looked at the documentation, but can't see the problem)?

I also tried to use IntPtr etc (found in another example for another DLL), but same result:
C#
Marshal.StructureToPtr(Marshal.SizeOf(m_Mp3Config), Marshal.AllocHGlobal(pConfig), false);

uint LameResult = Lame_encDll.beInitStream(ref pConfig, ref m_InputSamples, ref m_OutBufferSize, ref m_hLameStream);


Code for DLL import:

C#
[DllImport("Lame_enc.dll")]
public static extern uint beInitStream(ref BE_CONFIG pbeConfig, ref uint dwSamples, ref uint dwBufferSize, ref uint phbeStream);

or
C#
[DllImport("Lame_enc.dll")]
public static extern uint beInitStream(ref IntPtr pbeConfig, ref uint dwSamples, ref uint dwBufferSize, ref uint phbeStream);


I could just call lame.exe, but I don't want to do it, mainly because I want to report the progress.

Glad for any help/ideas!
AnswerRe: Using lame_enc.dll in .NET - Signature mismatch Pin
Luc Pattyn28-May-12 15:24
sitebuilderLuc Pattyn28-May-12 15:24 

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.