C/C++ :: Socket Program That Does Not Work On Windows Server
Apr 1, 2014
I have client-server program that written with c++. Both client and server program are working on my computer.Also, I test it on many computer.There is no problem with it.But, When I try to run that program on the my windows server 2003. I get error which on the below.
[URL] ....
I researched it and someone said that it is related 32-64 bit system . My windows server is 32 bit. And I am compiling as 32 bit. But I still get error , can not get any answer with it.
View 2 Replies
ADVERTISEMENT
Apr 23, 2012
We have socket server which is developed in c# .net 3.5.
I see server memory keep on increasing whenver client disconnectes and connects.The server disconnects client if client didn;t send valid credentials.
When client is trying to connect with invalid credentials the memory is keep on increasing.
Here is the code that handles disconnection.
try {
if (state.workSocket != null) {
log.DebugFormat("ssl socket displose,{0},{1}", Doomed, IP);
state.workSocket.Shutdown(SocketShutdown.Both);
state.workSocket.Close(1);
state.workSocket = null;
log.DebugFormat("ssl socket displose complete,{0},{1}", Doomed, IP);
[Code] ....
View 7 Replies
View Related
Mar 3, 2013
I made client server program with fork ,without using signal handler because I want to see the status zombie for parent server, but when i execute "ps" command i didn't see anything for server or client pid or ppid ,i wonder about how to show the server and client process coz when i execute commad "ps" i saw only ps and bash processes???
View 1 Replies
View Related
Oct 18, 2014
I'm strugling to understand why my app is crashing if there is no internet connection.
Code:
int main() {
WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) {
std::cout << "WSAStartup failed.
[Code] ....
Debug crash code:
Code:
First-chance exception at 0x00161831 in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0x0000000C.
Unhandled exception at 0x00161831 in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0x0000000C.
It works well as long as the computer is connected to internet but if i disconect from internet the application crash but don't understand why.
View 4 Replies
View Related
Jun 27, 2014
how send and receive images from linux server to windows client?
View 2 Replies
View Related
Oct 10, 2012
I am trying to print a barcode form HClabel printer through my application running on Windows server 2008. The printer is a ntwork printer connected to a Windows 7 Machine.
The code to access the printer and proceed with printing is in VC++. The code has been working fine since years and it still works when I try to print from Windows XP machine(Connect and print on the same printer connected to WIndows 7 machine mentioned above).
The error code I receive when tried to print from windows server 2008 is 2 which says File not found. But when i access the machine from windows server 2008, it is accessible.
Below is the code I use:
if( m_hPrinter != NULL )
EndWriter();
m_hPrinter = ::CreateFile(lpPrinterName,GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
if( m_hPrinter == INVALID_HANDLE_VALUE )
[Code] .....
what might be causing this to fail-only on the new operating system I use(Windows server 2008)
View 4 Replies
View Related
Feb 10, 2014
We have a C++ 5.0 app that does something like this:
Creates the excel dispatch, exports the data, etc...
...
then calls these functions:
xlsApp.SetDisplayAlerts(TRUE);
xlsApp.SetVisible(TRUE);
xlsApp.SetUserControl(TRUE);
This has always worked to display the excel spreadsheet in the foreground, most recently on Windows Server 2003.
Now, testing on Windows Server 2008, the excel spreadsheet is created, but in the background. How to force it to the foreground?
View 2 Replies
View Related
Dec 22, 2014
When server send data then client receive that data, in C# windows services where data receive continuously (Using IP Address and port number) . This below code writing in console application . i want implement same logic in windows service side. but i want data receive continuously.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
[Code]....
Above code write in console application, same logic implementing in windows service, but i want data receiving continuously
View 3 Replies
View Related
May 7, 2014
I created a basic socket server, which listensing for incoming udp data. When I run the netcat program, I get a response:
Code:
$ nc -luv 1732
Connection from 10.50.11.12 port 1732 [udp/*] accepted
(?@??8?? ??.?n?5
(?@??8?? ??.?n?5|?>)
(?@??8?? ??.?n?5|?>)
^C |?>)
But with my c program it doesn't give the response. It should say something like "here is the message: " and then give a message.
Code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
[Code] .....
View 2 Replies
View Related
Aug 6, 2014
I am trying to send yahoo mail using socket program.
Using the commands like ehlo, starttls, auth login, data,.,quit.
but starttls is error. yahoo close itself. one more thing i use this same method for gmail is working.
The problem is we must enable the ssl authentication. Like System.net mail in .net package smtp.enablessl=true. how i enable ssl authentication in starttls in c++ program
View 1 Replies
View Related
Feb 5, 2013
I got above error in my program. My program is socket program. I am using ubuntu 11.10.
#include <netdb.h>
#include <netinet/in.h>
#include <string.h>
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#define PORT 4547
/*int parseARGS(char **args, char *line) {
[Code] ....
View 4 Replies
View Related
Feb 23, 2015
ok to start, windows based program, using pelles c ide
winsock2, using "sample" codes, able to connect, BUT no clue what 1/2 of the codes do, and most of the coding is for nix based systems!
trying to understand, and implement a minimal amount of code to add to a current menu based program!
being able to open connection, wait for input from server, receive input, acknowledge the input, then "act" then return to waiting for new input.
or vice versa, server waiting on client (but then server would have to send all the current status`s to client, so that client could be in real time, prob by sending an array from server to client).
View 11 Replies
View Related
Dec 4, 2013
I completed the program but how insert three values without using struct???
Server Program
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <iostream>
#include <netdb.h>
#include <errno.h>
#include<map>
[Code] .....
View 8 Replies
View Related
Nov 22, 2013
How to free the memory and address,value
Server:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
[Code] .....
Client:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
[Code] .....
View 1 Replies
View Related
Mar 9, 2014
I have a program matrix multiplication but it work not for big arrays. n should be bis 200.
#include <iostream>
#include <time.h>
#include <cstdlib>
[Code]....
View 6 Replies
View Related
Feb 29, 2012
im trying to write a program that prompts the user to enter three numbers and then prints them vertically (each on one line), first forward and then reversed. this is how the design should look:
enter three numbers: 1 43 54
your numbers fowards:
1
43
54
your numbers backwards:
54
43
1
this is what i have thus far when it comes to code....
#include <stdio>
int main (void) {
// local declarations
int a;
int b;
int c
[code].....
View 1 Replies
View Related
Dec 9, 2013
how work backspace key in c++.i want to make a program which can work as a backspace number
View 1 Replies
View Related
Sep 29, 2012
i have to upload a ms access database file to the server from my client program. The server program should connect to this database and read the data. What's the easiest way to upload the file? Is it FTP? i tried sockets, but it only allows like 9kb of data transfer capacity.
View 3 Replies
View Related
Nov 12, 2014
Title is self-explanatory.
Code:
#include <iostream>
using namespace std;
int main ( ) {
float number;
float sum;
float divi;
while(number != -1) {
[Code] .....
View 5 Replies
View Related
May 16, 2013
I need to get the Win OS Session name to a string in C. How can I get to that?
View 1 Replies
View Related
Aug 18, 2013
i am trying to create a program for multiple windows. Here is my code
#include<Windows.h>
// Store handles to the main window and application instance globally.
HWND ghFirstWnd =0;
HWND ghSecondWnd=0;
HWND ghThirdWnd=0;
HINSTANCE ghAppInst=0;
[Code]...
problem is when i try to execute the code it just say create window1- failed!!
View 1 Replies
View Related
May 16, 2014
I am trying to build a program which would start at the start of the computer, so for that when ever the user would run the program the program must get copied in the startup folder of the Windows I guess or anything else so that the program runs as soon as the computer is booted.
I this program would create a .vbs file n the startup, in that vbs file i would write the code for speech. so what the computer would greet you when you switch on the PC.
Here's what I tried:
#include<stdio.h>
#include<conio.h>
#include<string.h>
[Code]....
So my motive behind this code is that, this should create a .vbs file in the startup folder in that vbs file the above code would be written,
(Dim speaks,speech
speaks=Hello!
set speech=CreateObject(sapi.voice)
speech.Speak speaks) a
And then the vbs file would execute as soon as the computer starts, and then it would speak "Hello!".
But the problem is that i am not able to create a file in the folder when i run the program the file is not created, i do not get any error but nothing happens as well.
View 8 Replies
View Related
Feb 23, 2015
My use case is this: I have a C# Console application. I would like to run it via the Windows Task Scheduler, and would like it to attempt to run until it succeeds. My problem is that I can't achieve this. How does the Windows Task Scheduler recognize that a program has failed? I tried returning 1 or 32 instead of 0 but that didn't work. One possibility is to have the rerun logic in the C# console application but it feels like there must be a better way.
View 6 Replies
View Related
Apr 9, 2013
I have a Windows form application which has database and will store user details. my problem is while executing program form is not displaying .
View 1 Replies
View Related
Jan 18, 2012
I am developing a program that needs auto start at windows startup. For that I need to add Registry entries. Also the program needs to read some registry keys. What are the functions i need to do these.. Simply I need to
check if the startup key already exists
add a new key if it doesn't exist
read a key values
View 7 Replies
View Related
Oct 13, 2014
We are making a program--but every time we input a value for scanf, the following for loop does not work and the program quits without displaying the for loop's function. We are not getting any errors.
View 11 Replies
View Related