Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Nibu babu thomas19-May-06 1:45
Nibu babu thomas19-May-06 1:45 
GeneralRe: error LNK2005: ... already defined in ..... Pin
Cyber Friend19-May-06 2:24
Cyber Friend19-May-06 2:24 
QuestionCopy Memory Pin
satsumatable19-May-06 0:45
satsumatable19-May-06 0:45 
AnswerRe: Copy Memory Pin
Laxman Auti19-May-06 0:58
Laxman Auti19-May-06 0:58 
GeneralRe: Copy Memory Pin
satsumatable19-May-06 0:59
satsumatable19-May-06 0:59 
AnswerRe: Copy Memory Pin
Laxman Auti19-May-06 1:15
Laxman Auti19-May-06 1:15 
AnswerRe: Copy Memory Pin
Maxwell Chen19-May-06 1:06
Maxwell Chen19-May-06 1:06 
GeneralRe: Copy Memory Pin
NiceNaidu19-May-06 1:21
NiceNaidu19-May-06 1:21 
This is the method that i have used to transfer data between two different processes in one of my projects.

//In one Process(server)
<br />
HGLOBAL hMem;<br />
hMem = GlobalAlloc(0, (800*sizeof(char)));<br />
if(NULL == hMem)<br />
	return;<br />
char* szVal = (char*) GlobalLock(hMem);<br />
<br />
memcpy(szVal, buffer, 800);<br />
if(!OpenClipboard(NULL))<br />
	return;<br />
if(!EmptyClipboard())<br />
	return;<br />
HANDLE hData = SetClipboardData(CF_TEXT , hMem);<br />
	if(NULL == hData)<br />
		return;<br />
if(!CloseClipboard())<br />
	return;<br />
if(!GlobalUnlock(hMem))<br />
	return;


//In the Second Process(Client)
if(!IsClipboardFormatAvailable(CF_TEXT))<br />
	return -1;<br />
OpenClipboard(NULL);<br />
     hgbl = GetClipboardData(CF_TEXT);<br />
char* szVal = (char*) GlobalLock(hgbl);<br />
char chScriptData[128];<br />
<br />
GlobalUnlock(hgbl);<br />
CloseClipboard();


Appu..
"If you judge people, you have no time to love them."
QuestionFlip an image Pin
anjita19-May-06 0:26
anjita19-May-06 0:26 
AnswerRe: Flip an image Pin
Sarath C19-May-06 0:35
Sarath C19-May-06 0:35 
GeneralRe: Flip an image Pin
anjita19-May-06 0:51
anjita19-May-06 0:51 
AnswerRe: Flip an image Pin
NiceNaidu19-May-06 0:52
NiceNaidu19-May-06 0:52 
GeneralRe: Flip an image Pin
anjita19-May-06 1:59
anjita19-May-06 1:59 
AnswerRe: Flip an image Pin
Hamid_RT19-May-06 0:56
Hamid_RT19-May-06 0:56 
GeneralIO.H Required Pin
Rajesh R Subramanian19-May-06 0:11
professionalRajesh R Subramanian19-May-06 0:11 
GeneralRe: IO.H Required Pin
Colin Angus Mackay19-May-06 0:29
Colin Angus Mackay19-May-06 0:29 
GeneralRe: IO.H Required Pin
Rajesh R Subramanian19-May-06 0:33
professionalRajesh R Subramanian19-May-06 0:33 
GeneralRe: IO.H Required Pin
Maxwell Chen19-May-06 0:35
Maxwell Chen19-May-06 0:35 
GeneralRe: IO.H Required Pin
Maxwell Chen19-May-06 0:33
Maxwell Chen19-May-06 0:33 
GeneralRe: IO.H Required Pin
Vikram A Punathambekar19-May-06 0:40
Vikram A Punathambekar19-May-06 0:40 
GeneralRe: IO.H Required Pin
Monty219-May-06 0:40
Monty219-May-06 0:40 
GeneralRe: IO.H Required Pin
Ryan Roberts19-May-06 0:34
Ryan Roberts19-May-06 0:34 
GeneralRe: IO.H Required Pin
Rajesh R Subramanian19-May-06 0:36
professionalRajesh R Subramanian19-May-06 0:36 
GeneralRe: IO.H Required Pin
Ryan Roberts19-May-06 0:41
Ryan Roberts19-May-06 0:41 
GeneralRe: IO.H Required Pin
gregs19-May-06 2:02
gregs19-May-06 2:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.