15,797,823 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by renj00790 (Top 11 by date)
renj00790
25-Jan-12 5:53am
View
vpath %.c src
vpath %.h inc
CFLAG=-I inc
main : main.o hello.o hello1.o -1f1
gcc $^ -o $@
main.o : main.c function.h function1.h
gcc -c $<
hello.o : hello.c function.h
gcc -c $<
hello1.o : hello1.c function1.h
gcc -c $<
.PHONY clean:
rm -rf *.o
i imlemented like this..but got same error???
renj00790
25-Jan-12 4:21am
View
i implemented INCLUDE files in SRC ....
renj00790
24-Jan-12 22:53pm
View
CC=gcc
CDEBUG=-g
OBJ=hello.o hello1.o main.o
my_project : $(OBJ)
$(CC) $(OBJ) -o my_project
main.o : function.h function1.h
$(CC) -c main.c
hello.o : function.h hello.c
$(CC) -c hello.c
hello1.o : function1.h hello1.c
$(CC) -c hello1.c
.PHONY clean:
clean :
rm -rf *.o
My Makefile look like this...can u implement this by using different dir
renj00790
9-Jan-12 0:24am
View
no..i mean go to the dialogue you have created..then right click it..go to properties...choose style->child..after run it..
renj00790
29-Dec-11 1:29am
View
can u tell me how to execute(Run)these two programs in linux.i have compiled using gcc server.c and gcc client.c ...
renj00790
14-Dec-11 8:29am
View
Deleted
ya.i got it.But my scenerio is that,we have two threads in serverside and client side respectively and i have created two pipes and two buffers for these two pipes(pipe1 and pipe2).so whenever both server and client get connected,the server or either client can starts sending message.
Events
1.writing message to pipe2(serverside)
2.client reading message from this pipe
3.client sending msg to server through pipe2
4.server reading msg from client via pipe2.
so iam asking whether we can implement above by utilizing 2 threads per each side or not.......i have done regarding this..but iam not so familiar with these threads..Can u plz help me????
renj00790
14-Dec-11 8:27am
View
ya.i got it.But my scenerio is that,we have two threads in serverside and client side respectively and i have created two pipes and two buffers for these two pipes(pipe1 and pipe2).so whenever both server and client get connected,the server or either client can starts sending message.
Events
1.writing message to pipe2(serverside)
2.client reading message from this pipe
3.client sending msg to server through pipe2
4.server reading msg from client via pipe2.
so iam asking whether we can implement above by utilizing 2 threads per each side or not.......i have done regarding this..but iam not so familiar with these threads..Can u plz help me????
serverside
#include "stdafx.h"
#include "windows.h"
#define g_szPipeName "\\\\.\\Pipe\\MyNamedPipe"
#define g_szPipeName1 "\\\\.\\Pipe\\MyNamedPipe1"
#define BUFFER_SIZE 1024
HANDLE hPipe,hPipe1;
DWORD threadId,threadId1;
DWORD cbBytes;
char szBuffer[BUFFER_SIZE],sxBuffer[BUFFER_SIZE];
DWORD WINAPI ThreadFunc( void* param )
{
printf("\nEnter Message to be sent to Client\n");
gets(sxBuffer);
BOOL bResult = WriteFile(hPipe,sxBuffer,strlen(sxBuffer)+1,&cbBytes,NULL);
if ( (!bResult) || (strlen(szBuffer)+1 != cbBytes))
{
printf("\nError occurred while writing to the client: %d", GetLastError());
CloseHandle(hPipe);
return 1;
}
else
{
printf("\nWriting to client......\n");
}
return threadId;
}
DWORD WINAPI ThreadFunc1( void* param1 )
{
BOOL bResult = ReadFile(hPipe1,szBuffer,sizeof(szBuffer),&cbBytes,NULL);
if ( (!bResult) || (cbBytes==0 ))
{
printf("\nError occurred while reading from the client: %d", GetLastError());
CloseHandle(hPipe);
return 1;
}
else
{
printf("\nReading from the Client....\n");
}
return threadId1;
}
int main()
{
HANDLE hPipe,hPipe1;
char szBuffer[BUFFER_SIZE],sxBuffer[BUFFER_SIZE];
DWORD cbBytes;
hPipe = CreateNamedPipe(
g_szPipeName,
PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE |
PIPE_READMODE_MESSAGE |
PIPE_WAIT,
PIPE_UNLIMITED_INSTANCES,
BUFFER_SIZE,
BUFFER_SIZE,
NMPWAIT_USE_DEFAULT_WAIT,
NULL);
hPipe1 = CreateNamedPipe(
g_szPipeName1,
PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE |
PIPE_READMODE_MESSAGE |
PIPE_WAIT,
PIPE_UNLIMITED_INSTANCES,
BUFFER_SIZE,
BUFFER_SIZE,
NMPWAIT_USE_DEFAULT_WAIT,
NULL);
if (hPipe==INVALID_HANDLE_VALUE ||hPipe1==INVALID_HANDLE_VALUE)
{
printf("\nError occurred while creating the pipe: %d", GetLastError());
return 1;
}
else
{
printf("\nNamed Pipe Created and Server Started.\n");
}
printf("\nWaiting for client connection......\n");
BOOL bClientConnected = ConnectNamedPipe(hPipe, NULL);
// BOOL bClientConnected1=ConnectNamedPipe(hPipe1, NULL);
if ( bClientConnected==FALSE)
{
printf("\nError occurred while connecting to the client: %d", GetLastError());
CloseHandle(hPipe);
return 1;
}
else
{
printf("\nConnection Established between Client and Server\n");
}
DWORD threadId,threadId1;
HANDLE hThread,hThread1;
hThread = CreateThread( NULL, 0, ThreadFunc, NULL,
0, &threadId );
hThread1=CreateThread( NULL, 0, ThreadFunc1, NULL,
0, &threadId1 );
// printf("\nClient sent the following message: %s", szBuffer);
//printf("\n");
renj00790
14-Dec-11 4:18am
View
client and server..got the answer..thanks for assistance
renj00790
14-Dec-11 3:40am
View
thanx Reshmi.....
renj00790
22-Nov-11 23:02pm
View
Can u help me in matrix addition using 1D memory and usind 2D blocks.That should be in GPU.Matrix should be square as well as non-square matrix.
renj00790
22-Nov-11 22:59pm
View
ok.thanks.we use tex2D() for fetching the memory right???.
Show More