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
Solved

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

Posted on 2011-02-21
3
250 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 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
This is about my first experience with programming Arduino.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

838 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