Connecting Tech Pros Worldwide Help | Site Map

How to use a DLL in MS-Access VBA

  #1  
Old February 27th, 2007, 10:45 PM
nmanausa@gmail.com
Guest
 
Posts: n/a
I am programming an Access database for a blind co-worker. I need to
plug in a DLL, but I've never done it before.

Here's all the information that is available (after hours of
Googling):

http://blindprogramming.com/pipermai...ry/005286.html

The purpose of this DLL is to pass a string to the DLL which in turns
speaks the string through a JAWS reader to the user.

I've tried for hours, but pardon the pun, "I'm flying blind".

There are two DLL's that are referenced: JFWAPI.DLL and JFWAPICtrl.dll
the routine in the library I am trying to use is JFWSayString.

JFWAPI.DLL will not load through the Tools>References, but
JFWAPICtrl.dll will load.

Any help would be greatly appreciated.

Thanks,

Neil

  #2  
Old February 27th, 2007, 10:55 PM
storrboy
Guest
 
Posts: n/a

re: How to use a DLL in MS-Access VBA


On Feb 27, 5:33 pm, nmana...@gmail.com wrote:
Quote:
I am programming an Access database for a blind co-worker. I need to
plug in a DLL, but I've never done it before.
>
Here's all the information that is available (after hours of
Googling):
>
http://blindprogramming.com/pipermai...programming.co...
>
The purpose of this DLL is to pass a string to the DLL which in turns
speaks the string through a JAWS reader to the user.
>
I've tried for hours, but pardon the pun, "I'm flying blind".
>
There are two DLL's that are referenced: JFWAPI.DLL and JFWAPICtrl.dll
the routine in the library I am trying to use is JFWSayString.
>
JFWAPI.DLL will not load through the Tools>References, but
JFWAPICtrl.dll will load.
>
Any help would be greatly appreciated.
>
Thanks,
>
Neil

For starters they must be registered on the computer. This is usually
done when a program is installed but there is a Windows utility you
can use to do it manually. Go to Start Run and in the dialog box
type in ...

regsvr32.exe "InsertPathToFile\JFWAPI.DLL"

A message should appear telling you if the file was registered
sucessfully.

Secondly, the resource must expose parts of itself in order for you to
use them. Just because it's registered on the computer or referenced
in the database dosen't mean its usable. I would guess you have
documentation telling you what you can access in each file?

  #3  
Old February 28th, 2007, 01:25 AM
Stephen Lebans
Guest
 
Posts: n/a

re: How to use a DLL in MS-Access VBA


The library JFWAPI.DLL is a standard Windows library and not a COM object.
You do not and cannot set a reference to it from within Access.

I spent a few minutes tonight trying to get the control or the standard API
interface to work from an Access form. I cannot test this properly as I do
not have JAWS installed and running on this system.

Here's the code I used for the API library interface. I left in the code for
calling the SayString method of the Jaws Com control interface I inserted
onto a form.



Private Declare Function apiJFWSayString Lib "C:\SourceCode\JAWS\JFWAPI.DLL"
_
Alias "JFWSayString" (ByVal lpszStrinToSpeak As String, bInterrupt As
Boolean) As Boolean


Private Sub cmdPlaySound_Click()
On Error GoTo Err_cmdPlaySound_Click

Dim s As String
s = "Hello, wow, you are a Good Looking Guy!"
s = s & s & s & s
Set JW = Me.ActiveXCtl0.Object ' JFWApi
' JW.Enable 0
Dim blRet As Boolean

blRet = apiJFWSayString(s, True)
'JW.SayString s, False


'Me.ActiveXCtl0.Object.SayString s, True

Exit_cmdPlaySound_Click:
Exit Sub

Err_cmdPlaySound_Click:
MsgBox Err.Description
Resume Exit_cmdPlaySound_Click

End Sub

Private Sub Form_Load()
'Dim JW As JFWApi


End Sub
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


