Newbie question: Calling DLLs with Alias 
Author Message
 Newbie question: Calling DLLs with Alias

Sorry if this has been answered before...

What I want to do is to control a measuring instrument using labview.
The instrument vendor provides access to the instrument's functionality
through various DLLs. There are templates to write custom programs with
VB and VC++. In these templates, a VB module serves as "glue code"
between VB and the DLL. In it, a typical DLL function is declared as
follows:
Declare Function foo Lib "XYZ" (....)
These are EXPORTED functions. I can access these directly through
LabVIEW.

The problem is that some other functions are declared as
Declare Function foo2 Lib "XYZ" Alias "#1016" (...)

These functions are NOT exported, and so are not available to LabVIEW.
What does Alias "#1016" mean?
Is there a way to access these functions? The best idea I could come up
with is to write a DLL in VB which would now export those "aliased"
functions. Would this work? And how would I proceed?

TIA, any help appreciated!

--
--germ



Mon, 17 May 2004 15:10:55 GMT  
 Newbie question: Calling DLLs with Alias

Quote:

> Declare Function foo Lib "XYZ" (....)
> These are EXPORTED functions. I can access these directly through
> LabVIEW.

> The problem is that some other functions are declared as
> Declare Function foo2 Lib "XYZ" Alias "#1016" (...)

DLL functions may not have a name, but they always have a number, such
as "#1016".  I wonder just what those jokers were thinking by relying
on the ordinal number instead of giving the function a proper name.

Quote:
> These functions are NOT exported, and so are not available to LabVIEW.
> What does Alias "#1016" mean?
> Is there a way to access these functions? The best idea I could come up
> with is to write a DLL in VB which would now export those "aliased"
> functions. Would this work? And how would I proceed?

Can LabVIEW use ActiveX DLLs?  If so, you're in luck!  Create an ActiveX
DLL project, add the instrument vendor's template module, and create
wrapper functions in the class module for each of the functions in the
template module.  The class module's Instancing property should be 5,
MultiUse, or 6, GlobalMultiUse.  Once you've compiled the DLL, you can
use the REGSVR32.EXE utility to set it up in the registry.

--
Joe Foster <mailto:jlfoster%40znet.com>  DC8s in Spaace: <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Mon, 17 May 2004 15:57:21 GMT  
 Newbie question: Calling DLLs with Alias
On Wed, 28 Nov 2001 23:57:21 -0800, "Joe \"Nuke Me Xemu\" Foster"

Quote:
>DLL functions may not have a name, but they always have a number, such
>as "#1016".  I wonder just what those jokers were thinking by relying
>on the ordinal number instead of giving the function a proper name.

Remember the article about undocumented shell functions ? Most of
those API calls were just ordinals. I would assume that they export
certain functions as ordinals only for safety reasons.

        J.
        Jeremiah D. Seitz
        Porch karaoke king and the guy who runs with 8< scissors >8
        Omega Techware
        http://omegatechware.hypermart.net



Tue, 18 May 2004 05:19:17 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Newbie question - trying to call fortran dll from VB

2. Calling a method in a vb dll from html page - newbie question

3. Recherche dll plus rapide que winmm.dll alias sndPlaySoundA pour lire fichier son

4. .DLL newbie question - detecting external DLL's?

5. 32 bit API call not recognizing Alias Name

6. newbie needs help with calling a DLL

7. newbie: How to call ActiveX DLL by HTTP

8. Newbie calling a DLL in VB 6 ...

9. Newbie needs help calling DLL

10. Newbie - Calling a DLL Subroutine

11. Newbie needs help with DLL calling...

12. 2 PRBS: Calling 16 bit DLL from VB5 and Bad DLL Calling Convention

 

 
Powered by phpBB® Forum Software