Click here to Skip to main content
15,885,914 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Using lame_enc.dll in .NET - Signature mismatch Pin
Luc Pattyn28-May-12 15:24
sitebuilderLuc Pattyn28-May-12 15:24 
GeneralRe: Using lame_enc.dll in .NET - Signature mismatch Pin
BobJanova28-May-12 23:26
BobJanova28-May-12 23:26 
GeneralRe: Using lame_enc.dll in .NET - Signature mismatch Pin
DaveyM6929-May-12 1:40
professionalDaveyM6929-May-12 1:40 
I can't see anything obviously wrong from what you've posted. I've had a quick look online at the C definition for the function and I would declare it like:
C#
[DllImport("Lame_enc.dll")]
public static extern int beInitStream(ref BE_CONFIG config, out int samples, out int bufferSize, out IntPtr streamHandle);

I've used out rather than ref for the last 3 parameters as this[^] suggests that these values are returned by the function so no need to pass a reference in.

Edit: Be sure to check the return value from the function. It will be one of these constants:
C#
public const int BE_ERR_SUCCESSFUL = 0x00000000;
public const int BE_ERR_INVALID_FORMAT = 0x00000001;
public const int BE_ERR_INVALID_FORMAT_PARAMETERS = 0x00000002;
public const int BE_ERR_NO_MORE_HANDLES	= 0x00000003;
public const int BE_ERR_INVALID_HANDLE = 0x00000004;
public const int BE_ERR_BUFFER_TOO_SMALL = 0x00000005;

Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)




modified 29-May-12 7:49am.

Questionobject reference not set to an instance of an object Pin
a.fatemeh28-May-12 12:16
a.fatemeh28-May-12 12:16 
AnswerRe: object reference not set to an instance of an object Pin
Manfred Rudolf Bihy28-May-12 12:36
professionalManfred Rudolf Bihy28-May-12 12:36 
GeneralRe: object reference not set to an instance of an object Pin
a.fatemeh28-May-12 12:52
a.fatemeh28-May-12 12:52 
GeneralRe: object reference not set to an instance of an object Pin
Manfred Rudolf Bihy29-May-12 1:34
professionalManfred Rudolf Bihy29-May-12 1:34 
AnswerRe: object reference not set to an instance of an object Pin
bishu_Visu28-May-12 18:24
bishu_Visu28-May-12 18:24 
Questiondatabase on wp7 Pin
heba abu ghaleih22 28-May-12 0:42
heba abu ghaleih22 28-May-12 0:42 
AnswerRe: database on wp7 Pin
Pete O'Hanlon28-May-12 1:51
mvePete O'Hanlon28-May-12 1:51 
AnswerRe: database on wp7 Pin
jschell28-May-12 7:41
jschell28-May-12 7:41 
GeneralRe: database on wp7 Pin
heba abu ghaleih22 28-May-12 8:12
heba abu ghaleih22 28-May-12 8:12 
GeneralRe: database on wp7 Pin
jschell30-May-12 13:40
jschell30-May-12 13:40 
QuestionPDF Editing Pin
candogu27-May-12 21:44
candogu27-May-12 21:44 
AnswerRe: PDF Editing Pin
AmitGajjar27-May-12 22:00
professionalAmitGajjar27-May-12 22:00 
AnswerRe: PDF Editing Pin
CodingLover28-May-12 17:57
CodingLover28-May-12 17:57 
Questionfrom array byte to bitmap Pin
heba abu ghaleih22 26-May-12 18:30
heba abu ghaleih22 26-May-12 18:30 
AnswerRe: from array byte to bitmap Pin
OriginalGriff26-May-12 21:15
mveOriginalGriff26-May-12 21:15 
GeneralRe: from array byte to bitmap Pin
BobJanova28-May-12 0:09
BobJanova28-May-12 0:09 
GeneralRe: from array byte to bitmap Pin
nortee28-May-12 11:00
nortee28-May-12 11:00 

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.