<nmanausa@gmail.comwrote in message
news:1172615606.241107.262970@z35g2000cwz.googlegr oups.com...
Quote:
>I am programming an Access database for a blind co-worker. I need to
plug in a DLL, but I've never done it before.
>
Here's all the information that is available (after hours of
Googling):
>
http://blindprogramming.com/pipermai...ry/005286.html
>
The purpose of this DLL is to pass a string to the DLL which in turns
speaks the string through a JAWS reader to the user.
>
I've tried for hours, but pardon the pun, "I'm flying blind".
>
There are two DLL's that are referenced: JFWAPI.DLL and JFWAPICtrl.dll
the routine in the library I am trying to use is JFWSayString.
>
JFWAPI.DLL will not load through the Tools>References, but
JFWAPICtrl.dll will load.
>
Any help would be greatly appreciated.
>
Thanks,
>
Neil
>

  #4  
Old February 28th, 2007, 07:45 PM
Typehigh
Guest
 
Posts: n/a

re: How to use a DLL in MS-Access VBA


On Feb 27, 8:19 pm, "Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdot...@linvalid.comwrote:
Quote:
The library JFWAPI.DLL is a standard Windows library and not a COM object.
You do not and cannot set a reference to it from within Access.
>
I spent a few minutes tonight trying to get the control or the standard API
interface to work from an Access form. I cannot test this properly as I do
not have JAWS installed and running on this system.
>
Here's the code I used for the API library interface. I left in the code for
calling the SayString method of the Jaws Com control interface I inserted
onto a form.
>
Private Declare Function apiJFWSayString Lib "C:\SourceCode\JAWS\JFWAPI.DLL"
_
Alias "JFWSayString" (ByVal lpszStrinToSpeak As String, bInterrupt As
Boolean) As Boolean
>
Private Sub cmdPlaySound_Click()
On Error GoTo Err_cmdPlaySound_Click
>
Dim s As String
s = "Hello, wow, you are a Good Looking Guy!"
s = s & s & s & s
Set JW = Me.ActiveXCtl0.Object ' JFWApi
' JW.Enable 0
Dim blRet As Boolean
>
blRet = apiJFWSayString(s, True)
'JW.SayString s, False
>
'Me.ActiveXCtl0.Object.SayString s, True
>
Exit_cmdPlaySound_Click:
Exit Sub
>
Err_cmdPlaySound_Click:
MsgBox Err.Description
Resume Exit_cmdPlaySound_Click
>
End Sub
>
Private Sub Form_Load()
'Dim JW As JFWApi
>
End Sub
--
>
HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
>
<nmana...@gmail.comwrote in message
>
news:1172615606.241107.262970@z35g2000cwz.googlegr oups.com...
>
>
>
Quote:
I am programming an Access database for a blind co-worker. I need to
plug in a DLL, but I've never done it before.
>
Quote:
Here's all the information that is available (after hours of
Googling):
>>
Quote:
The purpose of this DLL is to pass a string to the DLL which in turns
speaks the string through a JAWS reader to the user.
>
Quote:
I've tried for hours, but pardon the pun, "I'm flying blind".
>
Quote:
There are two DLL's that are referenced: JFWAPI.DLL and JFWAPICtrl.dll
the routine in the library I am trying to use is JFWSayString.
>
Quote:
JFWAPI.DLL will not load through the Tools>References, but
JFWAPICtrl.dll will load.
>
Quote:
Any help would be greatly appreciated.
>
Quote:
Thanks,
>
Quote:
Neil- Hide quoted text -
>
- Show quoted text -
_____________________________

Stephen,

You are my hero!

It worked like a charm.

Neil


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to collect the summary info from the file properties =?Utf-8?B?QXJ0?= answers 2 August 1st, 2008 02:45 PM
using C# dll as COM Thomson answers 2 January 5th, 2006 06:35 AM
using dll from word Han Sen answers 10 November 21st, 2005 10:18 AM
Python interpreter in Basic or a Python-2-Basic translator. Engineer answers 6 July 19th, 2005 01:48 AM
Help me choose a C++ compiler to work with Python rhmd answers 12 July 18th, 2005 04:08 AM