LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Legacy Dialup Testing on Satellite Phones - help needed importing function RasEnumConnectionsA rasapi32.dll

Hello,  we are performing legacy dial up validation on satellite phones.  Setting the phone up as a modem and doing FTP puts and gets.    QTY:  Thousands of times per week.   

one.gif

Can someone enlighten me as to whether or not I have to get a wrapper DLL  written by some C programmer so I can use the function RasEnumConnectionsA  from the rasapi32.dll ???  (See attached ras.h header file and dll).  

 

 

SYNTAX.gif

ACCORDING TO MSDN -  this function passes an arrary of this structure:

rasconn_structue.gif

Tried to import the library using the wizard - here is what happened:

two.giffour.gif
three.gif

Brad Whaley
LabVIEW Certified Engineer
0 Kudos
Message 1 of 4
(2,266 Views)

bdwhaley,

 

One option would be to try opening this dll in another program. This would tell you if there is something wrong with how it is set up to open in LabVIEW.

 

As for the preprocessing definitions, you would probably have to get more information regarding how the methods inside that Windows library are made to be accessed.

 

VanCamp

0 Kudos
Message 2 of 4
(2,227 Views)

Hello,  thanks for the help,  how can I try the dll in another program?   Do you mean I would have to use  the Microsoft Windows Software Development Kit (SDK) or a development environment that includes the Windows SDK, such as Microsoft Visual C++, or Microsoft Visual Studio?

 

Can you please confirm if the "Import shared library"   utility  can be configured with  preprocessing parameters  so that it will be successfull?  Do I have to write a wrapper?    If yes - do you know of some one I can pay to do this for me?  

 

Bradley 

Brad Whaley
LabVIEW Certified Engineer
0 Kudos
Message 3 of 4
(2,207 Views)

Yes! While you could add a few dozen preprocessor definitions to get the import Library Wizard to start to recognize some of the functions, trying to interface that API directly from LabVIEW will require you to know more about how a C compiler creates code to interface to this function than many C programmers would know. Meaning you need to know more than the average C programmer you can hire to write this wrapper DLL for you.

 

Incidentally I did write at some point a VI library and according CIN (some C code necessary to interface to external code before the Call Library Node was introduced to interface to DLLs) to interface to the RAS API. That was over 20 years ago. Unfortunately that CIN does not work anymore in recent versions of LabVIEW. Porting the C code for that CIN into a DLL would be possible but not exactly trivial. If you really want to pursue this you can contact me over PM on this site.

As RAS is more than legacy nowadays I never had considered to revisit that library and update it to work in newer LabVIEW versions. 🙂

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(2,204 Views)