|
I've been googling to find exactly what you're looking for.
check out the manifest tool: \Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe
sample usage to create a manifest from an rgs and tlb:-
mt.exe -rgs:MSClus.rgs -tlb:MSClus.tlb -dll:foo.dll -replacements:replacements.manifest -identity:"type=win32, name=Microsoft.Tools.SampleAssembly, version=6.0.0.0, processorArchitecture=x86, publicKeyToken=6595b64144ccf1df" -out:rgstlb.manifest
|
|
|
|
|
Cool, thanks. Watch out for an upcoming article on using the Activation Context API to even trim off having to use manifests.
|
|
|
|
|
Guys,
I quickly rigged up a .NET Windows UserControl with few text boxes and methods based on an Interface. I have added a simple interface. When the object is loaded in IE, it shows as a missing image. Ihave gone through the ie settings a to make sure the security for actives is set appropriately. The dll was compiled with com enabled and is also strong named.
Framework: 2.0
IE: 7.0
Can some one give any advise on how I may solve this issue.
Thanks,
Shrini
|
|
|
|
|
It looks like the IE is not finding the Class to create an instance. is it correctly registered (with regsvr32 and the CLSID in the registry)?
You can debug the controls, via starting the IE in the debugger and open a html page with it
Greetings from Germany
|
|
|
|
|
Hi All,
It was my understanding that when an outbound call is made from an STA, the subsequent running of the message loop while waiting for that call to return would only process UI related messages (such as WM_PAINT) thus allowing the UI to remain responsive. However, I'm seeing a situation where it seems that additional messages (perhaps all messages) are being processed during this time. In my situation, multiple external threads are calling into the same method in the STA. During the execution of this method, an outbound call is made, thus I wind up with several concurrent executions in the same code path - something that was not expected. What messages are processed by an STA waiting on an outbound call?
I've read some about the IMessageFilter interface and it seems that this provides the capability to do what I'm talking about. Does its existence indicate that by default, no filtering occurs?
Thanks in advance for your help. Also, any references you could point me to would be greatly appreciated.
|
|
|
|
|
Synchronization of COM method calls within an STA is done via window messages. That's why an STA has to pump messages. The exact messages used for that purpose are an implementation detail. But even if you did know which messages they were, if you purposely didn't process them, you would cause a deadlock when an incoming method call happened - the caller is waiting for the method call to return, but you're intentionally not letting the method call happen.
|
|
|
|
|
I got an example which can play back a wavefile with streaming buffer.now,I modify some lines for Lan chat. However I try my best ,It doesn't work. So wanna your help.
Well,First I simulate this situation that 2 men chat. Set same WaveFormatEx two point,and One Point Read a wavefile and Send data to
the other PC.
The other PC Receive quiet well,I use the data to playback(stream buffer mode) ,but It does't work. Nothing can be Heard.
what's wrong in my app?
|
|
|
|
|
hi one and all,
iam having a problem with accessing serial port in my pc. i have developed an application which access the serial port in VC++ 6.0.After configuring the Serial port to 115200, iam able to send the data to the com port using WriteFile().But, iam unable to receive the data from the com port through ReadFile() operation and i have checked the error by using GetLastError() and it is given as 995(system error code).Even though i have restarted my system several times,iam unable to debug.
Please help me why this error is getting and how to fix this error?
Thanks in advance
Regards,
Praveen
|
|
|
|
|
Could you post the relevant code?
BTW this forum is about C omponent O bject M odel technology [^], not about serial port communication.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
C:\>net helpmsg 995
The I/O operation has been aborted because of either a thread exit
or an application request.
Most likely it simply timed out. See SetCommTimeouts for information.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
|
I create a ImageOle project to encapsulate Image to OLE object so as to display JPG,GIF,TGA... image in CRichEditCtrl. When dispaying animated GIFs,I coded in OnTimer:
IAdviseSink* pAdviseSink=NULL;
if(S_OK==GetAdvise(NULL,NULL,&pAdviseSink))
{
pAdviseSink->OnViewChange(DVASPECT_CONTENT,-1);
}
TCHAR buffer[100];
_stprintf(buffer,_T("OnTimer:Frame :%d,Total:%d\n"),
m_pImageObj->GetFrame(),
m_pImageObj->GetNumFrames());
OutputDebugString(buffer);
I traced the debug string(by above ::OutputDebugString),the frame of Gif switch as expectedOnTimer,and meanwhile by calling OnViewChange ,I get the control container call
HRESULT CImageAnimator::OnDraw(ATL_DRAWINFO& di),the draw operation is also okay,However,for some unknown reason, after OnDraw,My Ole Control is not visually updated in CRichEditCtrl,it is always stayed in Frame 0 although I have updated the frame index and called the container to update the view of my control.
I think the pAdviseSink->OnViewChange and OnDraw mechanism doesn't work as I expected, it seems that the OnDraw operation doesn't work.
|
|
|
|
|
Dear sir,
1.we are developing one video-email project. in that we are using "CODEC" com object for video recording & displaying.
2.Coder records the viddeo. Decoder Disply the video.
3.We used Windows Media Encoder 9 series SDK.
4.we used WME-Interfaces(we used WMEncoder & IWMensouce Interfaces,... ) for recordig video,displying video etc....
5.NOW I WANT TO CHANGE VIDEO SETTINGS LIKE: "Brightness" & "color" & "sharpness" of the video
6.to change the video settings i want one API. i dont knoew how to use the the API call for changing the video settings
7.i have UI (User Interface) with 3 SLIDER BARS(track bars) to increase or decrease the brightness,color,sharpness.
8.i have 3 buttons(APPLY,CANCEL,OK) in that UI to change the settings.
9.And i have a DEFAULT button to set the brightness,color,sharpness to default.
9. while drag the SLIDER BAR forward/backward the brightness,color will increase/decrease respectively.
10.when i click on apply the settings will apply to the video.
this is my requirement please help me to complete my project.its urgent.
Regards,
Balaji.
|
|
|
|
|
Hi,
I'm writing a C# class that will be used by a VB6 application. The class has a method that needs to return an array of custom objects.
Initially I just couldn't get this to work. I got a "type mismatch" error every time the call was made in VB.
then I found this[^] page which suggested tagging the interface with [return: MarshalAs(UnmanagedType.AsAny)]. This got it working.
My question is why does this work?
As I understand it, MarshalAs(UnmanagedType.AsAny) dynamically detects the type and marshals as the correct type, but I know what type it is, why wouldn't VB accept it as an array of MyClass. MyClass is fully com visible and VB is happy to use it fine in several other areas, it just doesn't like the MyClass[] when returned from a c# method.
I've programmed C# & VB6 separately loads before, but this is my first attempt at any interop.
Can anyone explain or point me at a good resource?
Cheers
[Sorry if this is the wrong place to ask. I know it's VB6 - C#, but I thought the problem is more related to the COM interop factor. If anyone thinks otherwise, shout and I'll move it]
Simon
|
|
|
|
|
|
Wow, Thanks for all that . I've got some serious bedtime reading there. I'll be an expert by Monday morning.
Simon
|
|
|
|
|
I am new to DirectShow and am developing an application to capture video using a video capture device. I am using DirectShow to control the device to capture avi files. I can successfully capture avi, but when i play back the avi file i find that the play back time is longer than the time i captured for. For example, if i capture video from a monitor which is playing a clock and i record for 20 seconds, the avi file is of duration 24 seconds. During playback, the clock correctly ticks 20 times but the playback takes 24 seconds. In effect, time has slowed down!!!
I have tried this both in GraphEdit and programattically with the same results.
I am using an Epiphan DVI2USB Solo device for the capture and an ffdshow vide encoder.
The graphEdit graph is:
DVI2USB Solo --->> ffdshow video encoder --->> AVI MUX --->> *.avi
On the AVI MUX I have to clear the Compatibility Index, otherwise only one image is captured the device and displayed during playback.
From a code point of view I am enumerating the capture devices and the codec and selecting the one i want. I construct an ICaptureGraphBuilder2 to construct the graph and attach it to a FilterGraph. After calling SetOuputFilename and RenderStream on the ICaptureGraphBuilder object i use IMediaControl from the FilterGraph to run and stop the graph.
Has anybody encountered this problem before? Are there any settings i need to configure? Any help/suggestions would be much appreciated. I have searched Google, MDSN and other forums without finding anyhthing that would help.
Many thanks.
AK
|
|
|
|
|
Maybe your PC can not playback at the same framerate that you recorded your avi file at?
|
|
|
|
|
Hi,
For a particular requirement, currently my testing team has isolated multiple copes of IE5.5 (in seperate folders with *all* the required DLLs within that folder). They launch multiple copies (sometimes upto 100) of the IE5.5 for their testing to allow individual sessions.
I'm trying to automate this, and for the same (with my very limited knowledge of COM) am trying to do the following. Please help me here to tell me if I am on the right track?:
1. I have a dialog based MFC app can launch each of the 100 different copies of IE 5.5 from their individual 100 folders using CreateProcess()
2. In the app I'm also doing (only once - I suppose this is primarily required for generating the TLH/TLI files):
#import "C:\IE Copies\IE551-1\SHDOCVW.DLL"
Doubt: As each of the 100 folders containing the IE5.5 have their own SHDOCVW.DLL, do I need to import them individually, or should this suffice?
3. After the IEs are running, next I need to "reach" their individual IWebBrowser2 interfaces (exposed by their SHDOCVW.DLL) so that I can invoke the navigation methods to automate visiting sites, logging in, etc.
Please note - The IEs are *not* registered with the system (obviously) - and so the usual methods may not work.
Doubt: Is there some way I can use CoCreateInstance() such that I can launch each of the IE5 copies, even though they're not registered on the system.
Sorry - if this sounds crude/crazy... I'd really appreciate if you can suggest a solution to this -- or even a more appropriate/elegant method to get this going.
Thanks a lot in advance, for your time & efforts.
Rgds,
nd
modified on Thursday, June 5, 2008 2:31 PM
|
|
|
|
|
I think I can use the concept from: How to get IHTMLDocument2 from a HWND[^]
Since the method needs a HWND , I need to write a PIDtoHWND() after I do the CreateProcess() which will get me only the PID.
Phew... I hope this works! Yet to test it.
Thanks,
nd
|
|
|
|
|
Stuck up once again!
I've used the code & concept as given at: How to get IHTMLDocument2 from a HWND[^]
With that, though I have a valid CComPtr<IHTMLDocument2> spHTMLDoc2 , (valid because the spHTMLDoc2->put_bgColor(CComVariant("blue")) works fine) the get_parentWindow() doesn't work and gets a 0x00000000 in the spHTMLWindow2 .
Is there something wrong with the way I'm doing this?
spHTMLDoc2->put_bgColor(CComVariant("blue"));
CComPtr<IHTMLWindow2> spHTMLWindow2;
hr = spHTMLDoc2->get_parentWindow(&spHTMLWindow2);
Thanks!
* Blood donation is the most superior form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *
modified on Saturday, June 14, 2008 2:16 AM
|
|
|
|
|
Finally, a good friend (Nanda) was able to help with this, and got the code below WORKING! This is how to get IWebBrowser2 from IHTMLDocument2 .
Pasting code below for anyone who may need this. I had a very tough week wrestling with this, don't want anyone else to go through the same.
CComQIPtr<IOleObject> spOleObject;
CComQIPtr<IOleClientSite> spOleClientSite;
CComQIPtr<IServiceProvider> spServiceProvider;
...
...
...
HRESULT hRes = spHTMLDoc2->QueryInterface(IID_IOleObject, reinterpret_cast<void **>(&spOleObject));
if (SUCCEEDED(hRes))
{
hRes = spOleObject->GetClientSite(&spOleClientSite);
if(SUCCEEDED(hRes))
{
hRes = spOleClientSite->QueryInterface(IID_IServiceProvider, reinterpret_cast<void **>(&spServiceProvider));
if(SUCCEEDED(hRes))
{
hRes = spServiceProvider->QueryService(SID_SWebBrowserApp,IID_IWebBrowser2, reinterpret_cast<void **>(&spWebBrowser));
}
if(SUCCEEDED(hRes))
{
BSTR oURL;
oURL = SysAllocString(L"http://www.google.com");
VARIANT var;
var.vt = VT_EMPTY;
spWebBrowser->Navigate((BSTR)oURL, &var, &var, &var, &var);
SysFreeString(oURL);
}
}
}
Thanks a ton Nanda!
* Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *
|
|
|
|
|
#import just creates the TLH/TLI wrappers as you said. Since all the IEs are the same version, they will support the same COM interfaces, so just one #import will be enough.
|
|
|
|
|
Mike, thanks for the confirmation!
I'm still stuck up in a problem, posted above. Any ideas there?
* Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *
|
|
|
|
|
Why do you need several processes? Can't you just instantiate one IE, and then automate it to open 100 new windows?
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|