Click here to Skip to main content
15,890,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Simple socks TCP connecting Pin
Johpoke29-Feb-08 21:55
Johpoke29-Feb-08 21:55 
GeneralRe: Simple socks TCP connecting Pin
Moak29-Feb-08 22:52
Moak29-Feb-08 22:52 
QuestionRe: Simple socks TCP connecting Pin
Moak23-Feb-08 3:01
Moak23-Feb-08 3:01 
GeneralRe: Simple socks TCP connecting Pin
Johpoke23-Feb-08 3:06
Johpoke23-Feb-08 3:06 
GeneralRe: Simple socks TCP connecting Pin
Moak26-Feb-08 0:34
Moak26-Feb-08 0:34 
Questionproblems with cap and vfw Pin
cmos17-Feb-08 4:09
cmos17-Feb-08 4:09 
QuestionRe: problems with cap and vfw Pin
cmos17-Feb-08 5:02
cmos17-Feb-08 5:02 
GeneralRe: problems with cap and vfw Pin
Mark Salsbery17-Feb-08 9:46
Mark Salsbery17-Feb-08 9:46 
I'm not sure how this is going to work...

for(int i = 0; i < 9; i++)<br />
{<br />
if(capGetDriverDescription(i,sName.GetBuffer(),sName.GetAllocLength(),<br />
sVersion.GetBuffe(),sVersion.GetAllocLength()))<br />
    {			<br />
        m_Drivers.Add(sName);				 <br />
    }<br />
}


How large are your string buffers?  Which gets called first - GetAllocLength() or GetBuffer()?
If you must use CString like this, I would recommend calling GetBuffer() first with an appropriate length.
You also must release the buffer before using it...

for(int i = 0; i < 9; i++)<br />
{<br />
   LPTSTR pNameStrBuff = 
sName.GetBuffer(256);<br />
   LPTSTR pVersionStrBuff =
sVersion.GetBuffer(256);<br />
<br />
   BOOL fRet = capGetDriverDescription(i, pNameStrBuff, 256, pVersionStrBuff
,256);<br />
<br />
   sName.ReleaseBuffer();<br />
   sVersion.ReleaseBuffer();

   if (fRet)<br />
   {			<br />
             m_Drivers.Add(sName);				 <br />
   }<br />
}


As far as getting the video to work - debug it.  Check the return values from those calls.
Where is it failing?

Mark








Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: problems with cap and vfw Pin
cmos17-Feb-08 10:07
cmos17-Feb-08 10:07 
GeneralRe: problems with cap and vfw Pin
Mark Salsbery17-Feb-08 10:21
Mark Salsbery17-Feb-08 10:21 
GeneralRe: problems with cap and vfw Pin
cmos17-Feb-08 10:59
cmos17-Feb-08 10:59 
GeneralRe: problems with cap and vfw Pin
Mark Salsbery17-Feb-08 13:06
Mark Salsbery17-Feb-08 13:06 
GeneralChanging the height of a CstatusBar Pin
Stan the man17-Feb-08 4:05
Stan the man17-Feb-08 4:05 
GeneralRe: Changing the height of a CstatusBar Pin
Iain Clarke, Warrior Programmer18-Feb-08 3:07
Iain Clarke, Warrior Programmer18-Feb-08 3:07 
GeneralRe: Changing the height of a CstatusBar Pin
Stan the man18-Feb-08 3:19
Stan the man18-Feb-08 3:19 
QuestionHow can i use CFtpConnection object in asynchronous way ? Pin
Yanshof17-Feb-08 3:22
Yanshof17-Feb-08 3:22 
AnswerRe: How can i use CFtpConnection object in asynchronous way ? Pin
Mark Salsbery17-Feb-08 8:40
Mark Salsbery17-Feb-08 8:40 
QuestionHow to change font size of menu bar? Pin
hanlei000000000917-Feb-08 3:03
hanlei000000000917-Feb-08 3:03 
AnswerRe: How to change font size of menu bar? Pin
Rajkumar R17-Feb-08 5:53
Rajkumar R17-Feb-08 5:53 
AnswerRe: How to change font size of menu bar? Pin
Hamid_RT18-Feb-08 7:26
Hamid_RT18-Feb-08 7:26 
Generaldllimport Pin
George_George17-Feb-08 0:39
George_George17-Feb-08 0:39 
GeneralRe: dllimport Pin
Rajkumar R17-Feb-08 1:01
Rajkumar R17-Feb-08 1:01 
GeneralRe: dllimport Pin
George_George17-Feb-08 2:01
George_George17-Feb-08 2:01 
GeneralRe: dllimport Pin
Rajkumar R17-Feb-08 2:10
Rajkumar R17-Feb-08 2:10 
GeneralRe: dllimport Pin
George_George17-Feb-08 13:40
George_George17-Feb-08 13:40 

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.