469,646 Members | 1,731 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

Convert VBA dll function call

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
Jan 1 '07 #1
5 2854
Terry,

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

Cor

"Terry" <yo**********@REMOVETHISntlworld.comschreef in bericht
news:OF**************@TK2MSFTNGP04.phx.gbl...
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


Jan 2 '07 #2
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
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'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 2 '07 #3
Herfried,

I knew I was writting something wrong,

Thanks,

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

Cor

"Herfried K. Wagner [MVP]" <hi***************@gmx.atschreef in bericht
news:eS**************@TK2MSFTNGP03.phx.gbl...
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
>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'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 2 '07 #4
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
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 :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 2 '07 #5
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
>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 :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 3 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Michael Stevens | last post: by
2 posts views Thread by Franck | last post: by
1 post views Thread by Mark Hollander | last post: by
65 posts views Thread by kyle.tk | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.