CString Function from DLL
- From: "Kerby" <kerby@xxxxxxxxxxxxx>
- Date: Mon, 11 Apr 2005 16:00:21 -0700
i have a function inside class MyClass
here:
MyClass::SayHello(CString strName)
{
return "Hello " + strName;
}
that CString function return string Hello + strName (whatever the string par
ameter the calling application will put)
now,
i want to access that function from other application, say Visual Basic- i f
ound out that class wrapper is the answer
i know wrapping function without parameter, say
function:
quote:--------------------------------------------------------------------------------
//function
MyClass::Calculate()
{
return 1+1;
}
//wrapper, so that app like VB can access function
int __stdcall CalculateFromOtherApp(void * objMyClass)
{
MyClass *dll = (MyClass *) objMyClass;
if(dll) // all went well
return dll->Calculate(); // which is 1+1 = 2
else
return 0;
}
--------------------------------------------------------------------------------
whew!, that alls, now back to my problem
how can i make a wrapper for my SayHello function???
its hard because it has PARAMETER, strName.
.
- Follow-Ups:
- Re: CString Function from DLL
- From: thatsalok
- Re: CString Function from DLL
- Prev by Date: OT: Anybody in here do much with COM? Need to know what newsgroups...
- Next by Date: Re: why microsoft choose mfc rather than wtl?
- Previous by thread: OT: Anybody in here do much with COM? Need to know what newsgroups...
- Next by thread: Re: CString Function from DLL
- Index(es):
Relevant Pages
|