473,397 Members | 1,985 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,397 software developers and data experts.

Data type conversion problem. HELP [urgent]

Hui
Hi gurus,

I'm having data conversion (marshalling) problems with VB.NET DLL calling a old C DLL. The problem is that when the return type is a Long, I'm getting some garbage large number. eg. 921312343243543 or -3123904538

I've tried both Declare and DllImport but getting the same error. I've tried MarshalAs(UnmanagedType.U8) but no help. Convert.UInt64 doesn't do it either.

This is really odd as return type of int and boolean seems to work just fine. And I can even pass in a Long data type.

I can't dive into the old C code, but it is know to be working from Lotus Notes.

Any help is appreciated!

Hui
Jul 21 '05 #1
1 1357
Hui
No one's had a similar problem? Why do I always get the "weird" errors... ;(

Hui

"Hui" wrote:
Hi gurus,

I'm having data conversion (marshalling) problems with VB.NET DLL calling a old C DLL. The problem is that when the return type is a Long, I'm getting some garbage large number. eg. 921312343243543 or -3123904538

I've tried both Declare and DllImport but getting the same error. I've tried MarshalAs(UnmanagedType.U8) but no help. Convert.UInt64 doesn't do it either.

This is really odd as return type of int and boolean seems to work just fine. And I can even pass in a Long data type.

I can't dive into the old C code, but it is know to be working from Lotus Notes.

Any help is appreciated!

Hui

Jul 21 '05 #2

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

Similar topics

10
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
1
by: Hui | last post by:
Hi gurus, I'm having data conversion (marshalling) problems with VB.NET DLL calling a old C DLL. The problem is that when the return type is a Long, I'm getting some garbage large number. eg....
4
by: michael sorens | last post by:
I have successfully bound an XmlDocument to a DataGridView but all fields seem to be strings. I want to retrofit appropriate datatypes on some of the fields. Let me take this in 2 parts. Part...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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.