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

C / C++ / MFC

 
GeneralRe: Problem with OnNotify Pin
Ryan Binns12-Apr-05 18:43
Ryan Binns12-Apr-05 18:43 
GeneralRe: Problem with OnNotify Pin
thanh-hai.bui12-Apr-05 21:46
thanh-hai.bui12-Apr-05 21:46 
QuestionHow to pass string in DLL? Pin
Member 184868012-Apr-05 0:04
Member 184868012-Apr-05 0:04 
QuestionHow to pass string in DLL? Pin
Member 184868012-Apr-05 0:01
Member 184868012-Apr-05 0:01 
AnswerRe: How to pass string in DLL? [edited] Pin
toxcct12-Apr-05 0:08
toxcct12-Apr-05 0:08 
GeneralRe: How to pass string in DLL? Pin
Cedric Moonen12-Apr-05 1:31
Cedric Moonen12-Apr-05 1:31 
GeneralRe: How to pass string in DLL? [edited] Pin
Cedric Moonen12-Apr-05 2:06
Cedric Moonen12-Apr-05 2:06 
AnswerRe: How to pass string in DLL? Pin
Francesco Aruta12-Apr-05 8:46
Francesco Aruta12-Apr-05 8:46 
If I understand your problem, you should allocate a string in the main process and pass his pointer to the dll function. In the dll function you can copy the string and then return to main process.

<br />
// somewhere in the main process<br />
{<br />
  char* str;<br />
  str = new char[50];<br />
  dll_func(str,50);<br />
<br />
// use str and clear memory ;)<br />
<br />
}<br />
<br />
// somewhere in dll<br />
<br />
void dll_func(char* str, int max_size)<br />
{<br />
  //use max_size to prevent buffer overflow<br />
  strcpy(str,"hallo world!");<br />
  return;<br />
}<br />

GeneralRe: How to pass string in DLL? Pin
Rick York12-Apr-05 9:30
mveRick York12-Apr-05 9:30 
GeneralRe: How to pass string in DLL? Pin
Francesco Aruta12-Apr-05 9:53
Francesco Aruta12-Apr-05 9:53 
GeneralRe: How to pass string in DLL? Pin
Cedric Moonen12-Apr-05 20:55
Cedric Moonen12-Apr-05 20:55 
GeneralRe: How to pass string in DLL? Pin
Francesco Aruta13-Apr-05 0:19
Francesco Aruta13-Apr-05 0:19 
GeneralForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim11-Apr-05 23:35
Ganesh_Srim11-Apr-05 23:35 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
toxcct11-Apr-05 23:57
toxcct11-Apr-05 23:57 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 9:13
Ganesh_Srim12-Apr-05 9:13 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Joel Holdsworth12-Apr-05 0:18
Joel Holdsworth12-Apr-05 0:18 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
CP Visitor12-Apr-05 4:44
CP Visitor12-Apr-05 4:44 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 9:16
Ganesh_Srim12-Apr-05 9:16 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Bob Helter12-Apr-05 10:11
sussBob Helter12-Apr-05 10:11 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 23:12
Ganesh_Srim12-Apr-05 23:12 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Blake Miller12-Apr-05 7:31
Blake Miller12-Apr-05 7:31 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 9:10
Ganesh_Srim12-Apr-05 9:10 
GeneralRe: Tried All - NoLuck! Pin
Ganesh_Srim12-Apr-05 9:26
Ganesh_Srim12-Apr-05 9:26 
GeneralRe: Tried All - NoLuck! Pin
Rick York12-Apr-05 9:48
mveRick York12-Apr-05 9:48 
GeneralRe: Tried All - NoLuck! Pin
CP Visitor12-Apr-05 22:55
CP Visitor12-Apr-05 22:55 

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.