473,651 Members | 2,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_MessageBo xOK(char *IN_title, char *IN_msg )

The declare is
Public Declare Function F_BDO_MessageBo xOK Lib "PDA_BDO.dl l" (ByVal
IN_title() As Byte, ByVal IN_msg() As Byte) As Int32

I use this syntax in vb to call the DLL..
F_BDO_MessageBo xOK(ascii.GetBy tes("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 1144
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_MessageBo xOK(char *IN_title, char *IN_msg )

The declare is
Public Declare Function F_BDO_MessageBo xOK Lib "PDA_BDO.dl l" (ByVal
IN_title() As Byte, ByVal IN_msg() As Byte) As Int32

I use this syntax in vb to call the DLL..
F_BDO_MessageBo xOK(ascii.GetBy tes("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
2424
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 30-day trial versions of the programs. The DLL was loaded dynamically at run-time using LoadLibrary and GetProcAddress, as shown in the code below. For the SecureTrial library, all I have are .DLL files compiled for the MIPS, ARM, and SH3...
0
1045
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 having linked to the sms.lib library. Here's my code for the OpenSMSHandle function: UNMANAGED_API bool OpenSMSHandle() { SMS_HANDLE hSms = NULL;
0
1313
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 you do get a good stop, as soon as you attempt to Step, the application just continues without stepping to the next line.
0
1829
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 message : vbscript (window) "failed to initialize property bag" Thank you. Boris
0
943
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 WCE Dynamic-Link Library project, the application hangs completely. Looking in task manager shows CPU usage at 100%, & 2 copies of EVC++4 not responding. It does create the workspace files in the folder I specified, but when I try to open them,...
10
1854
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 it's not working.. IDE says "unknown 'mashalAs' attribute".....and i don't know why.... i have try exactly the same code on a normal windows project and it work (compile) fine...
3
2250
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, char *IN_msg ); DLLEXPORT long F_BDO_CalculAXplusB(short int *IN_Tab_entree ,int IN_taille , double *OUT_Tab_sortie_freq , double *OUT_Tab_sortie, double IN_A,
0
1056
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 filename = path and exe name of my app. in category Additional DLLs i have add my DLL.and check Try to locate other DLLs when i launch the EVC++ project...it start the VB application.good and EVC
0
973
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 DLL written in eVC++ 4. the pb is i get a "First-chance exception ... Access violation" sometimes...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8695
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5609
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2696
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 we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.