|
It is the line that adds it to the list that makes the copy (notice the *pByte)
m_STLList.push_back(*pByte);
if you like it can be changed to
char Byte = *(pByteArray + nByteCount);
m_STLList.push_back(Byte);
or
char Byte = pByteArray[nByteCount];
m_STLList.push_back(Byte);
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi Ant,
I see what you mean now (I'm being a bit dense today! )
|
|
|
|
|
Code short and fast:
BYTE* byte_array;<br />
std::list<char> char_list;<br />
char_list.assign(byte_array, byte_array + number_of_entries_in_byte_array);
Robert-Antonio
"A flower walked around a meadow. She saw a beautiful human
and plucked off his head."
|
|
|
|
|
Hello friendz,
I am new member of this site.
i wish to develop new embedding project in VC++.
i want clear idea about How can i do it?.
Like Switch on lights using VC++ Program.
Please Give ideas...........
Thanking you.
Benedict
|
|
|
|
|
for this first you have to made electronic circutt that work on databit send vc++ applications.
because using software you can only give command rest of thing must be handle by machine or circutt.
then go for it???
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hai...
i am doing my project in vc++.
I have echo problem and noise problem in my voice chat.I am recording the sound using WaveIn devices
only and play back using Waveout devices.
I record the sound and compress it using ADPCM compression and send it.But i have some echo problem
and noise problem. I tried out some of the functions in Waveform but i can reduce it.
Can some one help me to reduce the problem
or give suggestion regarding this.
Can any one point out the reason for this problem.
This chat works very well in LAN but when we go for Internet all these occurs..
Kindly help me.
Thank u In advance.
M.Kailasam
|
|
|
|
|
Any tool used for memory leak detection works slowly with bitmaps since bitmaps require a lot of memory allocation and deallocation. I use BoundsChecker from Compuware. Can someone suggest a faster tool which scans memory faster? Thanks in advance.
Dipeka.A.J
|
|
|
|
|
|
Hello,
I have a CFormView.I need a menu for my child window seperately. Since MDI child windows cannot have menu of their own, I had to find a workaround solution to this. So on my view I attached a dialog which has a menu. When I click on view,
the dialog appears to be grayed, but when clicked on dialog the menu
appears to be enabled. The same is the case with view, it appears to
be grayed when clicked on dialog(i.e menu on dialog). Is there any way
to make the dialog appear as enabled always irrespective of the focus
on it?
can anyone please help me to solve this?
Thanks
Madhavi
|
|
|
|
|
Hi all out there... i have a little problem with using DirecShow..
i got errors like the those shown below.. is there any1 who know how to debug it?
KNN error LNK2001: unresolved external symbol _CLSID_AudioCompressorCategory
KNN error LNK2001: unresolved external symbol _CLSID_FileWriter
KNN error LNK2001: unresolved external symbol _CLSID_FilterGraph
KNN error LNK2001: unresolved external symbol _CLSID_SystemDeviceEnum
KNN error LNK2001: unresolved external symbol _IID_IAMStreamConfig
KNN error LNK2001: unresolved external symbol _IID_IBaseFilter
KNN error LNK2001: unresolved external symbol _IID_ICreateDevEnum
KNN error LNK2001: unresolved external symbol _IID_IFileSinkFilter
KNN error LNK2001: unresolved external symbol _IID_IGraphBuilder
KNN error LNK2001: unresolved external symbol _IID_IMediaControl
KNN error LNK2001: unresolved external symbol _IID_IMediaEvent
The document from DirectShow says that Strmiids.lib are used to exports
Tks
|
|
|
|
|
hi,
i am creating a video chat program . it's work very well in lan.but in wan (internet) the video data displayed not clear (previous and current video frames(data) are display same time(mixing) . i want to solve the proplem.i am using SOCK_STREAM,send ,recv methods and also using compression algorithm.plz help me and tell me any ideo to create video chat through internet .
Thank you.
This allows you to set your preferences for the discussion boards
|
|
|
|
|
Hello,
I have a problem in my MFC project with a CFileDialog.
I use it to open multiple files, just to get the files' size, and my code is something like this:
CString str;
POSITION pos;
CFileDialog ldFile(TRUE,"avi", NULL, OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY, "AVI Files (*.avi)|*.avi|All Files (*.*)|*.*||", this);
int ret = ldFile.DoModal();
if(ret == IDOK)
{
pos = ldFile.GetStartPosition();
while(pos)
{
str = ldFile.GetNextPathName(pos);
if (stat(str , &results) == 0) // The size of the file in bytes is in results.st_size
files_size[files_count] = results.st_size;
files_count++;
}
}
What I observed is that I can open only a limited number of files
(the number is smaller when files are larger): if I try anyway to
load more files, no file is loaded and
the function returns 2 instead of 1 as usual.
Can anyone help me solve this issue?
Thanks in advance,
Marco.
|
|
|
|
|
It's because the buffer used, CFileDialog::m_ofn.lpstrFile, is too small. Check out MSDN help and you'll get the idea how to solve this. (You'll have to allocate a larger buffer, and you can check exactly how large it needs to be)
|
|
|
|
|
thank you !!!!!
you sugestion was wery useful!!!
Marco.
|
|
|
|
|
Hi All ,
I am calling bcp utility from my VC++ application, to copy data from sqlserver (on machine1) to a local directry.
eg. system("bcp .......");
But when the bcp utility process starts , the console window pops up over the main VC++ application . How can I hide and minimize that window???
Also is there a way to handle errors in BCP utility?? OR any alternative is availble for BCP utility to handle errors in DATABASE transactions. if possible please send the code.
Regards,
Thanks,
Prax
|
|
|
|
|
Hi, all
Does anybody knows a good control or source code to add this (web update) feature to MFC application?
AutoUpdate will be great for now, but if there are one that could ask user which version to download - will be the best one.
Thanks all.
|
|
|
|
|
hain buddy,
i think you have to implement your onlogic and implemetation for above, but i will point you to some of api and logic that will help.
#1 for downloading file form internet use UrlFiletodownlaod api or look the article written by Mr Micheal Dunn.
#2 now for checking how many version of your software listed at your site,make a query page and though that any parser or xml way retrieve all the version of software listed on your website ,and using your logic display that to user and ask for upgrade.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
yeah, buddy
thanks for coming up... but that all is theory and all that theory i know well, but i now need code or control :
no time to code
thanks for reply.
|
|
|
|
|
Really,i am sorry the code is created is no use for you as it embedded in my project and yeah,it do have auto updation function,but it is dependent of type of setup i am creating.
here is small code snippet that will help
//here this code snippet that check for version
<br />
CAmHttpSocket am;
CRegKey key;<br />
<br />
<br />
LPSTR tmpstr,lpstrurl;<br />
<br />
DWORD dwSize=0;<br />
<br />
struct tm *newtime;<br />
time_t long_time;<br />
time( &long_time ); <br />
newtime = localtime( &long_time );<br />
<br />
DWORD CurrentDate,RegDate;<br />
<br />
CurrentDate=MAKEWPARAM(newtime->tm_yday,newtime->tm_year); <br />
<br />
if(key.Create(HKEY_CURRENT_USER,PRODUCTREGLOCATION)!=ERROR_SUCCESS)<br />
return FALSE;<br />
key.QueryValue(RegDate,"lastupdate");<br />
<br />
<br />
if(CurrentDate==RegDate)<br />
return FALSE;<br />
else<br />
{<br />
key.SetValue(CurrentDate,"lastupdate");<br />
}<br />
<br />
<br />
<br />
key.QueryValue(NULL,"updationurl",&dwSize);<br />
if(dwSize>0)<br />
{<br />
tmpstr=new char[int(dwSize+1)];<br />
key.QueryValue(tmpstr,"updationurl",&dwSize);<br />
<br />
<br />
}<br />
else<br />
return FALSE;<br />
<br />
<br />
<br />
<br />
<br />
lpstrurl=new char[200];<br />
sprintf(lpstrurl,"%s?updateversion=%f",tmpstr,PRODUCTVERSION);<br />
<br />
delete []tmpstr;<br />
<br />
<br />
LPSTR lpXMLPage=NULL;<br />
<br />
lpXMLPage=am.GetPage(lpstrurl);<br />
<br />
<br />
<br />
CString csRetVersion,csFileURL;<br />
if(lpXMLPage)<br />
{<br />
this->Return_Element_Value((LPCTSTR)lpXMLPage,"version",csRetVersion);<br />
this->Return_Element_Value((LPCTSTR)lpXMLPage,"url",csFileURL);<br />
<br />
<br />
<br />
double version=atof(csRetVersion);<br />
if(version>PRODUCTVERSION)<br />
{<br />
this->m_strDownloadURL=csFileURL;<br />
return TRUE; <br />
}<br />
<br />
<br />
<br />
<br />
<br />
}<br />
and here is Downloading thread
<br />
<br />
CString sPath;<br />
<br />
char lpapplicationpath[301];<br />
::GetModuleFileName(NULL,lpapplicationpath,300);<br />
char sDrive[10],sDirectory[200];<br />
<br />
::_tsplitpath(lpapplicationpath,sDrive,sDirectory,NULL,NULL);<br />
CString Path1;<br />
Path1.Format("%s%s",sDrive,sDirectory);<br />
Path1.TrimRight('\\');<br />
<br />
sPath.Format("%s%ssetup.exe",sDrive,sDirectory);<br />
<br />
CString RunableExe;<br />
<br />
RunableExe.Format("%s%ssetup.exe /SP- ",sDrive,sDirectory);<br />
<br />
if(::URLDownloadToFile(NULL,m_Dlg->m_strDownloadURL,sPath,NULL,NULL)==S_OK)<br />
{ <br />
<br />
<br />
m_Dlg->m_strFilePath=sPath;<br />
m_Dlg->PostMessage(MESSAGE_EXECUTE,0,0);<br />
}<br />
<br />
m_Dlg->PostMessage(MESSAGE_EXECUTE,0,0);<br />
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
one more big thanks!
you pointed me in right direction with CAmHttpSocket...
but how to measure current speed? you know like in "true" cool updaters )
thanks.
|
|
|
|
|
HI,
I have developed one console applicatoin using VC++ 6.0. I have used InternetGetConnectedState() api to retrieve internet status.
This api fails when I run my application on WINDOWS ME, but runs well on other operating systems.
what is the reason of failure on WINDOWS ME?
Is there any other way to know about the availability of internet, i.e. whether using proxy server or dial up, ?
bye
bhavesh
|
|
|
|
|
Hey Bhavesh,
Could u please send me the code u r using to know the status of internet connection as i need it in my application.
And i hope some one wil b able to solve ur problem.
Thx,
regards,
Prax
|
|
|
|
|
http://windows.oreilly.com/news/dialup_0600.html
This link wil be helpful to u and also good help is available at msdn .
Plesae sned the code u r using
thx,
Prax
|
|
|
|
|
|
While I think a solution has already been provided, here are a few other ways of checking connectivity that you might need to know about:
http://www.pcausa.com/resources/InetActive.txt
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|