Solved

Hexadecimal value arrives in front of string parameter passed to VB6 class

Posted on 2011-02-21
3
253 Views
Last Modified: 2012-05-11
Hi...

I have this Windows Process project written in VB.Net 2003, which calls a couple of functions from a VB6 class I wrote, with string parameters in both of them

Weird thing is that, when debugging the application, I found that the parameters I send to the class arrive with an hexadecimal value in front of the actual value

Example: I send "0009" and the class receives this: 0x001b6ab4 "0009"

Any hints??

Thanks
0
Comment
Question by:JohnP_Realini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Expert Comment

by:Brook Braswell
ID: 34946737
Could you show the code you use to define and call your class in .net

and show the class with the defined parameter in vb6

It is hard to discern what your potential problem is without knowing how your parameter is defined in vb6.  If it is not defined with any type then it will assume Variant.
0
 
LVL 3

Author Comment

by:JohnP_Realini
ID: 34950677
Thanks for getting into this

In .Net first I add the class as a reference, then I do an Import (Import BioIDdll) and last  instance the class (Private Bio as New BioIDdll.BioID)

Then I start calling the methods sending parameters (all are string) and I receive them in the class with "ByVal", and for what I have been investigatin, the hexadecimal value I am receiving is the memory position pointer

If I change the way I receive it (using ByRef) I only get the pointer, and not the data

The question now is... How do I handle that information, so I can use the data stored in that memory position

Thanks!
0
 
LVL 14

Accepted Solution

by:
Brook Braswell earned 500 total points
ID: 34951229
I am not sure why you are getting the pointer, but perhaps you can mod the vb6 portion to parse out the pointer and keep the value...
Seeing that the value is in double quotes, parsing should be easy.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Introduction to Processes

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question