Re: [Wengophone-devel] phapi and Java
Hi, I think to have all necessary dlls. I'm trying to invoke dll from the WengoPhone installed on my system. I wouldn't want to recompile WengoPhone because it doesn't need to be modified. Thanks. Luigi Bancaro Minh Phan wrote: Make sure that you have all the dependency of phapi.dll ((dlls that phapi depends on) in the same directory as phapi.dll. If you compile the whole WengoPhone, all these dlls are in the directory build\debug. Minh -Original Message- From: [EMAIL PROTECTED] [mailto:wengophone- [EMAIL PROTECTED] On Behalf Of Luigi Bancaro Sent: mardi 17 avril 2007 18:12 To: wengophone-devel@lists.openwengo.com Subject: Re: [Wengophone-devel] phapi and Java Thanks, but now I'm trying to use phapi... I'm not very skilled with C and C++... and I'm not able to load the library. If I write: HINSTANCE hDLL; // Handle to DLL hDLL = LoadLibrary(...path to...\\phapi.dll); if (hDLL == 2) printf(phapi.dll does not exist); else if (hDLL = (HINSTANCE)HINSTANCE_ERROR) { printf(Other problems loading phapi.dll); } else { printf(phapi.dll exists); FreeLibrary(hDLL); } I have Other problems loading phapi.dll! What's wrong? Thank you in advance Yannooo wrote: Hi, To call C code from Java you need to use JNI (Java Native Interface). I think it might be pretty interesting to wrap the COIp library rather than phapi. Your program will be able to benefit from all the backend at the same time. Another interesting technology is Qt Jambi (currently in preview). Basically it enables you to use the Qt framework in the Java world. Qt Jambi generator enables you to map an existing C++ project to Java. I hope this link can help you: http://doc.trolltech.com/qtjambi-1.0/com/trolltech/qt/qtjambi- generatorexample.html - Yann Biancheri Luigi Bancaro wrote: Hi All, I have to launch openwengo and start a videocall from a Java application. Is it possible using phapi.dll? Is there a way to establish a communication between my java code and openwengo? I know that I have to write the code to call C functions from Java, but how can I invoke phapi.dll? Is there something that could help me to do this? How can I call and use phapi.dll functions in C or C++? Thank you in advance for your help, Luigi Bancaro ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel
Re: [Wengophone-devel] phapi and Java
Hi, I have found my errors and now I'm able to call phapi.dll from my Java code. Is there a fixed sequence of phapi functions I must call to connect with my SIP account and start a video call? Thanks in advance. Luigi Bancaro Luigi Bancaro wrote: Hi, I think to have all necessary dlls. I'm trying to invoke dll from the WengoPhone installed on my system. I wouldn't want to recompile WengoPhone because it doesn't need to be modified. Thanks. Luigi Bancaro Minh Phan wrote: Make sure that you have all the dependency of phapi.dll ((dlls that phapi depends on) in the same directory as phapi.dll. If you compile the whole WengoPhone, all these dlls are in the directory build\debug. Minh -Original Message- From: [EMAIL PROTECTED] [mailto:wengophone- [EMAIL PROTECTED] On Behalf Of Luigi Bancaro Sent: mardi 17 avril 2007 18:12 To: wengophone-devel@lists.openwengo.com Subject: Re: [Wengophone-devel] phapi and Java Thanks, but now I'm trying to use phapi... I'm not very skilled with C and C++... and I'm not able to load the library. If I write: HINSTANCE hDLL; // Handle to DLL hDLL = LoadLibrary(...path to...\\phapi.dll); if (hDLL == 2) printf(phapi.dll does not exist); else if (hDLL = (HINSTANCE)HINSTANCE_ERROR) { printf(Other problems loading phapi.dll); } else { printf(phapi.dll exists); FreeLibrary(hDLL); } I have Other problems loading phapi.dll! What's wrong? Thank you in advance Yannooo wrote: Hi, To call C code from Java you need to use JNI (Java Native Interface). I think it might be pretty interesting to wrap the COIp library rather than phapi. Your program will be able to benefit from all the backend at the same time. Another interesting technology is Qt Jambi (currently in preview). Basically it enables you to use the Qt framework in the Java world. Qt Jambi generator enables you to map an existing C++ project to Java. I hope this link can help you: http://doc.trolltech.com/qtjambi-1.0/com/trolltech/qt/qtjambi- generatorexample.html - Yann Biancheri Luigi Bancaro wrote: Hi All, I have to launch openwengo and start a videocall from a Java application. Is it possible using phapi.dll? Is there a way to establish a communication between my java code and openwengo? I know that I have to write the code to call C functions from Java, but how can I invoke phapi.dll? Is there something that could help me to do this? How can I call and use phapi.dll functions in C or C++? Thank you in advance for your help, Luigi Bancaro ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel
Re: [Wengophone-devel] phapi and Java
On Wednesday 18 April 2007 17:14, Luigi Bancaro wrote: Hi, I have found my errors and now I'm able to call phapi.dll from my Java code. Is there a fixed sequence of phapi functions I must call to connect with my SIP account and start a video call? Thanks in advance. Luigi Bancaro Hi Luigi, here is a sequence that I use when testing phapi with the python binding: owplInit(1, 5060, 0, 0, , 0) owplConfigAddAudioCodecByName(PCMA/8000) owplConfigAddAudioCodecByName(PCMU/8000) # add your video codec here vlid = owplLineAdd(userid, displayname realm, proxy, 3600) owplLineAddCredential(vlid, userid, password, realm) owplLineRegister(vlid) ... wait until your are registered ... callId = owplCallCreate(vlid) # here you have to play with the 3rd parameter (@see phapi.h:514) owplCallConnect(callId, sipuri, 1) That's all! Regards, -- Mathieu Stute mathieu.stute(at)wengo.com GPG: http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x3EE62B4D pgpb0p2mdcjFZ.pgp Description: PGP signature ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel
Re: [Wengophone-devel] phapi and Java
Hi, To call C code from Java you need to use JNI (Java Native Interface). I think it might be pretty interesting to wrap the COIp library rather than phapi. Your program will be able to benefit from all the backend at the same time. Another interesting technology is Qt Jambi (currently in preview). Basically it enables you to use the Qt framework in the Java world. Qt Jambi generator enables you to map an existing C++ project to Java. I hope this link can help you: http://doc.trolltech.com/qtjambi-1.0/com/trolltech/qt/qtjambi-generatorexample.html - Yann Biancheri Luigi Bancaro wrote: Hi All, I have to launch openwengo and start a videocall from a Java application. Is it possible using phapi.dll? Is there a way to establish a communication between my java code and openwengo? I know that I have to write the code to call C functions from Java, but how can I invoke phapi.dll? Is there something that could help me to do this? How can I call and use phapi.dll functions in C or C++? Thank you in advance for your help, Luigi Bancaro ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel
RE: [Wengophone-devel] phapi and Java
Make sure that you have all the dependency of phapi.dll ((dlls that phapi depends on) in the same directory as phapi.dll. If you compile the whole WengoPhone, all these dlls are in the directory build\debug. Minh -Original Message- From: [EMAIL PROTECTED] [mailto:wengophone- [EMAIL PROTECTED] On Behalf Of Luigi Bancaro Sent: mardi 17 avril 2007 18:12 To: wengophone-devel@lists.openwengo.com Subject: Re: [Wengophone-devel] phapi and Java Thanks, but now I'm trying to use phapi... I'm not very skilled with C and C++... and I'm not able to load the library. If I write: HINSTANCE hDLL; // Handle to DLL hDLL = LoadLibrary(...path to...\\phapi.dll); if (hDLL == 2) printf(phapi.dll does not exist); else if (hDLL = (HINSTANCE)HINSTANCE_ERROR) { printf(Other problems loading phapi.dll); } else { printf(phapi.dll exists); FreeLibrary(hDLL); } I have Other problems loading phapi.dll! What's wrong? Thank you in advance Yannooo wrote: Hi, To call C code from Java you need to use JNI (Java Native Interface). I think it might be pretty interesting to wrap the COIp library rather than phapi. Your program will be able to benefit from all the backend at the same time. Another interesting technology is Qt Jambi (currently in preview). Basically it enables you to use the Qt framework in the Java world. Qt Jambi generator enables you to map an existing C++ project to Java. I hope this link can help you: http://doc.trolltech.com/qtjambi-1.0/com/trolltech/qt/qtjambi- generatorexample.html - Yann Biancheri Luigi Bancaro wrote: Hi All, I have to launch openwengo and start a videocall from a Java application. Is it possible using phapi.dll? Is there a way to establish a communication between my java code and openwengo? I know that I have to write the code to call C functions from Java, but how can I invoke phapi.dll? Is there something that could help me to do this? How can I call and use phapi.dll functions in C or C++? Thank you in advance for your help, Luigi Bancaro ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel
Re: [Wengophone-devel] phapi and Java
Thanks, but now I'm trying to use phapi... I'm not very skilled with C and C++... and I'm not able to load the library. If I write: HINSTANCE hDLL; // Handle to DLL hDLL = LoadLibrary(...path to...\\phapi.dll); if (hDLL == 2) printf(phapi.dll does not exist); else if (hDLL = (HINSTANCE)HINSTANCE_ERROR) { printf(Other problems loading phapi.dll); } else { printf(phapi.dll exists); FreeLibrary(hDLL); } I have Other problems loading phapi.dll! What's wrong? Thank you in advance Yannooo wrote: Hi, To call C code from Java you need to use JNI (Java Native Interface). I think it might be pretty interesting to wrap the COIp library rather than phapi. Your program will be able to benefit from all the backend at the same time. Another interesting technology is Qt Jambi (currently in preview). Basically it enables you to use the Qt framework in the Java world. Qt Jambi generator enables you to map an existing C++ project to Java. I hope this link can help you: http://doc.trolltech.com/qtjambi-1.0/com/trolltech/qt/qtjambi-generatorexample.html - Yann Biancheri Luigi Bancaro wrote: Hi All, I have to launch openwengo and start a videocall from a Java application. Is it possible using phapi.dll? Is there a way to establish a communication between my java code and openwengo? I know that I have to write the code to call C functions from Java, but how can I invoke phapi.dll? Is there something that could help me to do this? How can I call and use phapi.dll functions in C or C++? Thank you in advance for your help, Luigi Bancaro ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel ___ Wengophone-devel mailing list Wengophone-devel@lists.openwengo.com http://dev.openwengo.com/mailman/listinfo/wengophone-devel