Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
Questionuse of ? and : [Solved] Pin
William Winner22-May-10 11:22
William Winner22-May-10 11:22 
AnswerRe: use of ? and : Pin
Pete O'Hanlon22-May-10 11:27
mvePete O'Hanlon22-May-10 11:27 
GeneralRe: use of ? and : Pin
William Winner22-May-10 11:30
William Winner22-May-10 11:30 
GeneralRe: use of ? and : Pin
Pete O'Hanlon22-May-10 11:33
mvePete O'Hanlon22-May-10 11:33 
GeneralRe: use of ? and : Pin
#realJSOP23-May-10 2:00
professional#realJSOP23-May-10 2:00 
AnswerRe: use of ? and : [Solved] Pin
DaveyM6923-May-10 1:20
professionalDaveyM6923-May-10 1:20 
Questionhelp to translate label from dll on C# Pin
kozzzak22-May-10 11:14
kozzzak22-May-10 11:14 
AnswerRe: help to translate label from dll on C# [modified] Pin
Luc Pattyn22-May-10 11:43
sitebuilderLuc Pattyn22-May-10 11:43 
I've never used Delphi, so I'm not sure how to read that exactly. There are basically two possibilities:

1. most likely
if the Delphi code is supposed to allocate and fill native memory with a result string, then what you are getting is really a pointer into the native world, and you must use one of the Marshal.PtrToStringXYZ() methods to get the corresponding managed string.

2. alternatively
if the Delphi code needs a pointer to an existing buffer it is supposed to fill, then you should replace the last but one parameter in the prototype and in the call by a StringBuilder instance, which must have been created (with new) and given sufficient capacity (the parameter in its constructor).

[ADDED]
If the native function wants stdcall, your prototype should say so, using CallingConvention=CallingConvention.StdCall within the parentheses of the DllImport attribute.
[/ADDED]

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

modified on Saturday, May 22, 2010 6:04 PM

QuestionPeterson Algoritm For many Process Pin
shahramkeyboard22-May-10 10:34
shahramkeyboard22-May-10 10:34 
AnswerRe: Peterson Algoritm For many Process Pin
Pete O'Hanlon22-May-10 10:45
mvePete O'Hanlon22-May-10 10:45 
GeneralRe: Peterson Algoritm For many Process Pin
shahramkeyboard22-May-10 11:27
shahramkeyboard22-May-10 11:27 
GeneralRe: Peterson Algoritm For many Process Pin
Pete O'Hanlon22-May-10 11:33
mvePete O'Hanlon22-May-10 11:33 
QuestionSimulation Of TSL instruction For Resolve of Race Condition Pin
shahramkeyboard22-May-10 10:25
shahramkeyboard22-May-10 10:25 
AnswerRe: Simulation Of TSL instruction For Resolve of Race Condition Pin
Pete O'Hanlon22-May-10 10:44
mvePete O'Hanlon22-May-10 10:44 
GeneralRe: Simulation Of TSL instruction For Resolve of Race Condition Pin
shahramkeyboard22-May-10 11:28
shahramkeyboard22-May-10 11:28 
GeneralRe: Simulation Of TSL instruction For Resolve of Race Condition Pin
Pete O'Hanlon22-May-10 11:38
mvePete O'Hanlon22-May-10 11:38 
QuestionCan I store List<> in a SQL DB? Pin
Etienne_12322-May-10 8:58
Etienne_12322-May-10 8:58 
AnswerRe: Can I store List in a SQL DB? Pin
PIEBALDconsult22-May-10 9:23
mvePIEBALDconsult22-May-10 9:23 
GeneralRe: Can I store List in a SQL DB? Pin
Luc Pattyn22-May-10 9:39
sitebuilderLuc Pattyn22-May-10 9:39 
GeneralRe: Can I store List in a SQL DB? Pin
Etienne_12322-May-10 13:23
Etienne_12322-May-10 13:23 
GeneralRe: Can I store List in a SQL DB? Pin
Luc Pattyn22-May-10 13:34
sitebuilderLuc Pattyn22-May-10 13:34 
GeneralRe: Can I store List in a SQL DB? Pin
Etienne_12323-May-10 5:41
Etienne_12323-May-10 5:41 
QuestionReflecting Entire DLL Pin
Eli Nurman22-May-10 8:23
Eli Nurman22-May-10 8:23 
AnswerRe: Reflecting Entire DLL Pin
Luc Pattyn22-May-10 8:29
sitebuilderLuc Pattyn22-May-10 8:29 
QuestionError in adding data in List Pin
future383922-May-10 6:33
future383922-May-10 6:33 

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.