|
Err, do you even know what a port is?
Waldermort
|
|
|
|
|
port is used to send data between to systems in the network
i think i know this
|
|
|
|
|
I think you don't know this.
The port element of an internet address associates an IP address with an application.
This allows more than one application to use an IP address at the same time on a system.
You are responsible for knowing the port numbers used by your applications.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
p_ wrote: please tell me how can i know port number of my system
and other system in the network
You mean you want to know 'IP-Address' of your system?
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
Port number (80=http or ftp=21)or IP of your system ?
|
|
|
|
|
thanks sir
i use this code on a button but it did not give any response
CAsyncSocket m_sListener, m_sConnected;
UpdateData(TRUE);
m_sListener.Create(21);
if(m_sListener.Listen()==FALSE)
{
AfxMessageBox("Unable to Listen on that port,please try another port");
m_sListener.Close();
return;
}
m_sConnected.Create();
m_sConnected.Connect("10.179.22.75",21);
if( m_sListener.Listen()== FALSE)
{
AfxMessageBox("Unable to Listen ,please try another port");
m_sListener.Close();
return;
}
thanks
|
|
|
|
|
What was return value of Create and Listen if its 0 you got an error and better calling GetLastError for see error.
|
|
|
|
|
Your system has TCP/UDP port numbers 0 - 65535, and so does every other system in the network.
|
|
|
|
|
There is no generic answer to your question simply because YOU define the port number. It totally depends of what you are trying to do: if you try to make two of your programs communicate, then you supply the port number on which the server will listen and you use this same port number in your client application.
What are you trying to do exactly ? Without knowing that, we cannot help.
|
|
|
|
|
Hello,
if you dont know the port you should listen or connect.
you may check the port number that a program uses with netstat -a on command prompt. You gotta check manually what the port might be.
then you can do the coding.
Hope this helps.
Bekir.
|
|
|
|
|
Hi,
i am repeatedly getting this error in afxcoll.inl file and the cursor is stopping at the above piece of code in the above file.
AFXCOLL_INLINE INT_PTR CPtrArray::Add(void* newElement)
{ INT_PTR nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex; }
Further in my .cpp file i am writing the following code when this error occurs:
Collect->m_Tracks.GetAt(i)->fOrder->m_FilesArray.Add(objUnitFile);
I am really at loss figuring out how to solve this error.
Thanks and Regards
|
|
|
|
|
Then placea breakpoint on that line of code, look in your debug 'auto' window and check which one of those pointers is equal to 0xCDCDCDCD, then think to yourself, why isn't initialized?
Waldermort
|
|
|
|
|
|
hi i developed an program to load a 3d model. now i have to run tihs exe in web browser. how to load the application in web.
|
|
|
|
|
What I understand from your question is that you want to run your exe in Internet Explorer or any other browser.
This is not possible. You can't run an exe in web browser. Only activex controls or scripts are allowed.
|
|
|
|
|
how to convert .exe to activex. i had seen some examples but i cant understand it. can u please explain the procedure.
|
|
|
|
|
This is same as How to convert Apple to Orange.
Both are two different things and are created in different way. You can't convert one to another.
|
|
|
|
|
NishantB++ wrote: This is same as How to convert Apple to Orange.
So, how do you convert an apple to an orange?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Do you have source code of this application?
|
|
|
|
|
yes i am having. i have developed it in document/view. now i have to open it in browser.
|
|
|
|
|
Hello guyz.
I'm using VC++ 2003 and I want to make an executable file that will register an ActiveX file[s].
Please help me on how to do this of you knew of a post or thread please give me a link.
I'm hoping for your reply.
Thank you
|
|
|
|
|
TooShy2Talk wrote: register an ActiveX
Why do you want to do that? A program that does that already exists. It's called regsvr32.exe.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
The people in the lounge said I should google for the answer to a programming question but I do not know what search engine to use
|
|
|
|
|
Hi All!
i would like to get some help regarding creating objects inside a thread.
i have a thread and within the thread i am creating an object.
main thread
{
obj o
for(;;)
{
o.createnamedpipe;
o.connectnamedpipe;
if(connected)
{
o.createthread;
o.startthread;
}
}
}
the above scenario always encounters an exception. is it because the obj is no longer valid when the o.startthread is started? i tried to use another thread thread and from there call the startthread... so ill have
for(;;)
{
o.createnamedpipe;
o.connectnamedpipe;
if(connected)
createthread(minorthread, o,...);
}
minorthread(lpParam)
{
obj o = static_cast<obj>lpParam;
o.createthread;
o.startthread;
}
this however still fails.
hope someone can help me. thanks in advance!
newbie
|
|
|
|
|
Notice anything peculiar about your code snippet? Yeah, we can't decipher it either.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi, i am sorry i wrote just words to explain the way i have coded it. basically what i have is a class (CIPCClass) which encapsulates namedpipe functions and in the mainthread i create an instance of that class CIPCClass and when a client has connected i call the startthread of the CIPCClass to continue the receiving of message while the main thread can again continue to listen for connecting clients.
mainthread
{
CIPCClass obj;
for(; ; )
{
obj.CreatePipe();
int nRet = obj.ConnectNamedPipe();
if(nRet)
obj.StartThread();
else
break;
}
}
the above approach did not work so i created a minorthread which receives the CIPCClass. and from the minorthread then i will call the startthread. still it did not work.
hope i have explained it clear enough. sorry again.
thanks for any help.
newbie
|
|
|
|