🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools
Article #423

Re: unsigned long for VBASIC

#423
From: Joe Robison
Date: Sat, 22 Aug 1992 00:40
21 lines
1280 bytes
In article <9208202215.AA06261@top.magnus.acs.ohio-state.edu> John wrote:
> 
> 
> How can one handle the problem of not having an the "unsigned integer"
> type in visual basic?  I am calling a functions in a DLL which returns
> a unsigned long value.  I need to store this value in a structure and
> pass the structure as a parameter in another DLL function call.
> my failure to this is because Visual Basic doesn't support the unsigned
> type.  Is there a way around this problem?

Just use a Long.  Yes, it's signed, but 32 bits is 32 bits.  If the high
bit is set, then it will look negative in VB, but that doesn't change
the bit pattern (unless you perform math on it).  It's just a matter of
interpretation.  You can pass it on to another function that expects an
unsigned long and it should work fine.

Hope this helps.

Joe Robison
joero@microsoft.com
NAMS (Not A Microsoft Spokeshuman)
Technical Details
Message-ID: <1992Aug22.004022.11241@microsoft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!joero
References: <9208202215.AA06261@top.magnus.acs.ohio-state.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.tools
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!joero
From: joero@microsoft.com (Joe Robison)
Subject: Re: unsigned long for VBASIC
Message-ID: <1992Aug22.004022.11241@microsoft.com>
Date: 22 Aug 92 00:40:22 GMT
Organization: Microsoft Corp.
References: <9208202215.AA06261@top.magnus.acs.ohio-state.edu> 
Lines: 21