PC Review


Reply
Thread Tools Rate Thread

Data type conversion problem. HELP [urgent]

 
 
=?Utf-8?B?SHVp?=
Guest
Posts: n/a
 
      22nd Jul 2004
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SHVp?=
Guest
Posts: n/a
 
      24th Jul 2004
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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. M. Bruil Microsoft Access 2 26th Mar 2009 08:30 AM
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. M. Bruil Microsoft Access 0 25th Mar 2009 08:10 PM
newbie Conversion type Problem urgent =?Utf-8?B?RGF2aWRlUg==?= Microsoft VC .NET 2 7th Dec 2005 10:22 AM
Excel VBA - Data Type Conversion problem PaulC Microsoft Excel Programming 3 10th May 2004 04:53 PM
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. luna Microsoft ASP .NET 1 13th Feb 2004 01:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 AM.