|
Following on from Ian's reply, this article gives more details and tells you which ports to block on your firewall.
http://www.spywareguide.com/txt_messengerspam.html[^]
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
|
Hi!
I am adding various items in CListCtrl. Whenever there are too many items, the vertical scroll bar automatically appears. But as such i need to manually scroll it down to see new enteries.
I want that whenever new item is added, the vertical scroll bar should automatically scrol down to the latest position.
How can i do so.
|
|
|
|
|
Feel u have to use similar code..
<br />
m_listSyncLog.AddString(sEntry);<br />
m_listSyncLog.SetCurSel(m_listSyncLog.GetCount()-1);<br />
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
m_ListCtrl.EnsureVisible((m_ListCtrl.GetItemCount() - 1), false);
</code>
|
|
|
|
|
I want to POST something like this
http://xmlsearch.com/srch.asp?searchfor='test'
to the server and
get the Response from the Server
any suggestions and sample codes will be welcomed
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
|
i love such responses Crisp and Quick WHAM !
Thanks a Lot
Could you also suggest some very small XML Parsers
i looked in CP i found pugXML anything else i missed ?
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Hello, sir:
I want to know how to read/wite all physical memorys? I want to check whether the all memory of my current can be read or write and virify its reliability. Can you help me? I heard that It can be do in driver, but i don't know how to do it? I need your help, thanks.
|
|
|
|
|
HansonDavid wrote:
I want to check whether the all memory of my current can be read or write and virify its reliability.
How about IsBadReadPtr() , IsBadWritePtr() and related functions? You might also want to look at Toolhelp32ReadProcessMemory(0, ...) .
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
i suppose he meant reading physical memory, and what ur talking about is virtual memory.
yes, you have to use a driver for that, so you can map any physical memory to a linear memory address accessable by your software.
a little additional tip: DON'T WRITE TO PHISICAL MEMORY... IT COULD DAMAGE YOUR SYSTEM!
Don't try it, just do it!
|
|
|
|
|
Yes, sir:
I want to read and write physical memory that just do that in DOS.
I think maybe I can read/write physical memory in driver, But i don't how to do it? I don't know how to map any physical memory to a linear memory address accessable by your software. And I want to know Whether I must do that in driver? If I want to write physical memory, I can save all the original values of memory, I can resume that after writing. I want to get your help, Thanks.
|
|
|
|
|
Hi,
In this code i got error in _beginthreadex. error in parameter3. any one help to me.
m_hThread1 =(HANDLE)_beginthreadex(NULL,0,RequestProcess1,(void*)this,0,&m_dwThreadId1);
void CIFakerDlg::RequestProcess1()
{
//Statements
}
Error is
"_beginthreadex' : cannot convert parameter 3 from 'void (void)' to 'unsigned int (__stdcall *)(void *)'
None of the functions with this name in scope match the target type"
thanks in advance
Murail.M
|
|
|
|
|
murali_utr wrote:
void CIFakerDlg::RequestProcess1()
{
//Statements
}
The Callback Function needs to be a Global Function or a static member of a class.
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
hi...
Iam involved in the Migration of an application from VisualAge C++ for windows to VC++ 6.0.
Is there anyone who can give me info on this ?
Any help will be greatly appreciated.
Thanx in advance
saleem
|
|
|
|
|
example code:
char *temp;
temp = new char [LENGTH];
while(true)
{
temp = "testing123";
delete temp;
}
Q - how to free the memory allocate to the pointer?
how to free the array but not delete the pointer?
|
|
|
|
|
|
You cannot use new and delete in this way.
the instruction temp="testing123"; will change the adress contained in the pointer. So when you try to delete it, it will assert because the pointer to the "testing123" string wasn't dynamically allocated.
You'll have to change to this:
while(true)<br />
{<br />
strcpy(temp,"testing123");<br />
<br />
delete temp;<br />
}<br />
This will copy the data in the temp pointer (WITHOUT changing it's adress).
Hope this is clear enough
|
|
|
|
|
wrong, wrong, wrong!!!
you can't implement such a loop, when the memory is freed, you can't free it a second time!
Don't try it, just do it!
|
|
|
|
|
Oooooooooooooooooooooooops !!
Sorry I wrote it too fast
I wanted to say this:
while(true)<br />
{<br />
strcpy(temp,"testing123");<br />
}<br />
delete temp;<br />
The delete is of course outside of the loop !
|
|
|
|
|
Hello,
I use the ODBC driver "dBase Files" (installed on my station by microsoft application, I guess).
hereunder is the code I wrote to access the C:\Documents and Settings\dd\Mes documents\GSTAT.DBF file :
#define DBName "DSN=dBASE Files;UID=WD:"
...
CDatabase gDB;
CRecordset rs(&gDB);
CString res;
CString ErrMsg;
CString CASHT;
CString NETROOM;
CString DATUM;
int NbRecord;
CString Path = "C:\\Documents and Settings\\dd\\Mes documents\\" ;
CString File = "GSTAT.DBF" ;
ErrMsg = "";
res = "SELECT DATUM,CASHT,NETROOM from ["+File+"]";
// res = "SELECT DATUM,CASHT,NETROOM from ["+File+"] WHERE (DATUM = 20010208)";
// res = "SELECT DATUM,CASHT,NETROOM from ["+File+"] WHERE (DATUM = '20010208')";
// gDB.OpenEx(DBName,CDatabase::noOdbcDialog);
gDB.OpenEx(DBName,CDatabase::forceOdbcDialog );
TRY
{
rs.Open( CRecordset::forwardOnly, res );
NbRecord = rs.GetRecordCount();
}
CATCH(CDBException, e)
{
ErrMsg ="**ERR: "+e->m_strError.Left(70);
}
END_CATCH
if (ErrMsg == "") {
while(!rs.IsEOF()) {
rs.GetFieldValue( "DATUM", DATUM);
rs.GetFieldValue( "CASHT", CASHT);
rs.GetFieldValue( "NETROOM", NETROOM);
rs.MoveNext();
}
}
rs.Close();
gDB.Close();
Used like this, it works but I have some problems :
1) I am obliged go thru the ODBC display to give again the name of the file, I can't set it by program ... why ? How can I do this and use the noOdbcDialog option (When I try to use it, ODBC tells me that it can't find GSTAT.DBF)?
Furthermore, ODBC dialog is based on program directory, not on the path. If I add the Path to the name in File variable, ODBC tells me that it can't find C:\Documents and Settings\dd\Mes documents\GSTAT.DBF ...
2) If I add the clause "WHERE" to my request, no record is returned ... why ? Can't I use it ? Am I obliged to read all records and test the DATUM field by program ?
3) what is the format of the date in the file ? Excel says 08/02/2001, Word says 20010208 and DATUM = 2001-02-06 when debugging my code ... When I use a date in format yyyy-mm-dd or dd/mm/yyyy ODBC tells me that my format is not compatible with data type
Thanks in advance
DD
|
|
|
|
|
Qadddd wrote:
1) I am obliged go thru the ODBC display to give again the name of the file, I can't set it by program ... why ?
It sounds like the "dBASE Files" DSN is not configured correctly. If it was, there would be no reason to specifiy filenames, database names, paths, etc in your code.
Assuming the database exists, you can create the DSN programatically by using SQLConfigDataSource(NULL, ODBC_ADD_DSN, ...) .
Qadddd wrote:
res = "SELECT DATUM,CASHT,NETROOM from ["+File+"]";
I don't use .dbf files, but I think that File should be the name of a table within the database.
Qadddd wrote:
If I add the clause "WHERE" to my request, no record is returned ... why ?
What type of column is DATUM? It looks sort of like a date column, which means you use #02/08/2001# to compare against.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
DavidCrow wrote:
It sounds like the "dBASE Files" DSN is not configured correctly. If it was, there would be no reason to specifiy filenames, database names, paths, etc in your code.
yes, as I said myself before, I just discover on ODBC pannel the check saying that the current directory is the home directory for my file, I will go deeper in investigations tonight
DavidCrow wrote:
Assuming the database exists, you can create the DSN programatically by using SQLConfigDataSource(NULL, ODBC_ADD_DSN, ...).
that's a good point ! because when I put my little applications on several stations, I always have to configure manually ODBC, I could do it in a little installation executable. The same, if you have a piece of advice to automate the installation of a new ODBC driver ... I take it .
DavidCrow wrote:
I don't use .dbf files, but I think that File should be the name of a table within the database.
That's what my MySQL statement looks like, but for .dbf files ?? I looked at 2 or 3 examples using this syntax and it seems that I can access the file like this without too many problems ... 2 good reasons to keep it like that until someone tells me that my manner is totally wrong )
DavidCrow wrote:
It looks sort of like a date column, which means you use #02/08/2001# to compare against.
It's probably the reason, I will test it ASAP
Thanks
DD
|
|
|
|
|
I am having great difficulty getting pointers to GDI+ objects working in Doc/View under VC6.
The section of code from a Doc/View implementation (Wizard generated, no changes made):
#define TEST_POINTER
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
#ifdef TEST_POINTER
Graphics* graphics = new Graphics(pDC->m_hDC);
Pen* pen = new Pen(Color(255, 0, 0, 0));
graphics->DrawLine(pen, 50, 50, 350, 550);
graphics->DrawRectangle(pen, 50, 50, 300, 500);
graphics->DrawEllipse(pen, 50, 50, 300, 500);
delete pen;
delete graphics;
#else
Graphics graphics(pDC->m_hDC);
Pen pen(Color(255, 0, 0, 0));
graphics.DrawLine(&pen, 50, 50, 350, 550);
graphics.DrawRectangle(&pen, 50, 50, 300, 500);
graphics.DrawEllipse(&pen, 50, 50, 300, 500);
#endif
}
compiles when TEST_POINTER is UNDEF'd but not when it is defined. I get the error message "error C2660: 'new' : function does not take 3 parameters" for the two 'new' functions.
As far as I can see the global new function is being called instead of the operator::new that the classes implement.
Can somebody tell me how to use GDI+ class pointers ? I need to use pointers as I am implementing pen/brush caches in a CAD.
Any advice would be greatly appreciated.
|
|
|
|
|
Sorry, found the answer.
The solution is to get rid of '#define new DEBUG_NEW' in the source file(s) where the pointers are used.
Apologies for any time wasted.
|
|
|
|
|