|
toms from newdelhi wrote: The buffer is showing problem. I'm sorry but you really need to learn to give exact details. A statement like this tells us nothing.
|
|
|
|
|
Well, you are starting off from the wrong basis here.
A TCP server (in fact a client and server) is implemented in the kernel (on WIndows as TCPIP.sys) and supports am interface called TDI (on older Windows OSs and called something else on newer ones). TDI transports across the IO manager (Kernel to USer mode), providing sockets in the user mode for applications to use.
So what you need are two apps one that opens a socket and sends a bmp file, and another that waits on a socket and can render that bmp file to the screen.
(You can also not directly display UI stuff from the kernel so the stock TCP kernel driver would never be able to display a bmp)
If you really wanted to implement a user mode TCP server/client module then the question is why, and the problem is how you are going to send IP packets to the network card. And if you wanted to send Ethernet packets to the network card you would need to implement IP in user mode too. And if you wanted to do that you would need to write a network driver for your card with a interface accessible to the IO manager that you could open in user mode to get those Ethernet packets to it. All in all a massive and complex problem, so just use sockets, its what they are made for, and made by a lot of very clever people who understood the network stack and provided it for people like you to use.
==============================
Nothing to say.
|
|
|
|
|
I think you misunderstood OP's question.
|
|
|
|
|
Could be, it was an odd question.
==============================
Nothing to say.
|
|
|
|
|
Sir,
I'm creating a simple TCP server with which I can receive the images and display those on server window.
|
|
|
|
|
But like I said the TCP module is embedded in tcpip.sys in the kernel. Why reinvent the wheel?
You already have sockets that provides a transport across the network usually using TCP over IP so why not use it?
==============================
Nothing to say.
|
|
|
|
|
sir this application is for showing the IPAD on a windows screen.
That's why I'm creating this to do so..
I'll have to receive the data from IPAD and will have to show it on
Window or on a GUI in windows 7.
Thanks!
|
|
|
|
|
So what existing transports are there for data between an IPAD and a PC? DO IPADs support WiFi? Bluetooth? How about a USB connection?
https://www.google.fr/search?client=opera&rls=en&q=IPAD+to+PC+communication&sourceid=opera&ie=utf-8&oe=utf-8&channel=suggest
Lots of ways to skin a cat without reinventing the wheel.
==============================
Nothing to say.
|
|
|
|
|
|
Respected Andy Sir,
I've studied your applications written on codeproject
and discussed to my senior but he refuses to use it in a long way.
The thing is only to receive the images and show them without saving,,, its complete thing like you have done..
Can you help me in this??
|
|
|
|
|
Tell your boss I'm available, by a short term contract, to write the application for him. I could produce this application in a short amount of time and to his specifications.
|
|
|
|
|
Hi,
I am writting a OLE app that I want to be MFC based towards that end
I think I need two things
1) A Main Thread CWinApp
2) A main window "m_pMainWnd"
My question is can the main window be a modeless dialog box or does it have
to be CFrameWnd
Thanks
|
|
|
|
|
What do you mean by modeless?
In all MFC dialog based apps, the main dialog acts just like a modeless child dialog.
|
|
|
|
|
Something Along the lines of dlg.Create and then m_pMainWnd = &dlg;
|
|
|
|
|
It could, but exactly what advantage does it offer? A modal dialog as main window is a much better choice.
|
|
|
|
|
youre the MFC experts but doesn't a modal need a user respose yes/no when you do a dlg.domodal that thread stops until the user responds
I was wondering the automation examples (using MFC) had a modal dialogbox for the mainwindow ?
|
|
|
|
|
ForNow wrote: doesn't a modal need a user respose yes/no when you do a dlg.domodal that thread stops until the user responds True, but if it's the main window there is no other thread to worry about. You can do lots of actions within the dialog box while it is on the screen. Maybe you should explain exactly what problem you are trying to solve, rather than deciding on the window type before you know what you want to do with it.
|
|
|
|
|
I copied the code from msdn example on automation which had a main thread and a modal
dialog box for a main window I just changed the modal to modeless "dlg.create"
I had a problem on the create so created a CFrameWnd as the main window
anyway I got bigger problems I cann't get GetIDsOfNames to work
I'll post the particualrs on the "COM" forum
Thanks
|
|
|
|
|
The modal dialog is the main window in this sort of application. However, I'm still far from clear what you are really trying to do.
|
|
|
|
|
When you create the project choose Dialog Project in the options, this will give you a dialog applicaiton which I think is what you want.
==============================
Nothing to say.
|
|
|
|
|
|
I am wondering if someone has used an API or Toolkit to incorporate Anonymous Usage or User Experience into their product.
For exmaple, when you install Visual Studio, it asks if you want to participate in the Installation User Experience to provide feedback to Microsoft regarding your installation experience.
Other product have similar types of options, which basically come down to the application reporting back some information about how the inlstallation was operated, problems encountered, etc.
So if you have used or heard of such an API or toolkit to incorporate such features into an application, please respond.
Thanks.
I need a 32 bit unsigned value just to hold the number of coding WTF I see in a day …
|
|
|
|
|
hi all,
i want to load a png image from resource in picture control.
how can i do this.
thanks.
|
|
|
|
|
|
#include "atlimage.h"
Image* m_pImage;
char *pStr = strTempIMGPath.GetBuffer(0);
int size = MultiByteToWideChar(GetACP(), 0, pStr, -1, NULL, 0);
MultiByteToWideChar(GetACP(), 0, pStr, -1, szFile, size);
strTempIMGPath.ReleaseBuffer();
if (m_pImage != NULL)
{
delete m_pImage;
m_pImage = NULL;
}
m_pImage = new Image(szFile, FALSE);
void CPNGButton::OnPaint()
{
CPaintDC dc(this);
Graphics graphics(dc.m_hDC);
if(m_pImage != NULL && (m_pImage->GetLastStatus() == Gdiplus::Status::Ok))
{
graphics.DrawImage(m_pImage, 0, 0, m_pImage->GetWidth(), m_pImage->GetHeight());
}
}
|
|
|
|