Well, I got that job programming in MS Access, you don't have to feel
sorry for me though! I have bought PB/DLL to speed up my programs
and it works well. But! I am having to code around several problems
that I am sure I shouldn't have to do. So what am I doing wrong.
The first project I have been given is a data takeon program from
a system that is so old that it still uses big endian numbers what
a perfect use for my newly aquired DLL compiler
I read the file as a string (Binary) convert to small endian and
to my main function as a LONG, INT, whatever.
except the whatever does not work.
an example.
and it works a dream.
doesn't work
my workaround:
from VBA call the convertLong function that works then
Why can i return a long to VBA then convert it to Currency but I
cannot divide by 100 and return a currency from within PB/DLL.
according to the help file both PB and VB VBA use the same format
for currency as long as I avoid cux.
This should be so simple. I feel like a real idiot.
------------------
sorry for me though! I have bought PB/DLL to speed up my programs
and it works well. But! I am having to code around several problems
that I am sure I shouldn't have to do. So what am I doing wrong.
The first project I have been given is a data takeon program from
a system that is so old that it still uses big endian numbers what
a perfect use for my newly aquired DLL compiler

I read the file as a string (Binary) convert to small endian and
to my main function as a LONG, INT, whatever.
except the whatever does not work.
an example.
Code:
function ConvertLong alias "convertLong"(arg as string) as long dim lngTemp as long 'convert the string to small endian here then convert to 'a long using a union function = lngTemp end function
Code:
function ConvertCurr alias "convertCurr"(arg as string) as currency dim lngTemp as long dim curTemp as cur 'convert the string to small endian here then convert to 'a long using a union curTemp = lngtemp/100 function = curTemp end function
my workaround:
from VBA call the convertLong function that works then
Code:
curVariable = ccur(lngResult/100)
cannot divide by 100 and return a currency from within PB/DLL.
according to the help file both PB and VB VBA use the same format
for currency as long as I avoid cux.
This should be so simple. I feel like a real idiot.

------------------
Comment