Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to control the other app using Window API Pin
Member 916988729-Mar-13 5:38
Member 916988729-Mar-13 5:38 
AnswerRe: How to control the other app using Window API Pin
Richard MacCutchan29-Mar-13 5:59
mveRichard MacCutchan29-Mar-13 5:59 
AnswerRe: How to control the other app using Window API Pin
Erudite_Eric31-Mar-13 5:04
Erudite_Eric31-Mar-13 5:04 
QuestionIs someone willing? Pin
Member 982361929-Mar-13 2:36
Member 982361929-Mar-13 2:36 
AnswerRe: Is someone willing? Pin
Richard MacCutchan29-Mar-13 3:39
mveRichard MacCutchan29-Mar-13 3:39 
GeneralRe: Is someone willing? Pin
Member 982361929-Mar-13 8:13
Member 982361929-Mar-13 8:13 
QuestionShell Link Properties [SOLVED] Pin
Richard Andrew x6428-Mar-13 15:48
professionalRichard Andrew x6428-Mar-13 15:48 
QuestionAddSourceFilter - passing file path paramater Pin
Vaclav_28-Mar-13 11:47
Vaclav_28-Mar-13 11:47 
Could some learned guru explain to me why is passing a file (path) to this DirectShow "method" so convoluted?
Here is the definition in DirectShow, the variable is “LPCWSTR”:
( long pointer char wide string ????)


HRESULT AddSourceFilter(
[in]   LPCWSTR lpwstrFileName,
[in]   LPCWSTR lpwstrFilterName,
[out]  IBaseFilter **ppFilter
);

Here is may attempt to use it, per MS documentation, but it fails:

hr = pGraph->AddSourceFilter( L"I:\\Briefcase OpenLW\\0 tcc_mdi\\V1\\TCC_MDI_1\\OpenCamera\\DirectShow_test.txt",
L"Source", &pSourceF);
<b>I have not check the return the value of hr , not yet.</b>

Here is another usage in dvapp ( SDK 8.1)
HRESULT CDVGraph::MakeFileToDvGraph_Type1(TCHAR* InputFileName)
{
m_iGraphType = GRAPH_FILE_TO_DV;
HRESULT hr = S_OK;
USES_CONVERSION; <b>// did I missed this ??</b>
// Add the file as source filter to the graph
hr = m_pGraph->AddSourceFilter(T2W (InputFileName ), T2W(InputFileName), &m_pInputFileFilter);
CHECK_ERROR( TEXT(" CDVGraph::MakeFileToDvGraph_Type1::m_pGraph->AddSourceFilter failed."), hr);

The macro T2W is eventually defined in ATL:
#ifdef _UNICODE
#define T2A W2A
#define A2T A2W
inline LPWSTR T2W(LPTSTR lp) { return lp; }
inline LPTSTR W2T(LPWSTR lp) { return lp; }
#define T2CA W2CA
#define A2CT A2CW
inline LPCWSTR T2CW(LPCTSTR lp) { return lp; }
inline LPCTSTR W2CT(LPCWSTR lp) { return lp; }
#else
#define T2W A2W
#define W2T W2A
inline LPSTR T2A(LPTSTR lp) { return lp; }
inline LPTSTR A2T(LPSTR lp) { return lp; }
#define T2CW A2CW
#define W2CT W2CA
inline LPCSTR T2CA(LPCTSTR lp) { return lp; }
inline LPCTSTR A2CT(LPCSTR lp) { return lp; }
#endif

Is this really enhancing the language or just adds / use more memory?
Cheers Vaclav
AnswerRe: AddSourceFilter - passing file path paramater Pin
Richard MacCutchan28-Mar-13 22:41
mveRichard MacCutchan28-Mar-13 22:41 
RantISamplerGrabber future ?? Pin
Vaclav_26-Mar-13 8:01
Vaclav_26-Mar-13 8:01 
GeneralRe: ISamplerGrabber future ?? Pin
Richard MacCutchan26-Mar-13 9:17
mveRichard MacCutchan26-Mar-13 9:17 
GeneralRe: ISamplerGrabber future ?? Pin
Chris Losinger27-Mar-13 5:03
professionalChris Losinger27-Mar-13 5:03 
GeneralRe: ISamplerGrabber future ?? Pin
Richard MacCutchan27-Mar-13 5:15
mveRichard MacCutchan27-Mar-13 5:15 
GeneralRe: ISamplerGrabber future ?? Pin
Joe Woodbury26-Mar-13 9:26
professionalJoe Woodbury26-Mar-13 9:26 
GeneralRe: ISamplerGrabber future ?? Pin
SoMad26-Mar-13 11:57
professionalSoMad26-Mar-13 11:57 
GeneralRe: ISamplerGrabber future ?? Pin
Vaclav_28-Mar-13 12:14
Vaclav_28-Mar-13 12:14 
GeneralRe: ISamplerGrabber future ?? Pin
SoMad28-Mar-13 20:34
professionalSoMad28-Mar-13 20:34 
QuestionTurbo code implementation in C++ Pin
Manoj739025-Mar-13 20:50
Manoj739025-Mar-13 20:50 
AnswerRe: Turbo code implementation in C++ Pin
Jochen Arndt25-Mar-13 22:09
professionalJochen Arndt25-Mar-13 22:09 
GeneralRe: Turbo code implementation in C++ Pin
vikramlinux25-Mar-13 22:39
vikramlinux25-Mar-13 22:39 
GeneralRe: Turbo code implementation in C++ Pin
vikramlinux25-Mar-13 23:17
vikramlinux25-Mar-13 23:17 
QuestionHow can i create a project that it has the same name with an existing project Pin
November 201325-Mar-13 5:33
November 201325-Mar-13 5:33 
QuestionRe: How can i create a project that it has the same name with an existing project Pin
David Crow25-Mar-13 6:17
David Crow25-Mar-13 6:17 
AnswerRe: How can i create a project that it has the same name with an existing project Pin
November 201326-Mar-13 2:56
November 201326-Mar-13 2:56 
AnswerRe: How can i create a project that it has the same name with an existing project Pin
Richard MacCutchan25-Mar-13 7:32
mveRichard MacCutchan25-Mar-13 7:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.