Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / April 2007

Tip: Looking for answers? Try searching our database.

Win32 API with globalization

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ravi - 28 Mar 2007 17:40 GMT
Hi,
   Can anyone suggest on the behavior of Win32 API in different langauge
OSs? For example, if I'm using a Win32 function like "GetClassName" in C#.NET
application, how different will the string values returned by this function
be?

Any suggestions would be greatly appreciated.

Thank you.
Leili Pournasseh[MSFT] - 28 Mar 2007 22:32 GMT
Hi Ravi,
I don't think on localized OSs (or at least not in recent ones) it's going
to be any different than on an ENU OS - the OS should return Unicode
strings.
In any case I think he should declare his functions like this
[DllImport("<<the DLL containing the Win32 function>>", CharSet =
CharSet.Auto)]

The string marshalling story between .NET and COM is fully described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpcondefaultmarshalingforstrings.asp

This is some info on how to identify functions and what they return and an
important note on the CharSet attribute
<< When unspecified, the character set, represented by the CharSet field,
defaults to ANSI >>

And here you can find everything about hot to correctly specify a CharSet:
http://msdn2.microsoft.com/en-us/library/7b93s42f.aspx

Please let me know if you need more info.
Thanks,
Leili

--------------------
| Thread-Topic: Win32 API with globalization
| thread-index: AcdxV7vvA5Dc8bHQTuir2VJhoYAFkQ==
[quoted text clipped - 16 lines]
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.internationalization:150
| NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
| X-Tomcat-NG: microsoft.public.dotnet.internationalization
[quoted text clipped - 8 lines]
|
| Thank you.
Ravi - 29 Mar 2007 21:36 GMT
Thanks a lot Leili. I will go through the posts you've cited and may bug you
more!

Thanks again.

> Hi Ravi,
> I don't think on localized OSs (or at least not in recent ones) it's going
[quoted text clipped - 56 lines]
> |
> | Thank you.
Leili Pournasseh[MSFT] - 18 Apr 2007 22:01 GMT
You're more than welcome. I'm going to close this issue for now. Please let
me know if you need more information.
Thanks,
Leili
--------------------
| Thread-Topic: Win32 API with globalization
| thread-index: AcdyQd8ORWeJj/vwTHKPer5SCWyC8A==
| X-WBNR-Posting-Host: 64.128.133.189
| From: =?Utf-8?B?UmF2aQ==?= <Ravi@discussions.microsoft.com>
| References:  <6D6217C7-64A1-45CF-8B32-7CB1447FD92E@microsoft.com>
<NPJOkCYcHHA.4692@TK2MSFTNGHUB02.phx.gbl>
| Subject: RE: Win32 API with globalization
| Date: Thu, 29 Mar 2007 13:36:04 -0700
[quoted text clipped - 12 lines]
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.internationalization:152
| NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
| X-Tomcat-NG: microsoft.public.dotnet.internationalization
[quoted text clipped - 13 lines]
| >
| > The string marshalling story between .NET and COM is fully described here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
| > l/cpcondefaultmarshalingforstrings.asp
| >
[quoted text clipped - 46 lines]
| > |
| > | Thank you.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.