DShow isn't as intimidating as it looks You create an IFilterGraph, add the filters you want, then create a ICaptureGraphBuilder2, point it at the IFilterGraph, and ask it to RenderStream You don't really have to worry about pins unless you intend to write your own source or transforms As regards IVideoWindow, yes, create your own child window and point IVideoWindow at it There are numerous examples kicking around
barneyman
Posts
-
c++ and directshow -
win7 key spammer -
ATL - Raise Event to all clients and acces to same variableCreate your class as a singleton, you need to make it an event source, and the consumers an event_receiver - there's an example here on CP As far as the common variable is concerned, you can either pass it byvlaue in the event, or expose it as a property/via a method You'll have to put some locking in the singleton too, to stop your host changing the value while the clients are looking at it
-
MFC exe to ATL serviceYou can certainly split it up, yes Some of the MFC classes are now shared with ATL, I'm not too sure about CSocket - I would guess not very easily, looking at the afxsock header
-
Save a _RecordsetPtr into mapI think Disconnected Recordsets[^] may be useful to you
-
how to use an interface as a parameter in other atl objects?You need to include the ErrSupport.idl into your project, so that the TLB and H are created by the MIDL compiler, in order that your import statement works you may need also need to add an importlib in your library block too, if you want to marshal that interface The above is a precis of some comments in some of my code from a few years ago, with the following link, that may provide more help - http://groups.google.com.au/group/microsoft.public.vc.atl/browse_thread/thread/7ca944c27b0288f4/9e1752e6feb4972a?lnk=st&q=import+common+idl#9e1752e6feb4972a[^]
-
Release COM dll crash problem (Windows 7 64bit OS)when you find the crash, the answer will probably present it It sounds like you have a problem you'll have to debug - again, are the pointers valid, are the parameters valid? Another option is attach to the running version, either in Visual Studio, or with WinDebug, but, again, compile without optimisations, and make sure you generate PDB files
-
Release COM dll crash problem (Windows 7 64bit OS)is it crashing *inside* that call, is m_pConnection valid, are the strings valid? What is the behaviour? COM is normally very good at letting you know, via error codes, what's wrong The installer should create no differences
-
Release COM dll crash problem (Windows 7 64bit OS)compile the release version with no optimisations, enable debug code in the compiler and linker, then debug it
-
ATL Sink in .NET processThe only other thing that comes to mind is the Dispatch pointer you're getting .. I notice you're using dispatch based callbacks into the sink? Perhaps (and i'm stabbing in the dark here ;) .Net creates your object as an aggregate object and the IDispatch you get when you query your sink, is not your's it's .NET's ?
-
ATL Sink in .NET processhave a look at Understanding Classic COM Interoperability With .NET Applications[^], seems to be what you're after
-
ATL Sink in .NET processthe obvious thing to check for is that the .net gui still has an instance of the originating com object ...
-
AFX_ISOLATIONAWARE_FUNC crashput here because I found this thread when I had a similar problem ... We had a crash in one of the comdlg32 methods wrapped in a AFX_ISOLATIONAWARE_FUNC macro, the problem was eventually traced to some shonky code in MFC, namely
CDllIsolationWrapperBase::GetModuleHandle()
This method uses::GetModuleHandle
to get to (in our case) comdlg32 IIF that module is already loaded - the primary distinction between::GetModuleHandle
andLoadLibrary
is the upping of the refcount, done in the latter, not the former Our scenario was (simplistically) as follows ... 1. our code loads a 1st party lib, this dll explicitly loads comdlg32 2. our code uses comdlg32 methods - first time through, MFC needs a handle, uses GetModuleHandle as described above 3. our code frees 1st party lib, in its shutdown, comdlg's refcount drops to 0, hence unloads comdlg 4. our code uses comdlg32 methods again - MFC has a handle, it has a procAddress, it calls it ... boom! Obviously, this bug will exhibit similarly with all the libraries that use the MFC wrapper class -
Live video processingif you're using windows and dshow, this is quite easy to do with an in-place transform filter; I've used it to put timecode and DOGs on video
-
function header temporary variableIn the first example you're returning a reference to an object that exists *outside* the function (it was created by the caller, *before* it called the function) In the second you're returning a reference to something that no longer exists
-
The case of Google stealing wireless network dataYou are stretching my point to ridicule it, so I'll qualify yours ... :-D Yes, most secure IT is used in Faraday cages for exactly the threat you highlight
-
The case of Google stealing wireless network datai completely believe capturing the data was accidental They were capturing wireless packet headers, for sure, they don't deny that, and for a worthwhile purpose Irrespective, having an unsecured, unencrypted wireless connection, is like sun-baking naked on your driveway - you do share some responsibility if you get photographed
-
DispatchID Failed...Couple of observations here what's the problem? what error code are you getting? what sort of help do you require? It's extremely unlikely anyone's going to copy your code, compile it and come back with the answer - sorry A general suggestion, don't use Dispatch interfaces, they are the most unwieldy method of calling com objects, use the 'real' interface Another one, if you have access to ATL, use CComPtr's to help wrap the pointers, and use OLE DB Client Templates to talk with Access
-
Using ShellExecute to open a web page as a child of Dialogunfortunately, you don't have a lot of control
-
Using ShellExecute to open a web page as a child of Dialogtry
ShellExecute(NULL, "open", "http://www.microsoft.com", "-new", NULL, SW_SHOWNORMAL);