Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: Class with parameter of type Pin
Jeroen De Dauw28-Dec-09 13:16
Jeroen De Dauw28-Dec-09 13:16 
GeneralRe: Class with parameter of type Pin
Luc Pattyn28-Dec-09 13:18
sitebuilderLuc Pattyn28-Dec-09 13:18 
GeneralRe: Class with parameter of type Pin
Jeroen De Dauw28-Dec-09 13:39
Jeroen De Dauw28-Dec-09 13:39 
GeneralRe: Class with parameter of type Pin
Luc Pattyn28-Dec-09 13:46
sitebuilderLuc Pattyn28-Dec-09 13:46 
GeneralRe: Class with parameter of type Pin
Jeroen De Dauw28-Dec-09 23:44
Jeroen De Dauw28-Dec-09 23:44 
QuestionReading in Unicode text Pin
elmernite28-Dec-09 10:48
elmernite28-Dec-09 10:48 
AnswerRe: Reading in Unicode text Pin
Luc Pattyn28-Dec-09 11:15
sitebuilderLuc Pattyn28-Dec-09 11:15 
QuestionRe: Reading in Unicode text [modified] Pin
elmernite29-Dec-09 3:58
elmernite29-Dec-09 3:58 
After switching to StringBuild I now get

"Warning: A StringBuilder buffer has been overflowed by unmanaged code. The process may become unstable. Insufficient capacity allocated to the StringBuilder before marshaling it."

Forgive my lack of understand... But what does that mean?

---
I solved that by increasing the stringbuilder size.

Here is my new code, but I am still getting mangled results like below.
[DllImport("KERNEL32.DLL", EntryPoint = "GetPrivateProfileStringW",
  SetLastError = true,
  CharSet = CharSet.Unicode, ExactSpelling = true,
  CallingConvention = CallingConvention.StdCall)]
        private static extern int GetPrivateProfileStringW(
          string lpAppName,
          string lpKeyName,
          string lpDefault,
          StringBuilder lpReturnString,
          int nSize,
          string lpFilename);



StringBuilder returnString = new StringBuilder(5000);
GetPrivateProfileStringW(fetchUniSection[n], fetchUniInfo[i], "FAIL", returnString, returnString.Capacity, containingFolder + @"\BiblioSelfCheckDefault.uni");


Then I just use returnString.ToString(), store it in a string variable, and later I place it in a text box.
But in the text box, instead of the other language, I get
:رسوم الافتتاØ



-Elmernite

modified on Tuesday, December 29, 2009 10:40 AM

AnswerRe: Reading in Unicode text Pin
Luc Pattyn29-Dec-09 5:20
sitebuilderLuc Pattyn29-Dec-09 5:20 
GeneralRe: Reading in Unicode text Pin
elmernite29-Dec-09 5:56
elmernite29-Dec-09 5:56 
QuestionC# and Open Gl Pin
awaistariq28-Dec-09 7:44
awaistariq28-Dec-09 7:44 
AnswerMessage Closed Pin
28-Dec-09 7:51
stancrm28-Dec-09 7:51 
GeneralRe: C# and Open Gl Pin
harold aptroot28-Dec-09 8:54
harold aptroot28-Dec-09 8:54 
AnswerRe: C# and Open Gl Pin
#realJSOP28-Dec-09 9:41
mve#realJSOP28-Dec-09 9:41 
QuestionRegistry Pin
sanforjackass28-Dec-09 7:39
sanforjackass28-Dec-09 7:39 
QuestionCreating a Class that can be a list? Pin
bbranded28-Dec-09 5:20
bbranded28-Dec-09 5:20 
AnswerRe: Creating a Class that can be a list? Pin
Luc Pattyn28-Dec-09 5:37
sitebuilderLuc Pattyn28-Dec-09 5:37 
GeneralRe: Creating a Class that can be a list? Pin
bbranded28-Dec-09 5:40
bbranded28-Dec-09 5:40 
GeneralRe: Creating a Class that can be a list? Pin
Luc Pattyn28-Dec-09 7:13
sitebuilderLuc Pattyn28-Dec-09 7:13 
GeneralRe: Creating a Class that can be a list? Pin
DaveyM6928-Dec-09 10:23
professionalDaveyM6928-Dec-09 10:23 
GeneralRe: Creating a Class that can be a list? Pin
ProtoBytes28-Dec-09 12:14
ProtoBytes28-Dec-09 12:14 
GeneralRe: Creating a Class that can be a list? Pin
Luc Pattyn28-Dec-09 12:19
sitebuilderLuc Pattyn28-Dec-09 12:19 
AnswerRe: Creating a Class that can be a list? Pin
Saksida Bojan28-Dec-09 5:37
Saksida Bojan28-Dec-09 5:37 
AnswerRe: Creating a Class that can be a list? Pin
#realJSOP28-Dec-09 9:44
mve#realJSOP28-Dec-09 9:44 
QuestionFew questions Pin
Saksida Bojan28-Dec-09 5:04
Saksida Bojan28-Dec-09 5:04 

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.