|
why do you insist on doing it the hard way? polling every 100 ms IMO won't be any slower from your point of view.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
The project is an EXE application. But the linker always creates a *.lib file, as if it was a dll project.
--------------------Configuration: MyProject - Win32 Release--------------------
Linking...
Creating library Release\MyProject.lib and object Release\MyProject.exp
MyProject.exe - 0 error(s), 0 warning(s)
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: But the linker always creates a *.lib file, as if it was a dll project.
You are exporting some symbols from the exe, that's the reason IMO.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
It seems that you are right, i dumped the lib and exp files, and they all show functions from the CxImage library (which is included in the project). How do I fix it?
Here's an excerpt of the dump of MyProject.exp - it's too long to post all of it:
01A1h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageJPG::CxExifInfo::CxExifInfo(struct CxImageJPG::tag_ExifInfo *)
01A2h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxFile::CxFile(class CxFile const &)
01A3h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxFile::CxFile(void)
01A4h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxIOFile::CxIOFile(class CxIOFile const &)
01A5h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxIOFile::CxIOFile(struct _iobuf *)
01A6h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(class CxImage const &,bool,bool,bool)
01A7h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(unsigned long)
01A8h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(unsigned long,unsigned long,unsigned long,unsigned long)
01A9h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(unsigned char *,unsigned long,unsigned long)
01AAh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(struct _iobuf *,unsigned long)
01ABh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(class CxFile *,unsigned long)
01ACh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImage::CxImage(char const *,unsigned long)
01ADh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageGIF::CxImageGIF(class CxImageGIF const &)
01AEh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageGIF::CxImageGIF(void)
01AFh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageJPG::CxImageJPG(class CxImageJPG const &)
01B0h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageJPG::CxImageJPG(void)
01B1h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageTIF::CxImageTIF(class CxImageTIF const &)
01B2h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxImageTIF::CxImageTIF(void)
01B3h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxMemFile::CxMemFile(class CxMemFile const &)
01B4h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxMemFile::CxMemFile(unsigned char *,unsigned long)
01B5h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxPoint2::CxPoint2(class CxPoint2 const &)
01B6h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxPoint2::CxPoint2(float,float)
01B7h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxPoint2::CxPoint2(void)
01B8h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxRect2::CxRect2(class CxRect2 const &)
01B9h UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxRect2::CxRect2(float,float,float,float)
01BAh UNDEF 00000000h 0000h EXTERNAL public: __thiscall CxRect2::CxRect2(void)
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
I guess this class must be imported instead of exported since IMO it's an external library which you are using. You might have defined some macros which you shouldn't.
Let me guess!
#if defined _EXPORT_FROM_DLL
#define EXPORT_IMPORT __declspec(dllexport)
#else
#define EXPORT_IMPORT __declspec(dllimport)
#endif
class EXPORT_IMPORT CxImage
{
}
So somewhere _EXPORT_FROM_DLL is getting defined which forces an export.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
I found very similar constructs in one of the headers in the CxImage library. I have _AFXDLL defined because the project uses MFC as a shared dll. So should I just remove the condition?
#if defined(_AFXDLL)||defined(_USRDLL)
#define DLL_EXP __declspec(dllexport)
#elif defined(_MSC_VER)&&(_MSC_VER<1200)
#define DLL_EXP __declspec(dllimport)
#else
#define DLL_EXP
#endif
...
class DLL_EXP CxFile
{
...
};
...
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: #elif defined(_MSC_VER)&&(_MSC_VER<1200)
I am not sure of this line since VC6 has _MSC_VER set to 1200 so will this code ever expand to __declspec(dllimport)?
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
I don't think so either, but I defined it explicitly to see what happens
#define DLL_EXP __declspec(dllimport)
, and there are several errors and warnings:
Linking...
Creating library Debug\MyProject.lib and object Debug\MyProject.exp
LINK : warning LNK4049: locally defined symbol ""public: void * __thiscall CxImage::GetDIB(void)const " (?GetDIB@CxImage@@QBEPAXXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall CxImage::SetJpegQuality(unsigned char)" (?SetJpegQuality@CxImage@@QAEXE@Z)" imported
...
error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall CxImage::Encode(class CxFile *,unsigned long)" (__imp_?Encode@CxImage@@QAE_NPAVCxFile@@K@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall CxImage::Encode(class CxFile *,unsigned long)" (__imp_?Encode@CxImage@@QAE_NPAVCxFile@@K@Z)
...
Debug\MyProject.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
MyProject.exe - 8 error(s), 25 warning(s)
I also tried with defining it to nothing:
#define DLL_EXP
and it still creates an exp and lib files, with the same export symbols. I really don't get it
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
By the way how are you using CxImage library. Have you included the entire source code into your project or are you dynamically/statically linking to it as a dll/lib?
I am asking these because the linker says it's a local symbol.
And this is what MSDN has to say on this warning...
The symbol was both exported from and imported to the program.<br />
<br />
This warning is generated by the linker when you declare a symbol by using the __declspec(dllexport) storage-class attribute in one object file and reference it by using the __declspec(dllimport) attribute in another.<br />
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
It's a statically linked library - no dll or cpp files, only headers and lib files.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Then the library is compiled badly. When it is compiled into a static library, make sure that no __declspec(dll{import,export}) is used.
|
|
|
|
|
The library came with the code of one of my colleagues, we checked and it seems he has compiled it with dllexport. He'll recompile it when he has time (probably tomorrow).
Well, case closed
Thanks for the help everyone.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
May be you've explicitly specified to generate lib file in your linker settings.
Take the linker settings and check for this /implib switch. For instance most probably like - "/implib:"Debug/YourLib.lib" . Just remove it and problem will be solved.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I checked them, there's no /implib switch.
Here's the linker settings:
----------------
psapi.lib shlwapi.lib htmlhelp.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/MyProject.pdb" /debug /machine:I386 /out:"Debug\MyProject.exe"
----------------
and the compiler settings:
----------------
/nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"Debug/MyProject.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
----------------
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi,
I m very new in directx. I have written a
small program in D'x, drawing a triangle
[using vc++].
I have taken a dialog, named MyDialog,now
there I have one static control.I want to
show the triangle in that static control.
I have written all the directx related
code,
init(), render(), //clean()
I am calling those function from onpaint()
plase tell me, what to do if i want to show
them in my static control.
Thanks,
Koushik
|
|
|
|
|
Hello evry body,
Is it possible to develop a Audio/Video conferencing app with RTC (Real Time communication) ?
At least if only peer to peer sessions are allowed, is it possible to have two or more simulataneous Audio/Video sessions ?
Thank you in advance.
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
hINTModuleState wrote: Is it possible to develop a Audio/Video conferencing app with RTC (Real Time communication) ?
Yes. You still have to handle acquisition, compression, decompression,
and rendering of audio and video streams.
hINTModuleState wrote: At least if only peer to peer sessions are allowed, is it possible to have two or more simulataneous Audio/Video sessions ?
Yes.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you M.Mark,
My previous question has developed into two questions, I am sorry , but I appreciate any mere further clarification you can give me since I am in an decision stage, and that it is already that I wait for response from Microsoft since I didnt found the text answer in the Internet.
I know that Live Messenger is built on RTC, but since I have x64 I never succeeded to install it and see the possible things that I can do with RTC.
I am suspicious becuase I didn't find something like an VideoConf session type in RTC api, only IMMultyParty session type, which is rather about text communication for many clients together but not audio/video integrated.
My two questions follows the two parts in your response.
I do'nt understand what would be the diffrence if developing videoconf with RTC and requiring to implement on my own the aquisition, compression,etc, the diffrence between basing on RTC and developing something without the integration of RTC !
My second question is :
is it that then only peer to peer Audio/video session are allowed ? (only for text messaging, that the server enables the automatic brodcast of text lmessages to all clients within an IM MultiParty session) ?
May be "peer to peer Audio/Video" is n,ot the term that I have to employ, becuase what I require for a Audio/Video conferencing, is that when A requests a conf with B and C, then not that I would require A send to send an Invite to B then to C, then somehow A tells B that C is included and C that B is also a particpant and consequenlty B and C invite each other, but rather that signaling is done by server which sends the multiple ivites accordingly,..while in too cases Audio/video stream is donne peer to peer.
And finally can please point me to an exsiting SIP client built on RTC wich features the simultaneous AudioVideo Session ?
Thank you in advance.
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
hINTModuleState wrote: I do'nt understand what would be the diffrence if developing videoconf with RTC and requiring to implement on my own the aquisition, compression,etc, the diffrence between basing on RTC and developing something without the integration of RTC !
RTC is just the transport protocol - a way to handle connections and
transfer data across the network. You still have to actually get the
data to send and render it on the receiving end.
An important thing to consider is connectivity. Having the required
RTP ports available through firewalls is not always possible.
Microsoft may use RTP in their communication products, but they
also run their own servers so peers can connect without firewall issues.
This is a big topic... You may want to study articles like these:
Microsoft Real-Time Communications: Protocols and Technologies[^]
RTP: A Transport Protocol for Real-Time Applications[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
multi video conferensing does not exist in Microsoft RTC SDK.
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
Fascinating
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It is the sad reply I got from Microsoft today.
When I saw the source code of rtsample, a smaple inside RTC SDK, I find it using only one audio/video chat session at a time :
This is a source code extract :
if (CRTCAVSession::m_Singleton != NULL)
{
pSession->Terminate(RTCTR_BUSY);
SAFE_RELEASE(pSession);
return;
}
I didn't new that this was becuase of an inherent limitation of the SDK itself until recently !
I am dead, I wo'nt be able to develop a videoconferencing application..
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
I went through this too.
I do multimedia software with live video/audio streaming.
I looked at (and tried) any free and/or open-source solutions
I could find for the transport and none performed the way I needed.
RTP seemed like a good idea since it's a standard protocol, but
port requirements made it useless to me. I ended up writing my own.
This is big money business these days so finding free solutions isn't easy
(although it may be getting easier since it's been around a while now).
The best I can recommend is research. You need acquistion, compression,
transport, decompression, and rendering - all of which need to perform
fairly well, especially with video.
Acquisition and rendering can be done with stuff included with Windows -
no problem.
Realtime codecs are a little harder but there's free ones available,
both from Microsoft and open-source.
For the transport, sockets can be used. TCP/IP is possible (contrary to
what some papers from the 90's state) but UDP does perform better. With
UDP you need to deal with potential packet loss and packets arriving out
of order. In any case, the most difficult thing to deal with (at least it
was for me) is clock drift. The hardware clock speeds on different machines
vary enough that one machine gets ahead or behind the other fairly quickly
so that has to be dealt with as well.
Just my 2 cents,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Oh yes, you are right on saying that this is big money business today...
Currently, I am trying to see what I can do with DirectShow : it has evrything for me except that I need to find an RTP sender/receiver DirectShow filters. Hence I can create a graph with a capture filter, linked to a codec, then to an RTP Sender, and to the other side : an RTP receiver and back the chains of filters to the video renderers and audio player.
Thank you for your messages indeed.
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
Hi,
I want to write a program for Arabic language.But arabic is written from rigth to left.To set this property, I should set the WS_EX_RTLREADING ex-style.But in the msdn there is an information for this property like that:
" If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the window text is displayed using Right to Left reading-order properties. For other languages, the style is ignored and not treated as an error. "
When I set WS_EX_RTLREADING nothing changes.What is the meaning of shell language? If it is not Arabic how can I set the shell language to Arabic?
I asked a similar question before but I couldn't get an answer.
Thanks
ibrahim
|
|
|
|
|