Re: Unsigned 32 bit
From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 09/25/04
- Previous message: Jeff Johnson [MVP: VB]: "Re: Poor VB Programming"
- In reply to: Galen Somerville: "Re: Unsigned 32 bit"
- Next in thread: Ulrich Korndoerfer: "Re: Unsigned 32 bit"
- Reply: Ulrich Korndoerfer: "Re: Unsigned 32 bit"
- Reply: Galen Somerville: "Re: Unsigned 32 bit"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 25 Sep 2004 02:28:32 -0400
I'm reading through a MASM manual dated from 1992.
I'm reading stuff about implicit and explicit loading and
such... My goal is to compile the information you've
provided into a DLL. This is my first time working with
assembly to compile a DLL. I'm working with MASM
6.15.8803.
I'm not sure how much of this MASM Programmer's Guide
applies to Win2K/WinXP. I believe most things conform
to a C style parameter passing, but the MASM book is
providing:
DLLEntry PROC FAR PASCAL PUBLIC ;Entry point for DLL
...
DLLEntry ENDP
It refers to Windows 3.0 :-). If I can get some help in
the way of some explanations about the calling conventions,
that would be great. Some general comments about it.
What I've configured so far is...
http://www.microcosmotalk.com/library/files/AddLng.asm
The text in the book mentions PASCAL, and I changed it
from PASCAL to C. Thanks for your time and troubles.
--
Jim Carlock
Post replies to the newsgroup.
"Galen Somerville" wrote:
"Jim Carlock" wrote:
> I'm looking through some TypeLib stuff at the moment,
> using the MIDL compiler. I've looked over some things
> already involving the converting to four bytes and
> putting into a Type declaration... that's not what I'm
> looking to achieve though. I'm looking for a way to
> create an REAL unsigned 32-bit and 64-bit type,
> where CDec(), CLng() and such don't have to be
> used. And if that can be achieved, the next goal
> would be to overload the +, -, / and other operators.
>
> I want to avoid using the type casting functions, Cxxx(),
> maybe create a Cui4() or Cui8().
>
> Some of the things I've already looked through:
>
>
Public Declare Sub LNGADD Lib "ARYASM" (ByVal lngQuan As Long, _
ByRef lngDest As Long, ByRef lngFirst As Long, _
ByRef lngSecond As Long, ByRef gbytError As Byte)
Private Sub AddLng_Click()
Dim Value As Long, Temp As Long, Msg As String, Max As Long
ReDim lngDest(4)
ReDim lngFirst(4)
ReDim lngSecond(4)
Value = 99992
For Index = 0 To 4
lngFirst(Index) = Value
lngSecond(Index) = Index + 5
Next Index
lngQuan = 5
Call LNGADD(lngQuan, lngDest(0), lngFirst(0), lngSecond(0), _
gbytError)
If gbytError = 1 Then Msg = "Overflow occurred"
For Index = 0 To 4
Temp = lngDest(Index) 'So you can see in debug
Next Index
End Sub
I'm not shouting. That's just the way the routine was written. If you want
the ARYASM dll let me know
Galen
- Previous message: Jeff Johnson [MVP: VB]: "Re: Poor VB Programming"
- In reply to: Galen Somerville: "Re: Unsigned 32 bit"
- Next in thread: Ulrich Korndoerfer: "Re: Unsigned 32 bit"
- Reply: Ulrich Korndoerfer: "Re: Unsigned 32 bit"
- Reply: Galen Somerville: "Re: Unsigned 32 bit"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|