10-26-2004 03:06 PM
10-27-2004 09:20 AM
10-27-2004 12:06 PM
10-28-2004 05:36 PM
10-29-2004
06:24 PM
- last edited on
12-01-2025
06:45 PM
by
Content Cleaner
Hi Peter,
Have you read the following tutorial: An Overview of Accessing DLLs or Shared Libraries from LabVIEW?
If you post the DLL and the header file, maybe we will be able to help you. The VB code will also make helping you easier.
�Just in case you are still interested in calling the DLL with LabVIEW.
Best regards,
Philip C.
Applications Engineer
National Instruments
10-30-2004
03:36 PM
- last edited on
12-01-2025
06:46 PM
by
Content Cleaner
On Fri, 29 Oct 2004 18:24:17 -0500 (CDT), "Philip C."
wrote:
>Hi Peter,
>
>Have you read the following tutorial:
>An
>Overview of Accessing DLLs or Shared Libraries from LabVIEW?
>
>If you post the DLL and the header file, maybe we will be able to help
>you. The VB code will also make helping you easier.
>
>
>�Just in case you are still interested in calling the DLL with
>LabVIEW.
>
>Best regards,
>Philip C.
>Applications Engineer
>National Instruments
Hi Philip (according to your sig you must be the cavalry)
It was a one time job, so I am OK now, after doing it in VB.
It would however be interesting to know how it should have been done
in Labview. I already seen the tutorial, but I could not find the
right information.
My impression is that what I needed was a double char pointer
( char**).
I just could not find a way to do that in Labview, but please tell me
if I am missing something.
The DLL is an API for OziExplorer. Together with some examples it can
be downloaded from www.oziexplorer.com:
http://216.218.220.254/oziapi/oziapi_examples.zip
Technical info on the API:
http://216.218.220.254/oziapi/oziapi_docs.html
The function I was trying to call:
function oziLoadMap(var MapName:pansichar):integer;stdcall;
My guess is that I need to use stdcall(WINAPI).
Return is int32.
MapName is ?????
I could get it to work for functions from the same DLL that returned a
pansichar, but for some vague reason the author chose to pass the
variable by refernce instead of value.
in the C-example code in the zip you can see that this is a char**.
I tried about every combination, but i could not get more than
'excpection occured in the external application' or a message from the
other application that it could not find the file 'q234sgvsfv]
p=Ѧ?' (just non-sense).
In VB it was just:
Declare Function oziLoadMap Lib "oziapi" (ByRef Filename As String) As
Long
Dim MapName As String
LoadMap(MapName)
It worked like a charm.
If you got an answer; I am ready to learn.
Peter
Peter
11-01-2004 06:29 PM