Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass the values between DLLs

Status
Not open for further replies.

Vallurupa

Programmer
Oct 17, 2001
38
US
Please help me

I have to pass the structure with 8 perameters form
one dll to another.
How to declare the function or subroutine. If possible please give me example

 
Let see if i can explain this:

DLL A:
Class A
{
bool Execute(YourStruct objStruct /*[out]*/
{
objStruct.CString cs1 = "A";
objStruct.CString cs1 = "B";
return true;
}
}
DLL B:
You can place your struct as an out parameter to the function call to your dll.

#include "A.h"

bool YourFunction(const YourStruct objStructA /*[in]*/)
// execute returns true..that means the struct has values.
a aClass; // your class a here.
YourStruct oStruct;
if(a.Execute(oStruct))
{
CString myString = oStruct.cs1; // you got your values here.
}

i guess i have given you a fair example.
if there are any questions let me know.

Ash.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top