473,406 Members | 2,217 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,406 software developers and data experts.

strings from vb to evc++...

hi there,

i have som etrouble when i call a custom DLL (made with eVC++) ..my function
take char* (non unicode) to display it (after convert to unicode)

DLLEXPORT long F_BDO_MessageBoxOK(char *IN_title, char *IN_msg )

The declare is
Public Declare Function F_BDO_MessageBoxOK Lib "PDA_BDO.dll" (ByVal
IN_title() As Byte, ByVal IN_msg() As Byte) As Int32

I use this syntax in vb to call the DLL..
F_BDO_MessageBoxOK(ascii.GetBytes("toto"), ascii.GetBytes("tata"))

but it seem VB not add 0 char at the end of string....

how i can do except to add chr(0) after my string ?

thank a lot !


Nov 21 '05 #1
1 1136
When you use internal marshaller and pass a string as unicode, the string is
0-terminated. Since you need ascii (rarely used in Windows CE), and took
matters in your own hands, I guess it's up to you to 0-terminate the buffer

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Eric BOUXIROT" <ri****@rickou.net> wrote in message
news:41***********************@news.free.fr...
hi there,

i have som etrouble when i call a custom DLL (made with eVC++) ..my
function take char* (non unicode) to display it (after convert to unicode)

DLLEXPORT long F_BDO_MessageBoxOK(char *IN_title, char *IN_msg )

The declare is
Public Declare Function F_BDO_MessageBoxOK Lib "PDA_BDO.dll" (ByVal
IN_title() As Byte, ByVal IN_msg() As Byte) As Int32

I use this syntax in vb to call the DLL..
F_BDO_MessageBoxOK(ascii.GetBytes("toto"), ascii.GetBytes("tata"))

but it seem VB not add 0 char at the end of string....

how i can do except to add chr(0) after my string ?

thank a lot !

Nov 21 '05 #2

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

Similar topics

0
by: devgru | last post by:
I've developed several programs for the Pocket PC in eMbedded Visual C (API calls only, no MFC). All of these programs made use of a third-party DLL called SecureTrial (www.zedev.com) to create...
0
by: SkyRender | last post by:
Hello. I'm currently developing an application in eVC++ which will be compiled as a DLL and included in a VB.NET PocetPC program. I compile in eVC++ having included the sms.h header file and...
0
by: Systems001 | last post by:
Anyone had these issues with EVC 4 Debugger? When debugging to an actual unit (in this case, Dell Axim, CE OS V4) The debugger will only stop on occasion at break points, if at all. And once...
0
by: Boris | last post by:
I install embeeded visual C++ sp2 (eVC 4.0) on new instalation of windows XP pro en SP1 () (with no update). Then I to install SDK for windows ce dot.net 4.2. Installation failed with error...
0
by: drblow | last post by:
Hi there! I'm new here, and I'm just starting to learn a little about coding, so please be gentle with me! :0) I have DL'ed EVC++4 from MS, and installed it OK. But when I try to create a new...
10
by: Eric BOUXIROT | last post by:
hi there, i'm working on a smart application project on VB.NET. i must call API (custom eVC++ DLL) but i have some trouble with mashalas attribute..... i have copy/past a sample on msdn help but...
3
by: Eric BOUXIROT | last post by:
hi, i must convert all of these eVC++ prototypes to use with VB.NET.... DLLEXPORT long F_BDO_MessageBoxOK(char *IN_title, char *IN_msg ); DLLEXPORT long F_BDO_MessageBoxOUINON(char *IN_title,...
0
by: Eric BOUXIROT | last post by:
hi there, i want to debug a dll made with EVC++. the application is under VB.NET. in EVC++ project settings i have set this : in debug tab i set in category general remote executable path and...
0
by: Rick | last post by:
hi all ! i need your HELP ! (it's long to explain but it's needed) i have a big problem (for me) with my APP/DLL i have made an Application with VB.NET for Compact framework that call an...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.