Board index » delphi » dll and mediaplayer

dll and mediaplayer

I have a dll writen in delphi1, and have the tmediaplayer1 in the dll, when
other program call my dll and pass Pchar to the mediaplayer's file name,
then when it is open, I get the error message which tells the mediaplayer
can be open because the name is wrong.
any idea what is wrong?
 

Re:dll and mediaplayer


Quote
delphi wrote in message <7190j1$gg...@forums.borland.com>...
>I have a dll writen in delphi1, and have the tmediaplayer1 in the dll, when
>other program call my dll and pass Pchar to the mediaplayer's file name,
>then when it is open, I get the error message which tells the mediaplayer
>can be open because the name is wrong.
>any idea what is wrong?

Can't help directly (not enough info), but this sort of thing is usually
quite easy to debug. Simply have your DLL function call ShowMessage
to display the filename. If the PChar is getting mangled or truncated
in some way, you'll see straight away.

Sadly, with D1 you can't step through DLL code when it's called
from another app, but another debugging trick is to have the DLL
create a text file, and periodically write what it's doing, and the
contents of the variables.

If that fails, post some code.
--
Jeremy Collins
Kansai Business Systems

Other Threads