473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 3039
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bwooster47 | last post by:
I'm a newcomer to python - what is the best way to convert a list into a function call agruments? For example: list = (2005, 5, 5) date = datetime.date( list ) fails with: TypeError:...
5
by: Michael Stevens | last post by:
Probably the wrong wording but since I'm not a scripter I won't claim to know what I'm talking about. I got this script from www.htmlgoodies.com <script language="JavaScript"> <!--...
4
by: Eric Lilja | last post by:
Hello, I've made a templated class Option (a child of the abstract base class OptionBase) that stores an option name (in the form someoption=) and the value belonging to that option. The value is...
3
by: ET | last post by:
I don't know whats the problem, but after I added functions to first verify, then relink linked tables if not found, now I can't convert that database to MDE format. I can split the database, but...
2
by: Franck | last post by:
Hi, 'm gettin mad about date conversion. Here is the point. Got and add-in for Excel which call functions from a web service (on a remote server) The remote server has regional settings...
1
by: Mark Hollander | last post by:
Hi All, Could you please help me convert this code so that it will run in VB.NET Thank You Mark Hollander Private Type USER_INFO Name As String
65
by: kyle.tk | last post by:
I am trying to write a function to convert an ipv4 address that is held in the string char *ip to its long value equivalent. Here is what I have right now, but I can't seem to get it to work. ...
8
by: Serge BRIC | last post by:
My application, written in .NET VB, tries to get a communication port handle from a TAPI object with this code: Dim vFileHandle As Byte() = appel.GetIDAsVariant("comm/datamodem") The...
15
by: Steve | last post by:
I am having problems getting values out of an array. The array is set as a global array and values are pushed into it as they are read from a JSON file using a "for loop". When the "for loop" is...
19
by: est | last post by:
From python manual str( ) Return a string containing a nicely printable representation of an object. For strings, this returns the string itself. The difference with repr(object) is that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.