Posts Tagged ‘Program’

Whenever A .exe Program Is Run, I Get A Windows Image Error.?

Wednesday, February 24th, 2010

Whenever any .exe is run (Especially on start up, lots of them) I get an error saying
(The .exe run) – Bad Image
The application or DLL C:\WINDOWS\system32\wsg32.dll is not a valid Windows image. Please check this against your installation diskette.
wsg32.exe is virus, which I think was removed from my system recently I think the virus has changed settings so that when a .exe is run it notifys itself but now that the virus is gone wsg32.dll is no longer there. How do I fix this? Although I could be looking in totally the wrong direction, any help is appreciated :D

Can Anyone Help Me With The Hello World Server And Client Program?

Tuesday, February 9th, 2010

I’m suppose to do this program and make it work in windows os and linux but i can’t seem to make it run. i always get an error. can you tell me wats wrong? should i include some more commands? i’m new in this socket programming thing and i really need help.
here’s the program:
#include
#include /* exit() */
#include /* memset (), memcpy()*/
#include /* uname()*/
#include
#include /* socket(), bind(), listen(),accept()*/
#include
#include
#include
#include /* fork(), write(), close()*/
int_GetHostName(char *buffer, int length);
const char MESSAGE[] = “Hello, World!\n”;
const int BACK_LOG=5;
int main(int argc, char *argv[]){
int serverSocket=0, on=0, port=0,status=0,childPid=0;
struct hostent *hostPtr=NULL;
char hostname[80]=”";
struct sockaddr_in serverName={0};
if (2!=argc){
fprintf(stderr,”Usage: %s \n”,argv[0]);
}
port=atoi(argv[1]);
serverSocket=socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if(-1==serverSocket){
perror(“socket()”);
exit;
}
/* turn off bind address checking, and allow port numbers to be reused –
otherwise the TIME_WAIT phenomenon will prevent binding to these address.port
combinations for (2*MSL) seconds.
*/
on=1;
status=setsockopt(serverSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&on,sizeof(on));
if(-1==status){
perror(“setsockopt(…,SO_REUSEADDR,…
}
/* when connection is closed, thereis a need to linger to ensure all data is transmitted,
so turn this on also
*/
{
struct linger linger={0};
linger.1_onoff=1;
linger.1_linger=30;
status=setsockopt(serverSocket,SOL_S… char*)&linger,sizeof(linger));
if(-1==status){
perror(“setsockopt(…,SO_LINGER,..…
}
}
// FIND OUT WHO I AM
status=_GetHostName(hostname,sizeof(h…
if(-1==status){
perror(“_GetHostName()”);
exit(1);
}
hostPtr=gethostbyname(hostname);
if(NULL==hostPtr){
perror(“gethostbyname()”);
exit(1);
}
(void)memset(&serverName,0,sizeof(ser…
(void)memcpy(&serverName.sin_addr,hos…
/* to allow server be contactable on any of its IP addresses, uncomnment the following line of code
serverName.sin_addr=hton1(INADDR_ANY…
*/
serverName.sin_family=AF_INET;
serverName.sin_port=htons(port); //network order
status=bind(serverSocket,(structsocka…
if(-1==status){
perror(“bind()”);
exit(1);
}
status=listen(serverSocket,BACK_LOG);
if(-1==status){
perror(“listen()”);
exit(1);
}
for(;;){
struct sockaddr_in clientName={0};
int slaveSocket, clientLength=sizeof(clientName);
(void)memset(&clientName,0,sizeof(cl…
slaveSocket=accept(serverSocket,(str… sockaddr*)&clientName,&clientLength);
if(-1==slaveSocket){
perror(“accept()”);
exit(1);
}
childPid=fork();
switch(childPid){
case -1: /* ERROR */
perror(“fork()”);
exit(1);
case 0: /* child process */
close(serverSocket);
if(-1==getpeername(slaveSocket,(s… sockaddr*)&clientName,&clientLength)){
perror(“getpeername()”);
}else{
printf(“Connectionrequest from %s \n”; , inet_ntoa(clientName.sin_addr));
}
/* Server application spoecific code goes here,
e.g.perform some action, respond to client etc.
*/
write(slaveSocket,MESSAGE,strlen(…
close(slaveSocket);
exit(0);
default: /*parentprocess*/
close(slaveSocket);
}
}
return 0;
}
/* Local replacement of gethostname() to aid portability */
int _GetHostName(char *buffer, int length){
struct utsname sysname={0};
int status=0;
status=uname(&sysname);
if(-1!=status){
strncpy(buffer,sysname.nodename,len…
}
return(status);
}
please help..

Program Error: Browselcx.exe Has Generated Errors And Will Be Closed By Windows..an Error Log Is Being Created

Friday, February 5th, 2010

everytime i boot my laptop this error message always shows up before the desktop icons appear.Can anyonehelp me?

I Am Working On A C++ Program For Unix That Will Use Files As Semaphores, Please Help.?

Monday, January 25th, 2010

OK, so I’m supposed to use the creat() function in C++ with UNIX to create 5 files and only 5 files. I then want to test to see if those files are in use by using creat() on them again. My professor states that when creat() makes a new file, it is open for writing, however, when it truncates an existing file, it fails if there is no write permission. This allows a file to be used as a semaphore.
Here is my code:
#include
#include
#include
#include
#include
using namespace std;
int main() {
int fd, fd2;
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
char *filename = “Fork1.txt”;
char *filename2 = “Fork1.txt”;
fd = creat(“Fork1.txt”, mode);
fd2 = creat(“Fork1.txt”, mode);
cout << "Test" << endl << fd << endl << fd2 << endl;
return 0;
}
The second creat() should return -1 as an error because the file already exists, but it is returning a successful value…please help! Thx.

What Program Do I Need To Open “window.dll”?

Saturday, January 23rd, 2010

Which program do I need to open “window.dll”??
I have tried many extracting programs. Please send me the name of the program-location

I Keep Getting A Program Error That Refers To Explorer.exe It Stops Me From Doing Anything On The Comp.?

Thursday, January 21st, 2010

This is wat it says:
“explorer.exe has generated errors and will be closed by windows. You will need to restart the program.
An error log is being created.”
How do I stop getting this because it is crashing my comp.?
P.S. it is sort of a pop up
Please Help :(

I Put A Obsolete Program On My Computer & Cant Remove It …?!?

Friday, January 15th, 2010

I put what it says is an obsolete application & device driver on my computer.
Every time i start my computer it gives me an error message.
when i click the baloon, this is what it says.
Driver & file name : cdralw2k.sys
It’s a product made by Roxio, Inc
It is a cd creating software that i used when i had windows ME now i am using windows XP..i guess i can’t do that :P
When i go to the Roxio website to upgrade i have to buy the upgrade and i dont want to. I just want to get it off my comuter! I have another cd creator.
How can i delete this of my computer? Ive already done add/remove programs but it’s not there.
Can i delete the driver maybe?
Can i search for the cdralw2k.sys and find it that way. I can’t find it to delete it off my computer !?!

Why Does Everytime I Try To Open Yahoo Messenger Frome The Install Program It Says Dll Module Error?

Thursday, January 14th, 2010

If anyone can help please do. I would really like to start chatting with people but I can not get it to work. It will download and right after it says something like cannot reconize DLL MOdule any help?

Microsoft Visual Basic C++ Debug Library Error Iexplore.exe Abnormal Program Termination?cant Find Sol. Anywhe

Wednesday, January 13th, 2010

I work in IT and one of the ladies computers im working on keeps getting a microsoft visual basic c++ debug library error for c:\prgram files\internet explorer\iexplore.exe abnormal program termination and gives the option to hit abort, retry, or ignore i clicked all of the buttons and tried a reboot nothing happens it dosent close out internet explorere either so I figured there wasnt any problem there so I disabled the debugger in ie and it still pops up, it even pops up when she’s not even on the internet also checked for spyware none found, cant find a solution for it anywere does anyone have any ideas??? I’ve looked everywere

I Put A Obsolete Program On My Computer & Cant Remove It …?!?

Wednesday, January 13th, 2010

I put what it says is an obsolete application & device driver on my computer.
Every time i start my computer it gives me an error message.
when i click the baloon, this is what it says.
Driver & file name : cdralw2k.sys
It’s a product made by Roxio, Inc
It is a cd creating software that i used when i had windows ME now i am using windows XP..i guess i can’t do that :P
When i go to the Roxio website to upgrade i have to buy the upgrade and i dont want to. I just want to get it off my comuter! I have another cd creator.
How can i delete this of my computer? Ive already done add/remove programs but it’s not there.
Can i delete the driver maybe?
Can i search for the cdralw2k.sys and find it that way. I can’t find it to delete it off my computer !?!