Convert VBA dll function call

T

Terry

How would I convert the following please;

Regards

Public Declare Function swe_calc Lib "swedll32.dll" Alias "_swe_calc@24" ( _
ByVal tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef x As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
 
C

Cor Ligthert [MVP]

Terry,

Change all your doubles in integer and all your long in double, than it
probably will go.

Cor
 
H

Herfried K. Wagner [MVP]

Cor Ligthert said:
Change all your doubles in integer and all your long in double, than it
probably will go.

Huh?

Keep all doubles and change 'Long' to 'Int32'.
 
C

Cor Ligthert [MVP]

Herfried,

I knew I was writting something wrong,

Thanks,

However what does that Huh mean here that is said to horses.

Cor
 
H

Herfried K. Wagner [MVP]

Cor Ligthert said:
I knew I was writting something wrong,

Thanks,

However what does that Huh mean here that is said to horses.

To me it simply means that I am wondering about something :).
 
T

Terry

Thanks all for the advice,

Good notes about the variables. I will be porting over some code from a MS
Access VBA application and have quite a number of these functions to
convert.

I intend to try and convert as much of the VBA code into .NET as possible
and find the languages as different as 'chalk and cheese' in large respects,
especially structure. In this respect the VBA application has the functions
in a general module, what would be the best method to code them into a
VB.NET solution?

I am working my way through MCTS 70-536 Training Kit and will be applying
what I have learnt to this project.
Thanks again,

Terry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top