Thank you everybody for your replies, that helps me a lot!

Originally Posted by
kkrish
Hi kkrish,
I have already looked at this example but could not make it work, that seems quite too complicated for me, and I only want to play a video file so the real Player app is enough for me (if I can make it work, of course).
The main problem with this example is that it is not a simple video player example but is also speaking about camera, recording and all that stuff; and it is quite complicated for me to find in the few code lines I am looking for...

Originally Posted by
peter_k_john
Hi Peter,
This is really a good link for me and I thought it would be the solution... until I have tested it and realized it was not working in my code... I am not able to find the bug but maybe you should tell me what is wrong in my modifications?
Code:
RApaLsSession session;
User::LeaveIfError(session.Connect());
CleanupClosePushL(session);
// Gets the UID and MIME type for the given file name.
TUid uid;
TDataType dataType;
TPtrC8 ptrc8((TUint8*)"C:\\private\\F0205D9F\\matrix-ping-pong.3gp");//path);//
TFileName aFileName;
aFileName.Copy(ptrc8);
User::LeaveIfError(session.AppForDocument(aFileName, uid, dataType));
// Runs the default application using the MIME type, dataType.
// You can also use the UID to run the application.
TThreadId threadId;
User::LeaveIfError(session.StartDocument(aFileName, dataType, threadId));
CleanupStack::PopAndDestroy(); // session
(I have realized that I was completely wrong with the UID I gave you in my first post in this topic, looks like it is F0205FD9F or 10205FD9F but no one is working.)
The result of this code is a call of RealPlayer like I had before, that means the main RealPlayer page and not the video I ask for to be played...

Originally Posted by
kis_spn
hi pwiit...
Try to this code hope It'll help you....
CDocumentHandler *iDocHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() );
CleanupStack::PushL(iDocHandler);
TDataType data = TDataType(KNullUid);
TBuf<256>param;
param.Copy(_L("c:\\Nokia\\Videos\\sample.3gp"));
iDocHandler->OpenFileEmbeddedL(param,data);
CleanupStack::PopAndDestroy();
add this header file .....
#include <documenthandler.h>
and lib....commonui.lib
I have tried your code, which is for the moment giving to me the best results, as I have Real Player starting on a specific window that really seems to be the one of the video playing... the only problem is that it is exiting at the moment it should start playing my video :'(. I give you my modified code for information, if you see a problem:
Code:
CDocumentHandler *iDocHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() );
CleanupStack::PushL(iDocHandler);
TDataType data = TDataType(KNullUid);
TBuf<256>param;
param.Copy(_L("C:\\private\\F0205D9F\\matrix-ping-pong.3gp"));
iDocHandler->OpenFileEmbeddedL(param,data);
CleanupStack::PopAndDestroy();
Anyway, thank you three for your replies, I am nearer than I have ever been of making it! I think that my problem should be in the path I give to realplayer (I don't believe it but after all I was sure about a completly wrong UID one hour ago...) but if you see a bug in my piecs of code, please tell me...
Thank you again!