473,480 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Unicode to non unicode conversion problem

8 New Member
Unicode to non unicode conversion problem

--------------------------------------------------------------------------------

Hi All,

I am using C dll in macro which converts Unicode data to 8 bit encoding data
Expand|Select|Wrap|Line Numbers
  1. ' Prototype of C function. 
  2. ' extern "C" int _stdcall Uni2Eni(wchar_t * uni, unsigned char * eni, int size) 
  3.  
  4. 'Here is the function where creating alias of C function using C dll(capi.dll) 
  5. ' ByVal Uni As String ( Its a Unicode string) 
  6. ' ByVal eni As String ( its a Non Unicode string) 
  7.  
  8. Declare Function UNI2Eni Lib "capi.dll" Alias " Uni2Eni " ( ByVal Uni As String, ByVal eni As String, ByVal iSize As Integer) As Integer 
  9.  
  10. Sub Test 
  11. Dim iRet as integer 
  12. Dim sEni as String 
  13. iRet = UNI2Eni(“佅”,sEni,40) 
  14. End Sub
  15.  
On calling this function it return iRet =1 which shows conversion has been successful but the value returned in sEni is showing blank .
Is it the problem with data type or something else?
Please anyone can help me?.
I have used the same dll in open office macro .its gives right output in open office. So there is no question of wrong dll.
Feb 28 '08 #1
0 1548

Sign in to post your reply or Sign up for a free account.

Similar topics

14
2608
by: Thomas Heller | last post by:
I was trying to track down a bug in py2exe where the executable did not work when it is in a directory containing japanese characters. Then, I discovered that part of the problem is in the...
22
5435
by: Keith MacDonald | last post by:
Hello, Is there a portable (at least for VC.Net and g++) method to convert text between wchar_t and char, using the standard library? I may have missed something obvious, but the section on...
4
2014
by: fowlertrainer | last post by:
Hi ! I want to get the WMI infos from Windows machines. I use Py from HU (iso-8859-2) charset. Then I wrote some utility for it, because I want to write it to an XML file. def...
3
7719
by: hunterb | last post by:
I have a file which has no BOM and contains mostly single byte chars. There are numerous double byte chars (Japanese) which appear throughout. I need to take the resulting Unicode and store it in a...
6
7946
by: New MSSQL DBA | last post by:
Hi all, we are now planning to upgrade our application from a non-unicode version to a unicode version. The application's backend is a SQL Server 2000 SP3. The concern is, existing business...
5
5064
by: Borko | last post by:
hi I am having problems getting unicode characters into VB. Using VB6 (sp3) and Access 2000 Characters are displayed correctly in Access, just when I use ADODB (2.7) to read them in VB i get ?...
18
34062
by: Ger | last post by:
I have not been able to find a simple, straight forward Unicode to ASCII string conversion function in VB.Net. Is that because such a function does not exists or do I overlook it? I found...
9
22828
by: mistral | last post by:
Is there some Unicode converter to convert javascript to Unicode format? thanks mistral
5
3019
by: Holger Joukl | last post by:
Hi there, I consider the behaviour of unicode() inconvenient wrt to conversion of non-string arguments. While you can do: u'17.3' you cannot do:
0
7049
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6912
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6744
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.