|
How do you play the video? If you are using DirectShow then you can add a samplegrabber filter to the filter graph to grab frames from the stream as bitmaps, you can then use GDI+ or somesuch to save the bitmaps as JPEG to wherever you wish. Am not sure if you are able to "overdefine" the Print-Screen button but i would try to define a hotkey for it in my application.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
how to convert from _bstr_t to std::string data type?
Thanx
|
|
|
|
|
Use _bstr_t 's char* extraction operator:
_bstr_t bStr(L"Hello");
std::string str((char*)bStr);
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
yes.Thanx
|
|
|
|
|
Stuart Dootson wrote: Use _bstr_t's char* extraction operator:
Haven't used _bstr_t at all, but from the documentation I would say the extraction operator merely gives a pointer to the internal data buffer. That's most probably not what he needs. He should convert the UTF-16 encoded _bstr_t string to some multibyte encoding first to store it to std::string .
|
|
|
|
|
_bstr_t keeps an internal ASCII copy of the BSTR which is populated on demand. This copy is the internal data buffer that the char* extractor returns a pointer to. Therefore the answer I gave is what the OP needs and wants.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Stuart Dootson wrote: _bstr_t keeps an internal ASCII copy of the BSTR which is populated on demand
Interesting. Is it really ASCII, or whatever the system code page is ("ANSI")?
|
|
|
|
|
No idea - didn't look quite that far into the source (comutil.h in your VS distribution, if you want to look).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
hi friend,
i have vb dll..in the vb dll one fuction f1;
Public Function f1(SendString As String) As String - this function taking as argument and return string...
how i will call in vc++;
CoInitialize(NULL);
hresult=CLSIDFromProgID(OLESTR("prjdll.clsdll"), &clsid);
_clsdll *t;
hresult=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(_clsdll),(LPVOID *) &t);
CString str= "000001";
t->f1(str); // this is crasing....
please help any body.
|
|
|
|
|
You need to pass this as a BSTR (or possibly a BSTR encapsulated in a VARIANT). Open the VB DLL in the OLE/COM Object Viewer (use the File->View TypeLib... command) to see what parameter type the VB DLL is expecting to see for this call.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
You cannot pass a CString 's instance, you've to pass a BSTR .
Anyway, the
Member 3653751 wrote: t->f1(str);
call seems wrong (what is _clsdll type?)
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
[My articles]
|
|
|
|
|
Hi
I m developin an application with treeview on left side and formview on right side(Splitterwnd).
Whenevr a user cliks an itme in treeview a form window will appear on right side.
My Problem is that OnInitialUpdate Fn is not working in the formview...
Due to this i face a problem of using the list control in the application..
But in different project of normal SDi, the Initial Update Funtion works fine..
Can Any One Suggest me a Solution?
|
|
|
|
|
Hello Sirs
Is it possible to convert FFMEPG on Visual Studio ?
thanks
raju
Failure is Success If we learn from it!!
|
|
|
|
|
No it is not possible. See here[^] and here[^].
-Saurabh
|
|
|
|
|
|
RASDIALPARAMS lpRasDialParams;<br />
ZeroMemory(&lpRasDialParams,sizeof(lpRasDialParams));<br />
wcscpy(lpRasDialParams.szEntryName, TEXT("我的连接"));<br />
lpRasDialParams.dwSize = sizeof(lpRasDialParams);<br />
BOOL lpBool = TRUE;<br />
DWORD dwReturn = 0;<br />
<br />
dwReturn = ::RasGetEntryDialParams(NULL, &lpRasDialParams, &lpBool);
dwRetrun value is 1168 ? what is this?
|
|
|
|
|
Try looking at the documentation for the function[^]. That points you at either the RAS specific errors or winerror.h. In winerror.h, you'll find this:
#define ERROR_NOT_FOUND 1168L
which I suspect means your entry name is unknown.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
yes, i seee it.
but entry name is right, the name is same of ras connect name
|
|
|
|
|
|
I'm using a long long variable with swprintf, however swprintf is unable to understand long long and returning zero.
wchar_t[20];
long long var = 500000;
swprintf(t, L"%i", var);
MessageBox(NULL, t, L"Output", NULL);
tried %i and %d
any advice for work fix solution or a work around! i would be very thankful.
|
|
|
|
|
try %lld, that's what most C runtimes use, I don't see it in the MS doco, but it might just work...
modified on Sunday, April 25, 2010 2:59 PM
|
|
|
|
|
|
Not portable, "I64" formats a _int64, while "ll" formats a long long, which is AT LEAST 64 bits long. Haven't yet met a platform where they differ though
|
|
|
|
|
OP said nothing about "portable"
|
|
|
|
|
See the MSDN reference here[^] for details of format specifiers. Your format string uses "%i " which is for normal integer.
It's time for a new signature.
|
|
|
|