|
K.A.L wrote:
is it possible to listen to port 135 without getting a error 10048 or aother port that windows use.
No, it isn't. Of course you could use a sniffer if you want to know what's going on on the network however only one socket can listen on a given port at a given time. That's why you're not supposed to listen on well known ports (see Port Numbers (IANA)[^] or Port Assignments for Commonly-Used Services[^] for Windows specific services) unless you implement that service.
Best regards
Dennis
|
|
|
|
|
Well how does a sniffer listen on these port?
If I create a service would i then get access to them?
And Thanks
|
|
|
|
|
K.A.L wrote:
Well how does a sniffer listen on these port?
That I don't know. However if I were you I would try to find out how an existing sniffer works. Maybe you should check out WinPcap[^], the packet capture library used by the Windows version of Ethereal[^].
Best regards
Dennis
|
|
|
|
|
First of all, I assume that you know what you are doing. If you just randomlly picked port 135, then you need to learn more about networking before you continue. Since I'm assuming you know what you are doing, warnings about how doing this can have really really bad effects on your system, even making it unuseable, are redundant.
Port 135 is the dcom-scm. So you need to disable it. See:
http://support.microsoft.com:80/kb/q158508/
http://accs-net.com/smallfish/dcom.htm
Google will give you more links
Sinc
|
|
|
|
|
Well i need to learn more about networking,
I just wanted to make a program that could tell me if there was any computer download something from me
Thanks
|
|
|
|
|
K.A.L wrote:
I just wanted to make a program that could tell me if there was any computer download something from me
Well, if you start that project to learn more about networking I'd say it's a good idea. But if you just want to do it because you need a tool like that I'd say it isn't worth the trouble. A good firewall will let you know when an unauthorized process tries to listen/connect. And for detailed analysis of what's going on you can use a tool like Ethereal.
Best regards
Dennis
|
|
|
|
|
|
Hi all.
I got a simple problem using CString, but I can't find a good solution for it.
I have a Database with a field (10 Bytes long) as a CString (using MFC ODBC).
and I need to get and set the Values of each byte.
Example:
CString text = "ABCDEFGH90"; I can get the values by using text.GetAt(0);
But if I code a staement like this I just get a lot errors..
if (text.GetAt(0) == "A") <- compiler error
or if I like to set a value
text.SetAt(0, "T") <- compiler error
What is the best way to do it without having trouble to convert the hole stuff to const char and back ??
Big THX. for helping me out !!!
|
|
|
|
|
"A" and "T" are strings not characters.
'A' and 'T' represent character values.
if(text.GetAt(0) == 'A)) <- no error
text.SetAt(0,'T') <- no error.
INTP
|
|
|
|
|
This program reads .bmp files and like types them in a game screen. I would like it so to be activated by dragging a crosshair over the game screen so the program knows where the screen is
The game I am talking about is runescape.
This program would read the .bmp and type the word in and then press the key enter
If you would like to see a program like this I will show you
My email is dellnerd88@yahoo.com or aim is nellyeminem88
If you want me to explain it more email me
|
|
|
|
|
We answer programming questions here. If you want someone to write a program for you, goto guru.com and hire someone. Or goto sourceforge.net and try to get a new project going.
INTP
|
|
|
|
|
Hain Buddy,
My Suggestion is you satrt programming it,if you face any problem betwwen it ,you can post here,from my knowledge people here are eager to help you out of problem, but nobody has time to make one for you.
i think you understand what i am saying
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
Can anyone please help me with this problem?
I have a dialog with a CRichEditCtrl and a button.
The user highlights a piece of text and clicks the button.
When the button is clicked, a modal Dialog is created.
This modal dialog has a CEdit and a button. The CEdit contains a variable of type CString.
The user enters text in this CEdit.
When the OK button is clicked, the text in the CEdit should replace the highlighted text in the CRichEditCtrl in the initial dialog.
When the program is executed it gives a "Debug Assertion Failed" error.
The assertion is as follows (from AFXCMN.H):
<br />
AFXCMN_INLINE void CRichEditCtrl::ReplaceSel(LPCTSTR lpszNewText, BOOL bCanUndo)<br />
{ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_REPLACESEL, (WPARAM) bCanUndo, (LPARAM)lpszNewText); }<br />
My code is as follows:
<br />
void MyModalDialog::OnBtnOk() <br />
{<br />
CString returnStr = m_edit;
MyProjectDlg dlg;
dlg.m_fileContents.ReplaceSel(returnStr, FALSE);
}<br />
Thanks very much,
dlarkin77 ![Confused | :confused:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_confused.gif)
|
|
|
|
|
Do not try to replace the text from within the dialog. Replace the text after the dialog closes, it is easier.
MyProjectDlg dlg; // dialog type now exist
// but the window does not exist yet
// therefor, you can not send it any messages.
According to your comments: The MyProjectDlg should already exist and it should be lunching the MyModalDialog, but here you are asking MyModalDialog to create a new MyProjectDlg and replace the selected text in that (which also does not exist).
void MyProjectDlg::SomeFunction()
{
MyModalDialog dlg;
dlg.MySetText(...);
if( dlg.DoModal() == IDOK )
m_fileContents.ReplaceSel(dlg.MyGetText(), FALSE);
}
INTP
|
|
|
|
|
Thanks a lot John, that worked out nicely.
dlarkin77 ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
hi all,
I want to search File whether it is in the Hard disk or not.
How do I do this?
If any one know please send me a reply.
Thanks in advance..
|
|
|
|
|
programatically or by using the windows explorer search/find ?
programatically, use CFileFind ( or FindNextFile and FindFirstFile )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Get a copy of "Agent Ransack", it can find anything. There know there was an article here some where, but I can not find it.
You could write your own using the MS-C functions _findfirst() and _findnext() or the SDKs FindFirstFile() and FindNextFile(). The hard part is switching directories, for further searching. All the "File I/O Functions" functions are listed in the MSDN, you'll have to do a search for that exact string (not listed in index - as usual).
P.S. There is an article on "Agent Ransack" at CP.
Good Luck!
INTP
|
|
|
|
|
hi,
Thanks for ur reply..I found the "Agent Ransack" Article.But the problem is no free source codes in their Article.It is having exe only..
|
|
|
|
|
hi
I am doing a project using MFC/C++ .I want to run a exe file when clicking a Button in the Dialog.
please reply me the way to do it.
Thanks in advance..
|
|
|
|
|
|
There are Three Api' that can Help
Little Easy
--. WinExec()
--- ShellExecute() & ShellExecuteEx()
Little Tough for NewBies
--- CreateProcess
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I have made simple program for HTTP download in the Visual Studio .NET (VC++
7.0). I have overriden MFC class CAsyncMonikerFile. I have overriden method
OnStopBinding(HRESULT hresult, LPCTSTR szError) in my derived class , but
this method wasn't called at the end of the bind operation (when all data
came). But overriden method OnStartBinding()was properly called. Can you help
me with this problem? Is there any serious bug in the MFC class
CAsyncMonikerFile in VC++ 7.0?
|
|
|
|
|
I do not know why you overrode the OnStopBinding() function/method, but is sounds like you need to call the base version in your overriden version.
OnStopBinding(...)
{
BaseClass::OnStopBinding(...);
}
INTP
|
|
|
|
|
Hi John,
I have to call some functions, when all data are downloaded and the OnStopBinding is right place for it. But the problem is that OnStopBinding is not called in VC++ 7.0, but in older VC++ 6.0, everything was all right (OnStopBinding is called after OnDataAvailable()).
|
|
|
|