VFP , mmsystem.dll and low level midi 
Author Message
 VFP , mmsystem.dll and low level midi

Can anyone see what I'm doing wrong here?

set libr to foxtools.fll

outhandle=0

    *results returns 0 so no error. outhandle remains at 0 (no handle
passed)
    *just to make sure, call another function

sendshortmsg=regfn("midiOutShortMsg",'LL','I','mmsystem.dll')
results=callfn(sendshortmsg,outhandle,0)

    *results return 5 invalid handle error

For some reason I'm not getting a handle returned to the "outhandle"
reference.
If anyone can help, please do. (This is being run on ver 5 of VFP)

Thanks in advance
Tim Kolesa



Sat, 09 Aug 2003 20:39:27 GMT  
 VFP , mmsystem.dll and low level midi
Tim,
The midiOutOpen function's 3rd parameter requires a callback address. Since
VFP doesn't support this, you'll need to try a different approach. e.g.
Write the code in a VB .DLL tand then call it in VFP.

Rick


Quote:
> Can anyone see what I'm doing wrong here?

> set libr to foxtools.fll

> outhandle=0

>     *results returns 0 so no error. outhandle remains at 0 (no handle
> passed)
>     *just to make sure, call another function

> sendshortmsg=regfn("midiOutShortMsg",'LL','I','mmsystem.dll')
> results=callfn(sendshortmsg,outhandle,0)

>     *results return 5 invalid handle error

> For some reason I'm not getting a handle returned to the "outhandle"
> reference.
> If anyone can help, please do. (This is being run on ver 5 of VFP)

> Thanks in advance
> Tim Kolesa



Sat, 09 Aug 2003 22:59:05 GMT  
 VFP , mmsystem.dll and low level midi
FWIW, in many cases 0 is a valid handle. Are you sure it isn't working?


Quote:
> Can anyone see what I'm doing wrong here?

> set libr to foxtools.fll

> outhandle=0

>     *results returns 0 so no error. outhandle remains at 0 (no handle
> passed)
>     *just to make sure, call another function

> sendshortmsg=regfn("midiOutShortMsg",'LL','I','mmsystem.dll')
> results=callfn(sendshortmsg,outhandle,0)

>     *results return 5 invalid handle error

> For some reason I'm not getting a handle returned to the "outhandle"
> reference.
> If anyone can help, please do. (This is being run on ver 5 of VFP)

> Thanks in advance
> Tim Kolesa



Sat, 09 Aug 2003 23:57:13 GMT  
 VFP , mmsystem.dll and low level midi
Thanks,

There must be some inaccuracies with the documentation I have. It says that
the callback can be disabled by passing a null value at that parameter, but
interestingly the midiInOpen function which uses the same set of params says
nothing about disabling callback. Guess I'l have to try a different
approach.

Tim


Quote:
> Tim,
> The midiOutOpen function's 3rd parameter requires a callback address.
Since
> VFP doesn't support this, you'll need to try a different approach. e.g.
> Write the code in a VB .DLL tand then call it in VFP.

> Rick



Tue, 12 Aug 2003 20:37:25 GMT  
 VFP , mmsystem.dll and low level midi
Tim,
Digging deeper, I believe you are right about the callback for this function
being optional. If you are using VFP 5.0, you might want to use the DECLARE
DLL functionallity - or at least try using RegFn32() and use the 32-bit
.DLL.


outhandle=0

OR


outhandle=0

Rick


Quote:
> Thanks,

> There must be some inaccuracies with the documentation I have. It says
that
> the callback can be disabled by passing a null value at that parameter,
but
> interestingly the midiInOpen function which uses the same set of params
says
> nothing about disabling callback. Guess I'l have to try a different
> approach.

> Tim



> > Tim,
> > The midiOutOpen function's 3rd parameter requires a callback address.
> Since
> > VFP doesn't support this, you'll need to try a different approach. e.g.
> > Write the code in a VB .DLL tand then call it in VFP.

> > Rick



Tue, 12 Aug 2003 22:07:18 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VFP: Low-Level File Functions

2. opening communications port for use with low level commands in vfp

3. Closing an Open Low-level file

4. Low level file I/O

5. Low-Level accessing parallel ports in FP for DOS

6. Low level file search?

7. Help : Sharing Low Level Files Simultaneously

8. Low-Level accessing parallel ports in FP for DOS

9. Access to Low-Level I/O functions in VFP3.0

10. LPT overrun when using low-level functions?

11. Low-level file routine problem

12. Low-level file routine problem

 

 
Powered by phpBB® Forum Software