473,378 Members | 1,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

TranslateCharsetInfo failing

PLS
I hope someone can explain why this piece of code is failing:

CHARSETINFO csi;
BOOL brc = TranslateCharsetInfo(&cf.locale, &csi, TCI_SRCLOCALE);

cf.locale is an LCID with value 0x00000409.
The function returns false and GetLastError returns 0x57, invalid
parameter. The operating system is US Windows XP SP2.

What is the problem?

The use here is that I have a locale code and need the charset for a
LOGFONT structure and the code page.

Thanks,
++PLS
Jul 30 '07 #1
1 1916
Hello,
CHARSETINFO csi;
BOOL brc = TranslateCharsetInfo(&cf.locale, &csi, TCI_SRCLOCALE);
Citetion from MSDN Lib:

pSrc:
Pointer to the fsCsb member of a FONTSIGNATURE structure if dwFlags is set to
TCI_SRCFONTSIG. Otherwise, this parameter is set to a DWORD value indicating the
source.

So you should use:

BOOL brc = TranslateCharsetInfo((DWORD *)cf.locale, &csi, TCI_SRCLOCALE);

-- best regards

Cezary Noweta
Jul 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon Stewart | last post by:
Has anyone else experience of imagecreatefromjpeg failing with an error message about memory even though the size of the image being uploaded is nothing like the space available to the script? ...
0
by: Sundeep Gawande | last post by:
I am facing a strange problem. I am trying to host a .NET(C#) control in a VC6 COM ocx. Now when I create the control using CreateControl(...) or CoCreateInstance(...) my call is failing with...
7
by: Kieran Simkin | last post by:
Hi all, I'm having some trouble with a linked list function and was wondering if anyone could shed any light on it. Basically I have a singly-linked list which stores pid numbers of a process's...
3
by: bob | last post by:
Hello, I've tried a few testing frameworks with C# but so far haven't found a way to debug into a failing test. I'm used to S Unit (Smalltalk) where when a test fails you just right click on it...
1
by: Frank Rizzo | last post by:
Hello, I have a bunch of thread in my app doing variuos things. One of them is failing at some point in the app and I can't (actually don't know how) figure out which one it is. Is there a way to...
3
by: Michael Tissington | last post by:
I'm using LoadLibrary to import a DLL in a asp.net application. The dll was written in c++ and is located in the bin folder I have been testing the website on my development machine and our...
18
by: Scott David Daniels | last post by:
There has been a bit of discussion about a way of providing test cases in a test suite that _should_ work but don't. One of the rules has been the test suite should be runnable and silent at every...
0
by: a_rajanikanth | last post by:
Hi, The following is the trigger which is failing when executing. Can you please tell me the reason why it is failing ? Trigger got created but throwing exception. CREATE TRIGGER TOBJ_U...
3
by: noon | last post by:
I'm runing an xmlHttpRequest to get the site's source code and then applying the regex xhr.responseText.split(/<body*>((?:.|\n)*)<\/body>/i) Works for google.com. Fails on yahoo.com and...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.