Hello all, Can anyone advise some good books (eBooks) dedicated to asyncronous programming, problems around it ? I mean there is a lot of sources describing for example, what is a semaphore but not when to use it and what problems one can face to. I'm the programmer with Windows background but life brings me into RTOS world. I suppose AP is the common problem so any platform related book would be helpfull to me. Thanks in advance, Valery
vipsy
Posts
-
Asyncronous programming books -
Strange ROT behavior questionHi all, Currently I'm writing two plugins for Windows Media Player. One plugin is DSP processor and the other - Visualisation. I need my plugins can communicate with each other though COM interfaces. So I create my own moniker class to register one of the objects in ROT. When my DSP pluging object is constructed I create moniker in the FinalConstruct (constructor) and register my object in ROT with ROTFLAGS_REGISTRATIONKEEPSALIVE flag. Later when my vis plugin needs to communicate with DSP plugin it also create moniker and binds it to DSP plugin - all works ok. But I cannot understand WHY when Win MediaPlayer releases my DSP plugin the plugin is destructed ? I mean that ROT also releases the pointer to my DSP plugin. Actually that is what I really need, but from docs I would expect different behavior - I suppose that ROT holds "strong" (I wonder where the explanation this term) reference to my DSP plugin so it will remain in memory until Revoke ? Also when I remove ROTFLAGS_REGISTRATIONKEEPSALIVE flag in IRunningObjectTable::Register method call my moniker cannot bind to object. Short description on the object which being registered in ROT: HRESULT DSPPlug::FinalContruct() { CComPtr p = CreateMoniker(); ... CComPtr pIROT; ::GetRunningObjectTable(NULL,&pIROT); ... pIROT->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE,this,p,&this->ROTRegValue); } void DSPPlug::FinalRelease() { CComPtr pIROT; ::GetRunningObjectTable(NULL,&pIROT); ... pIROT->Revoke(this->ROTRegValue); } Can someone help with explanation of those ? Best regards, Valery
-
Developer SalariesHehe, I earn less than $8000 per year being a Jr. programmer as you called it. I have rich experience in C++ and UML design. Its Russia.
-
FREE Make utility for Windows ?I have contacted with Red Hat sales manager about redistribution of Cygwin components. Here is the answer: "Red Hat owns the copyright on the Cygwin dll and as such makes the code freely available under the licensing terms of the GPL. If the application you are distributing is open source, you are fine. If you want to distribute a prorietary application you must purchase a Commercial License from us. We offer a 3 year unlimited buyout for $50,000..." -- Shawn Hunter Sales Development Representative Red Hat, Inc. This is not my case in fact, because my application is commercial and close source. So these guys that use Cygwin in close source manner may have troubles with the law.
-
FREE Make utility for Windows ?Thank you for reply, but unfortunately these utilities are not redistributable.
-
COM Interface -> C++ wrapper utility ?Thank you for fast reply. I'll try to discover the #import behavoir in C++.
-
COM Interface -> C++ wrapper utility ?Hi all, I want to find an utility that do something like that: Takes TLB (or whatever) and generates C++ wrapper classes for use these COM interfaces/objects. With ATL it could looking like: IDL: interface ITest { HRESULT GetName([out,retval] BSTR *bstrName); HRESULT DoSmth([in] BSTR str); } C++ (ATL) Wrapper: class CTest : public CComPtr { public: CString getName() { CComBSTR bstr; HRESULT hr = p->GetName(&bstr); if (FAILED(hr)) throw hr; return CString(bstr); } HRESULT doSmth(LPCTSTR str) { return p->DoSmth(CComBSTR(str)); } } Such wrappers allows to program COM in C++ much easier, almost like in VB, at the same time preserving all C++ power. Does anyone knows something similar ? Thanks in advance, vips
-
FREE Make utility for Windows ?Hi All, Currently I'm working on generation of makefile scripts. I have a lot of problems here since the make utility I use is from Cygwin package. This means that it recognizes only the paths in UNIX encoding, all of those \ to / and other stuff with spaces allowed in Win. To avoid problems I have to double all my makefile vars with the followed method: Example: SOME_PATH = C:\My Path\ SOME_PATH_UNIX = C:/My\ Path SOME_PATH_UNIX/target : SOME_PATH_UNIX/prerequisite sometool "SOME_PATH\prerequisite" In other words I have to use UNIX path encoding for specifing targets and prerequisites and Windows path encoding for commands. That sux. So my question is: Have anybody ever heard about FREE make utility for Windows with native Windows path encoding? It seems I cannot find it over Inet. I mean so FREE so I can redistribute it. I would appreciate for any help
-
How to get IStream on ordinary file ?It seems Microsoft intentionally don't provide IStream on ordinary files, but I don't know why.
-
Need a Tech. info sample/standart on the application productHi all, Our firm is in search for the standart/sample on documenting the program product. I mean technical documentation, such as module descriptions, functions, variables etc. Can anyone recommend some links ? Thanks in advance, Valery P.S. It is late to drink mineral water when the liver fall off, I understand :)
-
How to get IStream on ordinary file ?Thank you for the reply, I'd rather implement IPersistFile on my object :)
-
How to get IStream on ordinary file ?I have written an object supporting IPersistStreamInit. Now I want to save/load it in/from ordinary (not structured file). How to get IStream on ordinary file ? :confused: Or I must add an IPersistFile to my object ? Thanks in advance, Valery
-
How to set focus on ActiveX control in CMDIChildWnd ?It looks like a very simple question, but I stuck with it ! I have the selfwritten ATL ActiveX. Then I wanted to place it inside the MFC window such as CMDIChildWnd to fill the entire client area. The only thing I want is that my ActiveX can get focus when the hosting window is activated. So I put the following code: void CMyFrame::OnSetFocus(CWnd* pOldWnd) { if (m_pView!=NULL) m_pView->SetFocus(); else CMDIChildWnd::OnSetFocus(pOldWnd); } where the CMyFrame is frame derived from CMDIChildWnd, m_pView - my ActiveX pointer. It has a type of pointer to the ActiveX CWnd_wrapper created by the VC7 wizard "MFC Class from ActiveX control". The problem is that my control gets focus only once - the first time the hosting window is activated. I've tested my ActiveX in the simple dialog window - all is ok... The ActiveX is created as: int CMyFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { m_pView = new CMyControl; if (m_pView!=NULL) { CRect rect(0,0,0,0); m_pView->Create(NULL,WS_CHILD | WS_VISIBLE | WS_TABSTOP,rect,this,1); // "this" - is a parent CMDIChildWnd ... Does anybody has an idea ? Thank you very much P.S. Actually I know the reason of that :) I separated my message in two parts: If I do something completly wrong, then you will see it from the first part - please tell me if its so :) Now the details: m_pView->SetFocus() actually does the DoVerb(OLEIVERB_UIACTIVATE) i.e. activates my ActiveX UI. This is done internally by the COleControlSite::SetFocus. The problem is that default implementation of COleControlSite ignores OnFocus(FALSE) event that comes from my ActiveX when it loses the focus. COleControlSite does not call UIDeactivate upon this event. Since my control was once OLEIVERB_UIACTIVATEed and was not UIDeactivated it ignored the next DoVerb(OLEIVERB_UIACTIVATE) though it losts the focus (the ATL implementation). I cannot modify this code since its in the ATL & MFC...
-
How to get notified about the out-of-process server crashed ?Hi all, could anybody advise me a reading or help me to solve the problem: How to COM client to get known about the server it uses crashed without polling on some interface method of this server waiting for error ? I mean, is there some back notification mechanism ? Best regards, Vipsy