Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-21
3
Medium Priority
?
259 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
  • 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 2000 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

Independent Software Vendors: 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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Progress

971 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