|
Hi,
Actually, it might be that the packets are buffered and
sent when buffer is full (normal behavior)..
So you have to flush the data from the buffer
so that it writes the data.
Sameer
|
|
|
|
|
Yes, that's what I am trying to do...
Do you know how to flush the data using windows sockets 1.1 ?
I think I should switch to winsock version 2.2, there is a SIO_FLUSH command in WSAIoctl()... anyone used that with positive outcome ?
|
|
|
|
|
Winsock buffers data, but does not wait as long as 10 seconds (by default, it's buffering time, i.e. the time it waits for more data before flushing to the net, is 100 ms.) So I'd say the problem is somewhere else.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yeah, you were right... the problem was one else statement which somehow got commented out and I don't know why...
Thanks m8 I was almost ready to switch to w2k ...
|
|
|
|
|
Hi,
I've created a DLL and exposed two functions InstallHook
and DeleteHook
Actually one of my application hooks this dll for getting
the application which have started on my computer
The problem is that, i am writing all that in a
log file (a simple .txt file), but the filename is
Hard Coded. How can i make this filename such
that, my dialog based application which is actually
initiating this DLL pick up this filename.
|
|
|
|
|
Pass the filename along as a command line parameter. Read this parameter in your InitInstance using CCommandLineInfo (for example.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I can't pass any arguments..
Actually i have an MFC application which inturns just calls
the Install Hook function, which in turn sets the hook
to the system..
So even if i pass argument to Installhook, it cannot send the argument to my DLLMAIN function..
|
|
|
|
|
Is there enough interest in MC++ to warrant a separate forum?
cheers,
Chris Maunder
|
|
|
|
|
YES!
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
I've not seen a lot of MC++ questions asked in the C++ forum so I'm not sure the demand is there yet. If there isn't a lot of work to add the new forum then there is no reason why a seperate forum can't be created, I'm just not sure that people still wouldn't post the questions in the C++ forum as that is the one which will get the most views.
Michael ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Chris Maunder wrote:
Is there enough interest in MC++ to warrant a separate forum?
Yes Chris. It's a good idea.
If we have a MC++ forum, there will be questions asked.
Right now people might be scared to ask for fear of being ridiculed.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
I don't think so, but it's hard to say. I'd vote for it being created though, although I'll never use it. It can't possibly be as dead as the XML/XSL forum.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
It can't possibly be as dead as the XML/XSL forum
I think you should say that louder while looking over at Paul Watson when you say that
(damn - he's not here)
cheers,
Chris Maunder
|
|
|
|
|
Yes
Hopefully(if made available), there is enough interest in it to keep the forum busy.
Kannan
I am not here to accommodate the requirements of mass hysteria.
|
|
|
|
|
|
I don't know, but I can say I'm enough uninterested in it to not want to see discussions about it in a C++ forum.
|
|
|
|
|
Hi,
Can i programmatically stop users of Windows 98
from changing some system parameters like
- Network Identification
- Machine name
I mean, some kind of a Hook can be applied which
can monitor and stop certain things.
Please help
Regards
Sameer
|
|
|
|
|
I am not sure if this is what you want, but:
There are numerous registry settings which you can set to lock-down a Windows 9X, NT and 2000 PC. We do this at my office to prevent users from changing their configurations. We have about 100 registry settings which we apply but we lock them down pretty tight. What you are asking for is probably just 5-10 registry settings.
If you want, I will email you the registry settings we use. (All of the settings can be found on the net, but some can be hard to find.) Send me an email at gullettm@yahoo.com.
Thanks,
Matt Gullett
|
|
|
|
|
Dear all,
I have a VC Project and I need to load html pages with images from a database (not saved in files).
I read from database the html, and using an ActiveX of HTML show it like a browser, but the images doesn't. I need some ideas of how I can show Html pages with images, the html pages are in the database, the images can be a file of the project or a register in a database.
I hope that somebody can help me to find one solution!!
Thanks to all!!
Regards,
---------------------
Pere Llibre
Software Engeneering
|
|
|
|
|
Pere_Llibre wrote:
the images can be a file of the project or a register in a database
Not that I understand what you mean by neither of these things, but if it can be stored in a database and you want a browser such as IE to access them using some path, you have to implement a filesystem driver to return them.
You could also drop this DB-server idea altogether and use a web-server. Last I checked they were actually optimized to serve HTML pages the contents they might have.
|
|
|
|
|
Hello
I'm about to implement som statistics function to my application, but I'm not really sure how to do this on a good looking way. I was trying to find som examples on the web to get some tips, but I have not found any.. Does anybody have som tips were to look ... or just some tips in generell.
Thanks
Henrik
|
|
|
|
|
|
I am having a problem when sending a command line argument while using CreateProcess(). (Both commands run fine on a dos prompt).
When I send the following command it works fine:
sprintf (cmdline, "C:\\THE PROJECT\\Interface\\mygnokii --identify");
But when I send this line I'm told that the "Process cannot be created":
sprintf (cmdline, "C:\\THE PROJECT\\Interface\\echo Test Message | mygnokii --sendsms ********");
Does anyone know why this might be happening?
Thanks.
/*************************************************************/
#include <windows.h>
#include "resource.h"
...
void CNewSMSDlg::OnNewSMSSendbtn()
{
BOOL CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
SECURITY_ATTRIBUTES sat;
PROCESS_INFORMATION pinfo;
STARTUPINFO startinfo;
HANDLE hReadPipe, hWritePipe;
char cmdline[300];
char buffer[1024];
HRESULT res;
DWORD bytesread;
sprintf (cmdline, "C:\\THE PROJECT\\Interface\\echo testing | mygnokii --sendsms ********");
// sprintf (cmdline, "C:\\THE PROJECT\\Interface\\mygnokii --identify");
sat.nLength = sizeof(SECURITY_ATTRIBUTES);
sat.lpSecurityDescriptor = NULL;
sat.bInheritHandle = TRUE;
res = CreatePipe(&hReadPipe, &hWritePipe, &sat, NULL);
if(res==NULL)
{
MessageBox("CreatePipeFailed", "Error", MB_OK | MB_ICONSTOP);
}
startinfo.cb = sizeof(STARTUPINFO);
GetStartupInfo(&startinfo);
startinfo.hStdError = hWritePipe; //here's where we reroute stderr
startinfo.hStdOutput = hWritePipe; //and stdout to our pipe
startinfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
startinfo.wShowWindow = SW_HIDE; //This hides the console window
res = CreateProcess(NULL, cmdline, NULL, NULL, TRUE, NULL, NULL, NULL, &startinfo, &pinfo);
if(res==NULL)
{
MessageBox("CreateProcess Failed", "Error", MB_OK | MB_ICONSTOP);
}
CloseHandle(hWritePipe);
SendDlgItemMessage(IDC_NEWSMS_EDITBOX, WM_SETTEXT, 0, 0); //clear the field
//read from the pipe using the read handle
res = ReadFile(hReadPipe, buffer, 1023, &bytesread, NULL);
if(res==NULL)
{
MessageBox("CreateRead Failed", "Error", MB_OK | MB_ICONSTOP);
exit(1);
}
else
{
SendDlgItemMessage(IDC_NEWSMS_EDITBOX, EM_SETSEL, -1, 0);
SendDlgItemMessage(IDC_NEWSMS_EDITBOX, EM_REPLACESEL, FALSE, (LPARAM)buffer);
}
CloseHandle(hReadPipe);
}
|
|
|
|
|
CreateProcess runs programs; 'echo' is not a program but a command builtin to command.com or whatever the command processor is on the version of windows you are running. So to use echo and the | pipe you need to run these through command.com
eg.
sprintf (cmdline, "command.com echo testing | mygnokii --sendsms ********");
or something like this.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
When I try this I get:
16 bit MS-DOS Subsystem
NTVDM has encountered a System Error
The Handle is invalid
Any Ideas?
Thanks,
Alan
|
|
|
|
|