|
|
Unbelievable, sort of negates the setting of a firewall in the first place!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I especially enjoy the VBScript examples... why not do it properly, and create a full virus writing API for script coders? ActiveTrojan?
|
|
|
|
|
Exactly, if I wasn't laughing at the absurdity of it I'd surely cry!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
The XP SP2 firewall is not allowing any other machine to connect it if the firewall is turned on.
ie. Say machine B has XP SP2 firewall (new windows firewall) and its turned on. There is one more machine on the same local network - machine A.
When machine A tries to access machine B on the same local network and same domain firewall on machine B does not allow access. If you turn off the firewall then access is allowed.
Does it mean any computer on the network can not access the machine B if the firewall is turned on?
In that case file sharing would be impossible.
Any clue?
------ Apart from that-------
The APIs to manipulate firewall settings are available in the XP SP2 PSDK RC1. But right now only the image version is availbale from which you may burn the CD.
If you are more interested to know about this you may visit this link.
http://blogs.tonygoodhew.com/xpsp2
--------------
Vaibhav...
|
|
|
|
|
Vaibhav Sanghavi wrote:
In that case file sharing would be impossible.
I don't know enough about the XP firewall, but this can't be true!??! A firewall that can be shut down with VBScript (at least when the API is released ) and by default stops file sharing inside a network...
I would suggest that you demand that the clients turn off the built-in XP firewall and get themselves a proper one - ZoneAlarm, for example. The XP-one seems like a dangerous joke.
|
|
|
|
|
Hello,
Sorry for the repost, but I didn't see the checkbox for ignoring <'s.
I am new to this forum, so howdy!
I am using Visual C++ 6.
I have a weird problem with SetItemText when trying to use multiple CListCtrls.
I have mail that I am reading from a POP3 server and trying to put it in separate CListCtrls based on certain mail header entries.
Here is a snippet of code that is causing the problems:
<snip>
for (msg_num=1;msg_num<=num_msgs;msg_num++)
{
cmsg_num.Format(_T("%d"), msg_num);
POP_messages[msg_num].pop_num = msg_num;
POP_messages[msg_num].msg_num = msg_num;
if (m_pop3handle.GetMailSubject(msg_num, &msg))
{
if (strcmp(classified,"Ham") == 0) {
POP_messages[msg_num].Subject = msg;
m_listHam.InsertItem(nItem,(LPCTSTR)msg);
} else {
POP_messages[msg_num].Subject = msg;
m_listSpam.InsertItem(nItem,(LPCTSTR)msg);
}
}
else
{
m_pop3handle.GetLastError(&msg);
m_edtMsg += msg+"\r\n";
}
if (m_pop3handle.GetMailSender(msg_num, &msg))
{
if (strcmp(classified,"Ham") == 0) {
POP_messages[msg_num].From = msg;
m_listHam.SetItemText(nItem,1,(LPCTSTR)msg);
} else {
POP_messages[msg_num].From = msg;
m_listSpam.SetItemText(nItem,1,(LPCTSTR)msg);
AfxMessageBox((LPCTSTR)msg);
}
}
else
{
m_pop3handle.GetLastError(&msg);
m_edtMsg += msg+"\r\n";
}
if (strcmp(classified,"Ham") == 0) {
m_listHam.SetItemText(nItem,2, (LPCTSTR)cmsg_num);
m_listHam.SetItemText(nItem,3, "");
} else {
m_listSpam.SetItemText(nItem,2, "");
m_listSpam.SetItemText(nItem,3, "");
}
nItem++;
} // End for (msg_num=1;msg_num<=num_msgs;msg_num++)
<snip>
Now the problem is, that all the InsertItem calls get set properly, but only the SetItemText values for the first row get set. That is, none of the other rows get values set in the second and third columns.
The MessageBox show valid data coming through the msg variable, but SetItemText is not successful (i.e,returns 0).
Anybody ever seen a problem like this?
Now, if I let everything come into a single CListCtrl, then all the SetItemText calls return successfully and values are placed in the
second and third columns.
Another weirdness is that is I double up on the InsertItem statements, i.e.,
<snip>
if (strcmp(classified,"Ham") == 0) {
POP_messages[msg_num].Subject = msg;
m_listHam.InsertItem(nItem,(LPCTSTR)msg);
m_listHam.InsertItem(nItem,(LPCTSTR)msg);
} else {
POP_messages[msg_num].Subject = msg;
m_listSpam.InsertItem(nItem,(LPCTSTR)msg);
m_listSpam.InsertItem(nItem,(LPCTSTR)msg);
}
<snip>
then I get a row as before, with data in just the first column, followed by a row with data in all three columns, where the first column entry is the same as the previous row.
That is, I get something like the following:
<subject>
<subject> <email address> <msg num>
<subject>, <email address>, and <msg num> actually have values.
Any help would be greatly appreciated. Please reply via email also.
Thanks,
Murrah
otrcomm@isp-systems.com
|
|
|
|
|
The return value from InsertItem() should be used as the first parameter to SetItemText() . You currently have them both using nItem , which is incorrect.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
David,
Thank you so much man, that did it!
I am new to Visual C++ (15 years on Unix/Linux boxes), and I feel like a fish out of water.
I know I will be using this forum quite a bit, since I have a few projects that require Win32 interfaces.
Thanks again,
Murrah Boswell
|
|
|
|
|
Hello,
I am new to this forum, so howdy!
I am using Visual C++ 6.
I have a weird problem with SetItemText when trying to use multiple CListCtrls.
I have mail that I am reading from a POP3 server and trying to put it in separate CListCtrls based on certain mail header entries.
Here is a snippet of code that is causing the problems:
<snip>
for (msg_num=1;msg_num<=num_msgs;msg_num++)
{
cmsg_num.Format(_T("%d"), msg_num);
POP_messages[msg_num].pop_num = msg_num;
POP_messages[msg_num].msg_num = msg_num;
if (m_pop3handle.GetMailSubject(msg_num, &msg))
{
if (strcmp(classified,"Ham") == 0) {
POP_messages[msg_num].Subject = msg;
m_listHam.InsertItem(nItem,(LPCTSTR)msg);
} else {
POP_messages[msg_num].Subject = msg;
m_listSpam.InsertItem(nItem,(LPCTSTR)msg);
}
}
else
{
m_pop3handle.GetLastError(&msg);
m_edtMsg += msg+"\r\n";
}
if (m_pop3handle.GetMailSender(msg_num, &msg))
{
if (strcmp(classified,"Ham") == 0) {
POP_messages[msg_num].From = msg;
m_listHam.SetItemText(nItem,1,(LPCTSTR)msg);
} else {
POP_messages[msg_num].From = msg;
m_listSpam.SetItemText(nItem,1,(LPCTSTR)msg);
AfxMessageBox((LPCTSTR)msg);
}
}
else
{
m_pop3handle.GetLastError(&msg);
m_edtMsg += msg+"\r\n";
}
if (strcmp(classified,"Ham") == 0) {
m_listHam.SetItemText(nItem,2, (LPCTSTR)cmsg_num);
m_listHam.SetItemText(nItem,3, "");
} else {
m_listSpam.SetItemText(nItem,2, "");
m_listSpam.SetItemText(nItem,3, "");
}
nItem++;
} // End for (msg_num=1;msg_num<=num_msgs;msg_num++)
<snip>
Now the problem is, that all the InsertItem calls get set properly, but only the SetItemText values for the first row get set. That is, none of the other rows get values set in the second and third columns.
The MessageBox show valid data coming through the msg variable, but SetItemText is not successful (i.e,returns 0).
Anybody ever seen a problem like this?
Now, if I let everything come into a single CListCtrl, then all the SetItemText calls return successfully and values are placed in the
second and third columns.
Another weirdness is that is I double up on the InsertItem statements, i.e.,
<snip>
if (strcmp(classified,"Ham") == 0) {
POP_messages[msg_num].Subject = msg;
m_listHam.InsertItem(nItem,(LPCTSTR)msg);
m_listHam.InsertItem(nItem,(LPCTSTR)msg);
} else {
POP_messages[msg_num].Subject = msg;
m_listSpam.InsertItem(nItem,(LPCTSTR)msg);
m_listSpam.InsertItem(nItem,(LPCTSTR)msg);
}
<snip>
then I get a row as before, with data in just the first column, followed by a row with data in all three columns, where the first column entry is the same as the previous row.
That is, I get something like the following:
<subject>
<subject> <email address=""> <msg num="">
<subject>, <email address="">, and <msg num=""> actually have values.
Any help would be greatly appreciated. Please reply via email also.
Thanks,
Murrah
otrcomm@isp-systems.com
|
|
|
|
|
Hi guys,
I want to know that how i can send and recieve messages to msn online users through my own program. For this, i was reading Microsoft RTC, but i haven't found any solution yet. Does RTC provide the mechanism of communication with msn online users? if not then what would be the solution ?
Common Man
|
|
|
|
|
Either use the COM API of MSN
or implement the protocol yourself
an example is here[^]
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi all,
I was thinking of starting my own little project, and, well... it looks like I don't know where to begin.
Well, actually, I kind of do: I can handle the UI part of it and some other parts too, but there are still a few very essential pieces missing. Namely:
* Opening a video file (AVI or MPEG) or an audio file (MP2, MP3, AVI, MPEG, WAV etc) for reading and finding out its format
* Loading the next frame from the opened video file
* Seeking to a specific frame and loading it
* Opening a video or an audio file for writing
* Letting the user choose codecs for the output file
* Saving a frame and/or audio data into an opened file
The main idea is to hide all the complexity of handling video files behind a simpler construct (e.g. data sources and streams). Once that I get to that level of abstraction, it will be easy to write UI and processing because I wouldn't have to worry about details.
So... that said, I am having trouble finding any tutorials or code examples that will get me started. There are quite a few DirectX tutorials on the 'Net, for example, that walk you through the basic tasks and give you the code to work with. MSDN is all good and nice, but it's not exactly the best resource for a beginner.
Now the question is... does anybody know of any tutorials, FAQs, sample code or anything else that could help me?
Thanks
M.C.
|
|
|
|
|
M.C. wrote:
MSDN is all good and nice, but it's not exactly the best resource for a beginner.
Beginner of what?
C++ ?
Windows development?
Multimedia programming?
DirectX development?
You are not likely to find any articles or examples anywhere for a specific API that targets a beginner C++ developer. Conversely, for an experienced C++ Windows developer the MSDN information on DirectX APIs should be all one needs to get started.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Beginner in multimedia programming. I have the rest covered reasonably well.
As for MSDN: Had I found it to be "all I need", I wouldn't have posted here. You are right, it's good as a resource for people who already know where to begin. For those who don't, such as myself, it's a highly confusing chaos of information, both relevant and irrelevant to what I need. The end result is that I need a starting point in the form of tutorials and sample code, which brings me to my original post.
M.C.
|
|
|
|
|
DirectShow
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hm. Interesting...
Can it be used for both encoding and decoding, or is it for decoding only?
|
|
|
|
|
I suspect both, but I've only used it to decode, to give me specs on mp3's.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Very interesting. I think this is about as close as I can get to what I need... who would've thought Microsoft would do something right, eh? (Er... wrong forum for this kind of remark I guess. Oops )
Anyway, thanks for your help.
M.C.
|
|
|
|
|
Dear developers,
I am a newbie in visual C++ and windows programming. I need to make an application that run as a background process and probaly there is no GUI involved. Anybody can give me some pointers?
And also I would like to know, how you make an application that stays in Windows task bar? (at the right side of windows task bar, like yahoo messenger, msn messenger, etc.)
Many thanks,
Wayut
|
|
|
|
|
pointer 1) Use the "Search button at CodeProject and http://msdn.microsoft.com
pointer 2) For background process research "NT Service"
pointer 3) For Tray Icon in task bar research Shell_NotifyIcon()
-pete
|
|
|
|
|
This is the exact information I'm looking for.
Thank you,
Wayut
|
|
|
|
|
|
probably the easiest way to do run it as a process is this one:
for a win32 api.
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
while (true)
{
}
return 0;
}
to hide it to tray you have to make more steps:
NOTIFYICONDATA niData;
HINSTANCE hInst;
#define SWM_ENABLED WM_APP + 1 //
#define SWM_EXIT WM_APP + 2 // close the window
BOOL bEnabled = FALSE;
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow)) return FALSE;
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return (int) msg.wParam;
return 0;
}
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
// store instance handle and create dialog
hInst = hInstance;
HWND hWnd = CreateDialog( hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)fereastra );
if (!hWnd) return FALSE;
// Fill the NOTIFYICONDATA structure and call Shell_NotifyIcon
ZeroMemory(&niData,sizeof(NOTIFYICONDATA));
niData.cbSize = sizeof(NOTIFYICONDATA);
niData.uID = 1;
niData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
niData.hIcon = (HICON)LoadImage(hInstance,MAKEINTRESOURCE(IDI_ICON1),
IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),LR_DEFAULTCOLOR);
strcpy(niData.szTip, "Tray Icon");
niData.hWnd = hWnd;
niData.uCallbackMessage = WM_APP;
// Add icon to tray
Shell_NotifyIcon(NIM_ADD, &niData);
// free icon handle
if(niData.hIcon && DestroyIcon(niData.hIcon))
{
niData.hIcon = NULL;
}
return TRUE;
}
gabby
|
|
|
|
|
I am curious if the following procedure is either not possible or if I am doing it wrong.
I have the following declaration for a list
<br />
CList<CEraCls, CEraCls&> m_List;<br />
in my implementation class I run the following command
<br />
CEraCls pEra = FindEra(EraString);<br />
m_List.Find(pEra);<br />
I get a compile errror in <afxtempl.h> warning me about this function
<br />
template<class TYPE, class ARG_TYPE><br />
BOOL AFXAPI CompareElements(const TYPE* pElement1, const ARG_TYPE* pElement2)<br />
{<br />
ASSERT(AfxIsValidAddress(pElement1, sizeof(TYPE), FALSE));<br />
ASSERT(AfxIsValidAddress(pElement2, sizeof(ARG_TYPE), FALSE));<br />
<br />
return *pElement1 == *pElement2;<br />
}<br />
where the return statement at the end has an issue
binary '==' : no operator defined which takes a left-hand operand of type 'const class CEraCls(or there is no acceptable conversion)
Does anyone see what the issue might be? I thought I could use Find in this fashion. Is this not correct?
Thanks!
|
|
|
|
|